aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2014-08-03 19:59:24 +0200
committerSamuel Tardieu <sam@rfc1149.net>2014-08-03 19:59:24 +0200
commit33b1036b2cad0456cb397c4027dbd05f7f95e3d1 (patch)
tree7da9655f6c89db624b902bdd36cedffe13bd73d8
parentb0c2dec591b72cb30b2505c26efe46924ee0de4a (diff)
parent2cd573148aba544b202bc046851e79324b39f494 (diff)
downloadcgeo-33b1036b2cad0456cb397c4027dbd05f7f95e3d1.zip
cgeo-33b1036b2cad0456cb397c4027dbd05f7f95e3d1.tar.gz
cgeo-33b1036b2cad0456cb397c4027dbd05f7f95e3d1.tar.bz2
Merge commit '2cd573148aba544b202bc046851e79324b39f494' into release
-rw-r--r--.gitignore7
-rw-r--r--.idea/codeStyleSettings.xml56
-rw-r--r--.idea/inspectionProfiles/c_geo_standards.xml22
-rw-r--r--.idea/misc.xml2
-rw-r--r--.idea/modules.xml1
-rw-r--r--README.md9
-rw-r--r--android-support-v7-appcompat/.classpath11
-rw-r--r--android-support-v7-appcompat/.project33
-rw-r--r--android-support-v7-appcompat/.settings/org.eclipse.jdt.core.prefs4
-rw-r--r--android-support-v7-appcompat/AndroidManifest.xml20
-rw-r--r--android-support-v7-appcompat/README.txt10
-rw-r--r--android-support-v7-appcompat/android-support-v7-appcompat.iml50
-rw-r--r--android-support-v7-appcompat/build.xml92
-rw-r--r--android-support-v7-appcompat/libs/android-support-v4.jarbin0 -> 648327 bytes
-rw-r--r--android-support-v7-appcompat/libs/android-support-v7-appcompat.jarbin0 -> 349134 bytes
-rw-r--r--android-support-v7-appcompat/lint.xml154
-rw-r--r--android-support-v7-appcompat/proguard-project.txt20
-rw-r--r--android-support-v7-appcompat/project.properties15
-rw-r--r--android-support-v7-appcompat/res/anim/abc_fade_in.xml20
-rw-r--r--android-support-v7-appcompat/res/anim/abc_fade_out.xml20
-rw-r--r--android-support-v7-appcompat/res/anim/abc_slide_in_bottom.xml19
-rw-r--r--android-support-v7-appcompat/res/anim/abc_slide_in_top.xml19
-rw-r--r--android-support-v7-appcompat/res/anim/abc_slide_out_bottom.xml19
-rw-r--r--android-support-v7-appcompat/res/anim/abc_slide_out_top.xml19
-rw-r--r--android-support-v7-appcompat/res/color/abc_search_url_text_holo.xml21
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ab_bottom_solid_dark_holo.9.pngbin0 -> 144 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ab_bottom_solid_light_holo.9.pngbin0 -> 144 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ab_bottom_transparent_dark_holo.9.pngbin0 -> 135 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ab_bottom_transparent_light_holo.9.pngbin0 -> 134 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ab_share_pack_holo_dark.9.pngbin0 -> 2866 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ab_share_pack_holo_light.9.pngbin0 -> 2862 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ab_solid_dark_holo.9.pngbin0 -> 146 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ab_solid_light_holo.9.pngbin0 -> 145 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ab_stacked_solid_dark_holo.9.pngbin0 -> 146 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ab_stacked_solid_light_holo.9.pngbin0 -> 146 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ab_stacked_transparent_dark_holo.9.pngbin0 -> 139 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ab_stacked_transparent_light_holo.9.pngbin0 -> 133 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ab_transparent_dark_holo.9.pngbin0 -> 155 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ab_transparent_light_holo.9.pngbin0 -> 145 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_cab_background_bottom_holo_dark.9.pngbin0 -> 149 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_cab_background_bottom_holo_light.9.pngbin0 -> 145 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_cab_background_top_holo_dark.9.pngbin0 -> 147 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_cab_background_top_holo_light.9.pngbin0 -> 147 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_ab_back_holo_dark.pngbin0 -> 602 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_ab_back_holo_light.pngbin0 -> 546 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_cab_done_holo_dark.pngbin0 -> 713 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_cab_done_holo_light.pngbin0 -> 737 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_clear_disabled.pngbin0 -> 1774 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_clear_normal.pngbin0 -> 1945 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_clear_search_api_disabled_holo_light.pngbin0 -> 1504 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_clear_search_api_holo_light.pngbin0 -> 1540 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_commit_search_api_holo_dark.pngbin0 -> 597 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_commit_search_api_holo_light.pngbin0 -> 616 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_go.pngbin0 -> 1415 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_go_search_api_holo_light.pngbin0 -> 1252 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_menu_moreoverflow_normal_holo_dark.pngbin0 -> 144 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_menu_moreoverflow_normal_holo_light.pngbin0 -> 148 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_menu_share_holo_dark.pngbin0 -> 467 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_menu_share_holo_light.pngbin0 -> 505 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_search.pngbin0 -> 2558 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_search_api_holo_light.pngbin0 -> 2271 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_voice_search.pngbin0 -> 2070 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_ic_voice_search_api_holo_light.pngbin0 -> 1833 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_list_divider_holo_dark.9.pngbin0 -> 78 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_list_divider_holo_light.9.pngbin0 -> 76 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_list_focused_holo.9.pngbin0 -> 191 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_list_longpressed_holo.9.pngbin0 -> 154 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_list_pressed_holo_dark.9.pngbin0 -> 159 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_list_pressed_holo_light.9.pngbin0 -> 159 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_list_selector_disabled_holo_dark.9.pngbin0 -> 189 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_list_selector_disabled_holo_light.9.pngbin0 -> 189 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_menu_dropdown_panel_holo_dark.9.pngbin0 -> 1273 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_menu_dropdown_panel_holo_light.9.pngbin0 -> 1289 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_menu_hardkey_panel_holo_dark.9.pngbin0 -> 875 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_menu_hardkey_panel_holo_light.9.pngbin0 -> 850 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_default_holo_dark.9.pngbin0 -> 316 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_default_holo_light.9.pngbin0 -> 318 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_disabled_holo_dark.9.pngbin0 -> 316 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_disabled_holo_light.9.pngbin0 -> 316 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_focused_holo_dark.9.pngbin0 -> 507 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_focused_holo_light.9.pngbin0 -> 510 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_pressed_holo_dark.9.pngbin0 -> 450 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_pressed_holo_light.9.pngbin0 -> 450 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_tab_selected_focused_holo.9.pngbin0 -> 147 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_tab_selected_holo.9.pngbin0 -> 148 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_tab_selected_pressed_holo.9.pngbin0 -> 147 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_tab_unselected_pressed_holo.9.pngbin0 -> 145 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_default_holo_dark.9.pngbin0 -> 110 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_default_holo_light.9.pngbin0 -> 105 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_right_default_holo_dark.9.pngbin0 -> 108 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_right_default_holo_light.9.pngbin0 -> 103 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_right_selected_holo_dark.9.pngbin0 -> 114 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_right_selected_holo_light.9.pngbin0 -> 111 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_selected_holo_dark.9.pngbin0 -> 114 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_selected_holo_light.9.pngbin0 -> 112 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ab_bottom_solid_dark_holo.9.pngbin0 -> 134 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ab_bottom_solid_light_holo.9.pngbin0 -> 134 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ab_bottom_transparent_dark_holo.9.pngbin0 -> 123 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ab_bottom_transparent_light_holo.9.pngbin0 -> 123 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ab_share_pack_holo_dark.9.pngbin0 -> 2851 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ab_share_pack_holo_light.9.pngbin0 -> 122 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ab_solid_dark_holo.9.pngbin0 -> 133 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ab_solid_light_holo.9.pngbin0 -> 133 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ab_stacked_solid_dark_holo.9.pngbin0 -> 134 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ab_stacked_solid_light_holo.9.pngbin0 -> 133 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ab_stacked_transparent_dark_holo.9.pngbin0 -> 127 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ab_stacked_transparent_light_holo.9.pngbin0 -> 123 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ab_transparent_dark_holo.9.pngbin0 -> 139 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ab_transparent_light_holo.9.pngbin0 -> 133 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_cab_background_bottom_holo_dark.9.pngbin0 -> 127 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_cab_background_bottom_holo_light.9.pngbin0 -> 124 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_cab_background_top_holo_dark.9.pngbin0 -> 130 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_cab_background_top_holo_light.9.pngbin0 -> 128 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_ab_back_holo_dark.pngbin0 -> 466 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_ab_back_holo_light.pngbin0 -> 438 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_cab_done_holo_dark.pngbin0 -> 566 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_cab_done_holo_light.pngbin0 -> 552 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_clear_disabled.pngbin0 -> 1775 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_clear_normal.pngbin0 -> 1869 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_clear_search_api_disabled_holo_light.pngbin0 -> 740 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_clear_search_api_holo_light.pngbin0 -> 743 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_commit_search_api_holo_dark.pngbin0 -> 511 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_commit_search_api_holo_light.pngbin0 -> 532 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_go.pngbin0 -> 1538 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_go_search_api_holo_light.pngbin0 -> 570 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_menu_moreoverflow_normal_holo_dark.pngbin0 -> 122 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_menu_moreoverflow_normal_holo_light.pngbin0 -> 131 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_menu_share_holo_dark.pngbin0 -> 332 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_menu_share_holo_light.pngbin0 -> 355 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_search.pngbin0 -> 2280 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_search_api_holo_light.pngbin0 -> 1541 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_voice_search.pngbin0 -> 1937 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_ic_voice_search_api_holo_light.pngbin0 -> 794 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_list_divider_holo_dark.9.pngbin0 -> 78 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_list_divider_holo_light.9.pngbin0 -> 76 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_list_focused_holo.9.pngbin0 -> 171 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_list_longpressed_holo.9.pngbin0 -> 151 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_list_pressed_holo_dark.9.pngbin0 -> 158 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_list_pressed_holo_light.9.pngbin0 -> 158 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_list_selector_disabled_holo_dark.9.pngbin0 -> 172 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_list_selector_disabled_holo_light.9.pngbin0 -> 171 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_menu_dropdown_panel_holo_dark.9.pngbin0 -> 839 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_menu_dropdown_panel_holo_light.9.pngbin0 -> 836 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_menu_hardkey_panel_holo_dark.9.pngbin0 -> 567 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_menu_hardkey_panel_holo_light.9.pngbin0 -> 562 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_default_holo_dark.9.pngbin0 -> 266 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_default_holo_light.9.pngbin0 -> 266 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_disabled_holo_dark.9.pngbin0 -> 262 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_disabled_holo_light.9.pngbin0 -> 262 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_focused_holo_dark.9.pngbin0 -> 407 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_focused_holo_light.9.pngbin0 -> 407 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_pressed_holo_dark.9.pngbin0 -> 348 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_pressed_holo_light.9.pngbin0 -> 348 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_tab_selected_focused_holo.9.pngbin0 -> 148 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_tab_selected_holo.9.pngbin0 -> 151 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_tab_selected_pressed_holo.9.pngbin0 -> 150 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_tab_unselected_pressed_holo.9.pngbin0 -> 155 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_default_holo_dark.9.pngbin0 -> 106 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_default_holo_light.9.pngbin0 -> 100 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_right_default_holo_dark.9.pngbin0 -> 105 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_right_default_holo_light.9.pngbin0 -> 98 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_right_selected_holo_dark.9.pngbin0 -> 107 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_right_selected_holo_light.9.pngbin0 -> 107 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_selected_holo_dark.9.pngbin0 -> 109 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_selected_holo_light.9.pngbin0 -> 109 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_bottom_solid_dark_holo.9.pngbin0 -> 165 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_bottom_solid_light_holo.9.pngbin0 -> 166 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_bottom_transparent_dark_holo.9.pngbin0 -> 153 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_bottom_transparent_light_holo.9.pngbin0 -> 152 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_share_pack_holo_dark.9.pngbin0 -> 2875 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_share_pack_holo_light.9.pngbin0 -> 2869 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_solid_dark_holo.9.pngbin0 -> 163 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_solid_light_holo.9.pngbin0 -> 163 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_stacked_solid_dark_holo.9.pngbin0 -> 163 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_stacked_solid_light_holo.9.pngbin0 -> 163 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_stacked_transparent_dark_holo.9.pngbin0 -> 158 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_stacked_transparent_light_holo.9.pngbin0 -> 152 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_transparent_dark_holo.9.pngbin0 -> 171 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_transparent_light_holo.9.pngbin0 -> 160 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_cab_background_bottom_holo_dark.9.pngbin0 -> 166 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_cab_background_bottom_holo_light.9.pngbin0 -> 161 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_cab_background_top_holo_dark.9.pngbin0 -> 174 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_cab_background_top_holo_light.9.pngbin0 -> 161 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_ab_back_holo_dark.pngbin0 -> 741 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_ab_back_holo_light.pngbin0 -> 661 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_cab_done_holo_dark.pngbin0 -> 970 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_cab_done_holo_light.pngbin0 -> 915 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_clear_disabled.pngbin0 -> 2531 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_clear_normal.pngbin0 -> 3299 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_clear_search_api_disabled_holo_light.pngbin0 -> 1315 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_clear_search_api_holo_light.pngbin0 -> 1447 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_commit_search_api_holo_dark.pngbin0 -> 703 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_commit_search_api_holo_light.pngbin0 -> 712 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_go.pngbin0 -> 1983 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_go_search_api_holo_light.pngbin0 -> 836 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_menu_moreoverflow_normal_holo_dark.pngbin0 -> 167 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_menu_moreoverflow_normal_holo_light.pngbin0 -> 184 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_menu_share_holo_dark.pngbin0 -> 699 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_menu_share_holo_light.pngbin0 -> 935 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_search.pngbin0 -> 3784 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_search_api_holo_light.pngbin0 -> 3037 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_voice_search.pngbin0 -> 3053 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_voice_search_api_holo_light.pngbin0 -> 1414 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_list_divider_holo_dark.9.pngbin0 -> 83 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_list_divider_holo_light.9.pngbin0 -> 83 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_list_focused_holo.9.pngbin0 -> 203 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_list_longpressed_holo.9.pngbin0 -> 158 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_list_pressed_holo_dark.9.pngbin0 -> 163 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_list_pressed_holo_light.9.pngbin0 -> 163 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_list_selector_disabled_holo_dark.9.pngbin0 -> 190 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_list_selector_disabled_holo_light.9.pngbin0 -> 188 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_menu_dropdown_panel_holo_dark.9.pngbin0 -> 1881 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_menu_dropdown_panel_holo_light.9.pngbin0 -> 1903 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_menu_hardkey_panel_holo_dark.9.pngbin0 -> 1220 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_menu_hardkey_panel_holo_light.9.pngbin0 -> 1178 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_default_holo_dark.9.pngbin0 -> 406 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_default_holo_light.9.pngbin0 -> 405 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_disabled_holo_dark.9.pngbin0 -> 393 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_disabled_holo_light.9.pngbin0 -> 393 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_focused_holo_dark.9.pngbin0 -> 659 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_focused_holo_light.9.pngbin0 -> 655 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_pressed_holo_dark.9.pngbin0 -> 582 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_pressed_holo_light.9.pngbin0 -> 583 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_tab_selected_focused_holo.9.pngbin0 -> 147 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_tab_selected_holo.9.pngbin0 -> 153 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_tab_selected_pressed_holo.9.pngbin0 -> 147 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_tab_unselected_pressed_holo.9.pngbin0 -> 149 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_default_holo_dark.9.pngbin0 -> 126 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_default_holo_light.9.pngbin0 -> 126 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_right_default_holo_dark.9.pngbin0 -> 125 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_right_default_holo_light.9.pngbin0 -> 127 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_right_selected_holo_dark.9.pngbin0 -> 128 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_right_selected_holo_light.9.pngbin0 -> 128 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_selected_holo_dark.9.pngbin0 -> 114 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_selected_holo_light.9.pngbin0 -> 126 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_bottom_solid_dark_holo.9.pngbin0 -> 330 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_bottom_solid_light_holo.9.pngbin0 -> 337 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_bottom_transparent_dark_holo.9.pngbin0 -> 332 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_bottom_transparent_light_holo.9.pngbin0 -> 322 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_share_pack_holo_dark.9.pngbin0 -> 326 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_share_pack_holo_light.9.pngbin0 -> 316 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_solid_dark_holo.9.pngbin0 -> 345 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_solid_light_holo.9.pngbin0 -> 344 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_stacked_solid_dark_holo.9.pngbin0 -> 336 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_stacked_solid_light_holo.9.pngbin0 -> 341 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_stacked_transparent_dark_holo.9.pngbin0 -> 335 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_stacked_transparent_light_holo.9.pngbin0 -> 333 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_transparent_dark_holo.9.pngbin0 -> 352 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_transparent_light_holo.9.pngbin0 -> 329 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_cab_background_bottom_holo_dark.9.pngbin0 -> 378 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_cab_background_bottom_holo_light.9.pngbin0 -> 374 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_cab_background_top_holo_dark.9.pngbin0 -> 334 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_cab_background_top_holo_light.9.pngbin0 -> 322 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_ab_back_holo_dark.pngbin0 -> 1411 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_ab_back_holo_light.pngbin0 -> 1170 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_cab_done_holo_dark.pngbin0 -> 2390 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_cab_done_holo_light.pngbin0 -> 1952 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_clear_disabled.pngbin0 -> 5693 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_clear_normal.pngbin0 -> 5578 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_clear_search_api_disabled_holo_light.pngbin0 -> 3569 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_clear_search_api_holo_light.pngbin0 -> 3948 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_commit_search_api_holo_dark.pngbin0 -> 1359 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_commit_search_api_holo_light.pngbin0 -> 1390 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_go.pngbin0 -> 3593 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_go_search_api_holo_light.pngbin0 -> 1884 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_menu_moreoverflow_normal_holo_dark.pngbin0 -> 637 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_menu_moreoverflow_normal_holo_light.pngbin0 -> 623 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_menu_share_holo_dark.pngbin0 -> 2810 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_menu_share_holo_light.pngbin0 -> 2683 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_search.pngbin0 -> 9655 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_search_api_holo_light.pngbin0 -> 5573 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_voice_search.pngbin0 -> 7179 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_voice_search_api_holo_light.pngbin0 -> 3844 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_divider_holo_dark.9.pngbin0 -> 134 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_divider_holo_light.9.pngbin0 -> 130 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_focused_holo.9.pngbin0 -> 227 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_longpressed_holo.9.pngbin0 -> 169 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_pressed_holo_dark.9.pngbin0 -> 174 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_pressed_holo_light.9.pngbin0 -> 174 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_selector_disabled_holo_dark.9.pngbin0 -> 302 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_selector_disabled_holo_light.9.pngbin0 -> 301 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_menu_dropdown_panel_holo_dark.9.pngbin0 -> 3331 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_menu_dropdown_panel_holo_light.9.pngbin0 -> 3386 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_menu_hardkey_panel_holo_dark.9.pngbin0 -> 2064 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_menu_hardkey_panel_holo_light.9.pngbin0 -> 2007 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_default_holo_dark.9.pngbin0 -> 668 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_default_holo_light.9.pngbin0 -> 668 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_disabled_holo_dark.9.pngbin0 -> 626 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_disabled_holo_light.9.pngbin0 -> 626 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_focused_holo_dark.9.pngbin0 -> 1145 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_focused_holo_light.9.pngbin0 -> 1162 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_pressed_holo_dark.9.pngbin0 -> 1019 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_pressed_holo_light.9.pngbin0 -> 1009 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_tab_selected_focused_holo.9.pngbin0 -> 152 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_tab_selected_holo.9.pngbin0 -> 157 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_tab_selected_pressed_holo.9.pngbin0 -> 152 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_tab_unselected_pressed_holo.9.pngbin0 -> 166 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_default_holo_dark.9.pngbin0 -> 239 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_default_holo_light.9.pngbin0 -> 233 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_right_default_holo_dark.9.pngbin0 -> 215 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_right_default_holo_light.9.pngbin0 -> 208 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_right_selected_holo_dark.9.pngbin0 -> 181 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_right_selected_holo_light.9.pngbin0 -> 181 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_selected_holo_dark.9.pngbin0 -> 190 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_selected_holo_light.9.pngbin0 -> 192 bytes
-rw-r--r--android-support-v7-appcompat/res/drawable/abc_ic_clear.xml22
-rw-r--r--android-support-v7-appcompat/res/drawable/abc_ic_clear_holo_light.xml22
-rw-r--r--android-support-v7-appcompat/res/drawable/abc_item_background_holo_dark.xml26
-rw-r--r--android-support-v7-appcompat/res/drawable/abc_item_background_holo_light.xml26
-rw-r--r--android-support-v7-appcompat/res/drawable/abc_list_selector_background_transition_holo_dark.xml20
-rw-r--r--android-support-v7-appcompat/res/drawable/abc_list_selector_background_transition_holo_light.xml20
-rw-r--r--android-support-v7-appcompat/res/drawable/abc_list_selector_holo_dark.xml27
-rw-r--r--android-support-v7-appcompat/res/drawable/abc_list_selector_holo_light.xml28
-rw-r--r--android-support-v7-appcompat/res/drawable/abc_search_dropdown_dark.xml22
-rw-r--r--android-support-v7-appcompat/res/drawable/abc_search_dropdown_light.xml22
-rw-r--r--android-support-v7-appcompat/res/drawable/abc_spinner_ab_holo_dark.xml25
-rw-r--r--android-support-v7-appcompat/res/drawable/abc_spinner_ab_holo_light.xml25
-rw-r--r--android-support-v7-appcompat/res/drawable/abc_tab_indicator_ab_holo.xml34
-rw-r--r--android-support-v7-appcompat/res/drawable/abc_textfield_searchview_holo_dark.xml22
-rw-r--r--android-support-v7-appcompat/res/drawable/abc_textfield_searchview_holo_light.xml22
-rw-r--r--android-support-v7-appcompat/res/drawable/abc_textfield_searchview_right_holo_dark.xml22
-rw-r--r--android-support-v7-appcompat/res/drawable/abc_textfield_searchview_right_holo_light.xml22
-rw-r--r--android-support-v7-appcompat/res/layout-v11/abc_action_bar_decor.xml27
-rw-r--r--android-support-v7-appcompat/res/layout-v11/abc_simple_decor.xml31
-rw-r--r--android-support-v7-appcompat/res/layout-v14/abc_activity_chooser_view.xml29
-rw-r--r--android-support-v7-appcompat/res/layout/abc_action_bar_decor.xml25
-rw-r--r--android-support-v7-appcompat/res/layout/abc_action_bar_decor_include.xml55
-rw-r--r--android-support-v7-appcompat/res/layout/abc_action_bar_decor_overlay.xml59
-rw-r--r--android-support-v7-appcompat/res/layout/abc_action_bar_home.xml38
-rw-r--r--android-support-v7-appcompat/res/layout/abc_action_bar_tab.xml22
-rw-r--r--android-support-v7-appcompat/res/layout/abc_action_bar_tabbar.xml22
-rw-r--r--android-support-v7-appcompat/res/layout/abc_action_bar_title_item.xml50
-rw-r--r--android-support-v7-appcompat/res/layout/abc_action_bar_view_list_nav_layout.xml23
-rw-r--r--android-support-v7-appcompat/res/layout/abc_action_menu_item_layout.xml30
-rw-r--r--android-support-v7-appcompat/res/layout/abc_action_menu_layout.xml24
-rw-r--r--android-support-v7-appcompat/res/layout/abc_action_mode_bar.xml24
-rw-r--r--android-support-v7-appcompat/res/layout/abc_action_mode_close_item.xml32
-rw-r--r--android-support-v7-appcompat/res/layout/abc_activity_chooser_view.xml29
-rw-r--r--android-support-v7-appcompat/res/layout/abc_activity_chooser_view_include.xml68
-rw-r--r--android-support-v7-appcompat/res/layout/abc_activity_chooser_view_list_item.xml52
-rw-r--r--android-support-v7-appcompat/res/layout/abc_expanded_menu_layout.xml21
-rw-r--r--android-support-v7-appcompat/res/layout/abc_list_menu_item_checkbox.xml26
-rw-r--r--android-support-v7-appcompat/res/layout/abc_list_menu_item_icon.xml28
-rw-r--r--android-support-v7-appcompat/res/layout/abc_list_menu_item_layout.xml58
-rw-r--r--android-support-v7-appcompat/res/layout/abc_list_menu_item_radio.xml24
-rw-r--r--android-support-v7-appcompat/res/layout/abc_popup_menu_item_layout.xml61
-rw-r--r--android-support-v7-appcompat/res/layout/abc_search_dropdown_item_icons_2line.xml89
-rw-r--r--android-support-v7-appcompat/res/layout/abc_search_view.xml159
-rw-r--r--android-support-v7-appcompat/res/layout/abc_simple_decor.xml31
-rw-r--r--android-support-v7-appcompat/res/layout/support_simple_spinner_dropdown_item.xml25
-rw-r--r--android-support-v7-appcompat/res/values-af/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-am/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-ar/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-bg/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-ca/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-cs/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-da/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-de/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-el/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-en-rGB/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-en-rIN/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-es-rUS/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-es/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-et-rEE/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-fa/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-fi/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-fr-rCA/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-fr/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-hi/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-hr/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-hu/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-hy-rAM/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-in/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-it/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-iw/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-ja/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-ka-rGE/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-km-rKH/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-ko/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-land/bools.xml20
-rw-r--r--android-support-v7-appcompat/res/values-land/config.xml18
-rw-r--r--android-support-v7-appcompat/res/values-land/dimens.xml32
-rw-r--r--android-support-v7-appcompat/res/values-large-v14/themes_base.xml25
-rw-r--r--android-support-v7-appcompat/res/values-large/bools.xml20
-rw-r--r--android-support-v7-appcompat/res/values-large/config.xml30
-rw-r--r--android-support-v7-appcompat/res/values-large/dimens.xml38
-rw-r--r--android-support-v7-appcompat/res/values-large/themes_base.xml25
-rw-r--r--android-support-v7-appcompat/res/values-lo-rLA/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-lt/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-lv/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-mn-rMN/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-ms-rMY/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-nb/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-nl/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-pl/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-pt-rPT/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-pt/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-ro/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-ru/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-sk/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-sl/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-sr/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-sv/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-sw/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-sw600dp/config.xml25
-rw-r--r--android-support-v7-appcompat/res/values-sw600dp/dimens.xml34
-rw-r--r--android-support-v7-appcompat/res/values-th/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-tl/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-tr/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-uk/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-v11/styles_base.xml44
-rw-r--r--android-support-v7-appcompat/res/values-v11/themes_base.xml93
-rw-r--r--android-support-v7-appcompat/res/values-v14/styles_base.xml228
-rw-r--r--android-support-v7-appcompat/res/values-v14/themes_base.xml174
-rw-r--r--android-support-v7-appcompat/res/values-vi/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-w360dp/dimens.xml22
-rw-r--r--android-support-v7-appcompat/res/values-w480dp/bools.xml19
-rw-r--r--android-support-v7-appcompat/res/values-w480dp/config.xml18
-rw-r--r--android-support-v7-appcompat/res/values-w500dp/dimens.xml22
-rw-r--r--android-support-v7-appcompat/res/values-w600dp/dimens.xml40
-rw-r--r--android-support-v7-appcompat/res/values-w720dp/bools.xml19
-rw-r--r--android-support-v7-appcompat/res/values-xlarge/bools.xml19
-rw-r--r--android-support-v7-appcompat/res/values-xlarge/dimens.xml55
-rw-r--r--android-support-v7-appcompat/res/values-zh-rCN/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-zh-rHK/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-zh-rTW/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values-zu/strings.xml32
-rw-r--r--android-support-v7-appcompat/res/values/attrs.xml575
-rw-r--r--android-support-v7-appcompat/res/values/bools.xml23
-rw-r--r--android-support-v7-appcompat/res/values/colors.xml20
-rw-r--r--android-support-v7-appcompat/res/values/config.xml34
-rw-r--r--android-support-v7-appcompat/res/values/dimens.xml75
-rw-r--r--android-support-v7-appcompat/res/values/ids.xml23
-rw-r--r--android-support-v7-appcompat/res/values/strings.xml48
-rw-r--r--android-support-v7-appcompat/res/values/styles.xml245
-rw-r--r--android-support-v7-appcompat/res/values/styles_base.xml404
-rw-r--r--android-support-v7-appcompat/res/values/themes.xml200
-rw-r--r--android-support-v7-appcompat/res/values/themes_base.xml253
-rw-r--r--android-support-v7-appcompat/src/.readme2
-rw-r--r--build.gradle27
-rw-r--r--cgeo-calendar/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--cgeo-calendar/build.gradle29
-rw-r--r--cgeo-calendar/project.properties2
-rw-r--r--cgeo-calendar/src/cgeo/calendar/CalendarActivity.java4
-rw-r--r--cgeo-contacts/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--cgeo-contacts/build.gradle31
-rw-r--r--cgeo-contacts/cgeo-contacts.iml1
-rw-r--r--cgeo-contacts/project.properties2
-rw-r--r--cgeo-contacts/res/values-nb/strings.xml1
-rw-r--r--cgeo-contacts/src/cgeo/contacts/ContactsActivity.java10
-rw-r--r--cgeo.iml12
-rw-r--r--gradle.properties2
-rw-r--r--gradle/wrapper/gradle-wrapper.jarbin0 -> 49896 bytes
-rw-r--r--gradle/wrapper/gradle-wrapper.properties6
-rw-r--r--gradlew164
-rw-r--r--gradlew.bat90
-rw-r--r--main/.factorypath2
-rw-r--r--main/.settings/org.eclipse.jdt.core.prefs43
-rw-r--r--main/.settings/org.eclipse.jdt.ui.prefs14
-rw-r--r--main/AndroidManifest.xml68
-rw-r--r--main/build.gradle360
-rw-r--r--main/build.xml2
-rw-r--r--main/cgeo.iml1
-rw-r--r--main/compile-libs/findbugs-ant.jarbin29442 -> 31118 bytes
-rw-r--r--main/libs/android-support-v4.jarbin627582 -> 0 bytes
-rw-r--r--main/libs/butterknife-5.0.0.jarbin44197 -> 0 bytes
-rw-r--r--main/libs/butterknife-5.1.1.jarbin0 -> 45897 bytes
-rw-r--r--main/libs/rxjava-android-0.19.6.jar (renamed from main/libs/rxjava-android-0.17.6.jar)bin36208 -> 35201 bytes
-rw-r--r--main/libs/rxjava-android-0.19.6.jar.properties2
-rw-r--r--main/libs/rxjava-async-util-0.17.6.jarbin47317 -> 0 bytes
-rw-r--r--main/libs/rxjava-async-util-0.19.6.jarbin0 -> 47677 bytes
-rw-r--r--main/libs/rxjava-async-util-0.19.6.jar.properties2
-rw-r--r--main/libs/rxjava-core-0.17.6.jarbin743153 -> 0 bytes
-rw-r--r--main/libs/rxjava-core-0.19.6.jarbin0 -> 635914 bytes
-rw-r--r--main/libs/rxjava-core-0.19.6.jar.properties2
-rw-r--r--main/libs/src/rxjava-android-0.19.6-javadoc.jarbin0 -> 78283 bytes
-rw-r--r--main/libs/src/rxjava-android-0.19.6-sources.jarbin0 -> 15756 bytes
-rw-r--r--main/libs/src/rxjava-async-util-0.19.6-javadoc.jarbin0 -> 62129 bytes
-rw-r--r--main/libs/src/rxjava-async-util-0.19.6-sources.jarbin0 -> 15553 bytes
-rw-r--r--main/libs/src/rxjava-core-0.19.6-javadoc.jarbin0 -> 796349 bytes
-rw-r--r--main/libs/src/rxjava-core-0.19.6-sources.jarbin0 -> 342298 bytes
-rw-r--r--main/lint.xml5
-rw-r--r--main/proguard-project.txt6
-rw-r--r--main/project.properties3
-rwxr-xr-xmain/project/libraries/update-libs.sh33
-rw-r--r--main/res/drawable-hdpi/actionbar_dark_bg_main.9.pngbin0 -> 2875 bytes
-rw-r--r--main/res/drawable-hdpi/actionbar_home.pngbin447 -> 0 bytes
-rw-r--r--main/res/drawable-hdpi/actionbar_map.pngbin1215 -> 0 bytes
-rw-r--r--main/res/drawable-hdpi/actionbar_mylocation_off.pngbin1451 -> 0 bytes
-rw-r--r--main/res/drawable-hdpi/actionbar_mylocation_on.pngbin1434 -> 0 bytes
-rw-r--r--main/res/drawable-hdpi/actionbar_search.pngbin641 -> 0 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_account_list.pngbin3662 -> 1557 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_add.pngbin3765 -> 2194 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_agenda.pngbin3000 -> 1376 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_clear_playlist.pngbin2512 -> 1763 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_compass.pngbin5882 -> 2069 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_delete.pngbin2343 -> 1413 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_edit.pngbin2310 -> 1931 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_emoticons.pngbin3062 -> 2044 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_info_details.pngbin3080 -> 1983 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_mapmode.pngbin2985 -> 1858 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_mark.pngbin3834 -> 1369 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_mylocation.pngbin0 -> 2088 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_myplaces.pngbin3138 -> 1582 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_preferences.pngbin3401 -> 1851 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_recent_history.pngbin4616 -> 2171 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_refresh.pngbin4174 -> 2025 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_rotate.pngbin4672 -> 2265 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_save.pngbin2189 -> 1248 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_set_as.pngbin3187 -> 1388 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_share.pngbin3706 -> 1823 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_sort_alphabetically.pngbin3079 -> 1521 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_sort_by_size.pngbin1460 -> 0 bytes
-rw-r--r--main/res/drawable-hdpi/ic_menu_start_conversation.pngbin2717 -> 1650 bytes
-rw-r--r--main/res/drawable-ldpi/actionbar_home.pngbin521 -> 0 bytes
-rw-r--r--main/res/drawable-ldpi/actionbar_map.pngbin612 -> 0 bytes
-rw-r--r--main/res/drawable-ldpi/actionbar_mylocation_off.pngbin561 -> 0 bytes
-rw-r--r--main/res/drawable-ldpi/actionbar_mylocation_on.pngbin571 -> 0 bytes
-rw-r--r--main/res/drawable-ldpi/actionbar_search.pngbin455 -> 0 bytes
-rw-r--r--main/res/drawable-ldpi/ic_menu_account_list.pngbin1347 -> 0 bytes
-rw-r--r--main/res/drawable-ldpi/ic_menu_clear_playlist.pngbin1509 -> 0 bytes
-rw-r--r--main/res/drawable-ldpi/ic_menu_mark.pngbin1322 -> 0 bytes
-rw-r--r--main/res/drawable-ldpi/ic_menu_more.pngbin1595 -> 0 bytes
-rw-r--r--main/res/drawable-ldpi/ic_menu_start_conversation.pngbin1293 -> 0 bytes
-rw-r--r--main/res/drawable-mdpi/actionbar_dark_bg_main.9.pngbin0 -> 2862 bytes
-rw-r--r--main/res/drawable-mdpi/actionbar_home.pngbin706 -> 0 bytes
-rw-r--r--main/res/drawable-mdpi/actionbar_map.pngbin886 -> 0 bytes
-rw-r--r--main/res/drawable-mdpi/actionbar_mylocation_off.pngbin912 -> 0 bytes
-rw-r--r--main/res/drawable-mdpi/actionbar_mylocation_on.pngbin919 -> 0 bytes
-rw-r--r--main/res/drawable-mdpi/actionbar_search.pngbin668 -> 0 bytes
-rw-r--r--main/res/drawable-mdpi/ic_launcher_browser.pngbin0 -> 7151 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_account_list.pngbin2394 -> 1164 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_add.pngbin2017 -> 1339 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_agenda.pngbin4805 -> 1010 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_attachment.pngbin0 -> 1132 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_clear_playlist.pngbin2281 -> 1163 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_compass.pngbin3943 -> 1252 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_copy.pngbin0 -> 758 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_delete.pngbin1747 -> 967 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_edit.pngbin1661 -> 1198 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_emoticons.pngbin2056 -> 1283 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_info_details.pngbin2128 -> 1237 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_mapmode.pngbin1923 -> 1168 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_mark.pngbin2519 -> 955 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_my_calendar.pngbin0 -> 1037 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_mylocation.pngbin0 -> 1216 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_mylocation_off.pngbin0 -> 1255 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_myplaces.pngbin2011 -> 1089 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_preferences.pngbin2315 -> 1142 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_recent_history.pngbin2647 -> 1293 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_refresh.pngbin2450 -> 1278 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_rotate.pngbin2477 -> 1368 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_save.pngbin1645 -> 981 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_send.pngbin0 -> 920 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_set_as.pngbin1828 -> 941 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_share.pngbin2194 -> 1154 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_sort_alphabetically.pngbin2077 -> 948 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_sort_by_size.pngbin1067 -> 0 bytes
-rw-r--r--main/res/drawable-mdpi/ic_menu_start_conversation.pngbin1715 -> 1104 bytes
-rw-r--r--main/res/drawable-mdpi/image_no_placement.pngbin147 -> 169 bytes
-rw-r--r--main/res/drawable-xhdpi/actionbar_dark_bg_main.9.pngbin0 -> 2889 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_launcher_browser.pngbin0 -> 21981 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_account_list.pngbin0 -> 2266 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_add.pngbin0 -> 3061 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_agenda.pngbin0 -> 1702 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_clear_playlist.pngbin0 -> 2314 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_compass.pngbin0 -> 2980 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_delete.pngbin0 -> 1880 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_edit.pngbin0 -> 2656 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_emoticons.pngbin0 -> 2786 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_info_details.pngbin0 -> 2763 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_mapmode.pngbin0 -> 2583 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_mark.pngbin0 -> 1821 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_mylocation.pngbin0 -> 2923 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_mylocation_off.pngbin0 -> 2681 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_myplaces.pngbin0 -> 2109 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_preferences.pngbin0 -> 2507 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_recent_history.pngbin0 -> 3001 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_refresh.pngbin0 -> 2857 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_rotate.pngbin0 -> 3113 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_save.pngbin0 -> 1546 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_set_as.pngbin0 -> 1805 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_share.pngbin0 -> 2422 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_sort_alphabetically.pngbin0 -> 2133 bytes
-rw-r--r--main/res/drawable-xhdpi/ic_menu_start_conversation.pngbin0 -> 2130 bytes
-rw-r--r--main/res/drawable-xxhdpi/actionbar_dark_bg_main.9.pngbin0 -> 2953 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_launcher_browser.pngbin0 -> 37607 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_account_list.pngbin0 -> 3396 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_add.pngbin0 -> 4740 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_agenda.pngbin0 -> 2463 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_clear_playlist.pngbin0 -> 3781 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_compass.pngbin0 -> 5567 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_delete.pngbin0 -> 2989 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_edit.pngbin0 -> 4817 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_emoticons.pngbin0 -> 4889 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_info_details.pngbin0 -> 4891 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_mapmode.pngbin0 -> 4427 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_mark.pngbin0 -> 3323 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_mylocation.pngbin0 -> 5172 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_mylocation_off.pngbin0 -> 6610 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_myplaces.pngbin0 -> 3694 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_preferences.pngbin0 -> 4407 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_recent_history.pngbin0 -> 5050 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_refresh.pngbin0 -> 4734 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_rotate.pngbin0 -> 5218 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_save.pngbin0 -> 2043 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_set_as.pngbin0 -> 3224 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_share.pngbin0 -> 4075 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_sort_alphabetically.pngbin0 -> 3844 bytes
-rw-r--r--main/res/drawable-xxhdpi/ic_menu_start_conversation.pngbin0 -> 3660 bytes
-rw-r--r--main/res/drawable/favorite_background_dark.xml4
-rw-r--r--main/res/drawable/favorite_background_green_dark.xml4
-rw-r--r--main/res/drawable/favorite_background_green_light.xml4
-rw-r--r--main/res/drawable/favorite_background_light.xml4
-rw-r--r--main/res/drawable/favorite_background_orange_dark.xml4
-rw-r--r--main/res/drawable/favorite_background_orange_light.xml4
-rw-r--r--main/res/drawable/favorite_background_red_dark.xml4
-rw-r--r--main/res/drawable/favorite_background_red_light.xml4
-rw-r--r--main/res/drawable/ic_menu_myposition.xml5
-rw-r--r--main/res/drawable/inventory_background_dark.xml4
-rw-r--r--main/res/drawable/inventory_background_light.xml4
-rw-r--r--main/res/layout-land/compass_activity.xml196
-rw-r--r--main/res/layout-land/coordinatesinput_dialog.xml312
-rw-r--r--main/res/layout-v11/actionbar_maps.xml7
-rw-r--r--main/res/layout/about_help_page.xml16
-rw-r--r--main/res/layout/actionbar.xml7
-rw-r--r--main/res/layout/actionbar_button_compass.xml15
-rw-r--r--main/res/layout/actionbar_button_map.xml13
-rw-r--r--main/res/layout/actionbar_button_myposition.xml12
-rw-r--r--main/res/layout/actionbar_button_search.xml13
-rw-r--r--main/res/layout/actionbar_maps.xml50
-rw-r--r--main/res/layout/actionbar_popup.xml32
-rw-r--r--main/res/layout/actionbar_progress.xml5
-rw-r--r--main/res/layout/actionbar_title.xml16
-rw-r--r--main/res/layout/actionbar_title_no_home.xml10
-rw-r--r--main/res/layout/addresslist_activity.xml8
-rw-r--r--main/res/layout/authorization_activity.xml82
-rw-r--r--main/res/layout/cachedetail_activity.xml9
-rw-r--r--main/res/layout/cachedetail_inventory_page.xml4
-rw-r--r--main/res/layout/cachedetail_waypoints_page.xml6
-rw-r--r--main/res/layout/cachelist_spinneritem.xml32
-rw-r--r--main/res/layout/cacheslist_activity.xml15
-rw-r--r--main/res/layout/cacheslist_item.xml4
-rw-r--r--main/res/layout/compass_activity.xml199
-rw-r--r--main/res/layout/coordinatesinput_dialog.xml320
-rw-r--r--main/res/layout/editwaypoint_activity.xml182
-rw-r--r--main/res/layout/gpx.xml8
-rw-r--r--main/res/layout/images_activity.xml2
-rw-r--r--main/res/layout/imageselect_activity.xml185
-rw-r--r--main/res/layout/internal_browser.xml12
-rw-r--r--main/res/layout/logcache_activity.xml295
-rw-r--r--main/res/layout/logs_page.xml6
-rw-r--r--main/res/layout/logtrackable_activity.xml132
-rw-r--r--main/res/layout/main_activity.xml15
-rw-r--r--main/res/layout/map_google.xml9
-rw-r--r--main/res/layout/map_mapsforge.xml9
-rw-r--r--main/res/layout/map_mapsforge_old.xml9
-rw-r--r--main/res/layout/navigateanypoint_activity.xml6
-rw-r--r--main/res/layout/popup.xml17
-rw-r--r--main/res/layout/recaptcha_dialog.xml2
-rw-r--r--main/res/layout/search_activity.xml334
-rw-r--r--main/res/layout/simple_dir_chooser.xml14
-rw-r--r--main/res/layout/staticmaps_activity.xml26
-rw-r--r--main/res/layout/text_preference.xml15
-rw-r--r--main/res/layout/usefulapps_activity.xml8
-rw-r--r--main/res/layout/viewpager_activity.xml4
-rw-r--r--main/res/layout/waypoint_popup.xml7
-rw-r--r--main/res/layout/wp_threshold_preference.xml16
-rw-r--r--main/res/menu/abstract_logging_activity.xml39
-rw-r--r--main/res/menu/cache_list_context.xml22
-rw-r--r--main/res/menu/cache_list_options.xml87
-rw-r--r--main/res/menu/cache_options.xml59
-rw-r--r--main/res/menu/compass_activity_options.xml53
-rw-r--r--main/res/menu/details_context.xml20
-rw-r--r--main/res/menu/images_list_context.xml5
-rw-r--r--main/res/menu/logging_ui.xml5
-rw-r--r--main/res/menu/main_activity_options.xml36
-rw-r--r--main/res/menu/map_activity.xml54
-rw-r--r--main/res/menu/navigate_any_point_activity_options.xml15
-rw-r--r--main/res/menu/search_activity_options.xml7
-rw-r--r--main/res/menu/static_maps_activity_options.xml4
-rw-r--r--main/res/menu/trackable_activity.xml7
-rw-r--r--main/res/menu/waypoint_options.xml3
-rw-r--r--main/res/values-ca/strings.xml113
-rw-r--r--main/res/values-cs/strings.xml185
-rw-r--r--main/res/values-da/strings.xml21
-rw-r--r--main/res/values-de/strings.xml129
-rw-r--r--main/res/values-es/strings.xml66
-rw-r--r--main/res/values-fr/strings.xml118
-rw-r--r--main/res/values-hu/strings.xml34
-rw-r--r--main/res/values-it/strings.xml116
-rw-r--r--main/res/values-ja/strings.xml76
-rw-r--r--main/res/values-lt/strings.xml133
-rw-r--r--main/res/values-nb/strings.xml110
-rw-r--r--main/res/values-nl/strings.xml128
-rw-r--r--main/res/values-pl/strings.xml110
-rw-r--r--main/res/values-pt/strings.xml96
-rw-r--r--main/res/values-ro/strings.xml63
-rw-r--r--main/res/values-sk/strings.xml100
-rw-r--r--main/res/values-sl/strings.xml104
-rw-r--r--main/res/values-sv/strings.xml118
-rw-r--r--main/res/values-v11/themes.xml22
-rw-r--r--main/res/values/attrs.xml4
-rw-r--r--main/res/values/changelog_master.xml31
-rw-r--r--main/res/values/dimens.xml4
-rw-r--r--main/res/values/preference_keys.xml19
-rw-r--r--main/res/values/strings.xml71
-rw-r--r--main/res/values/strings_not_translatable.xml53
-rw-r--r--main/res/values/styles.xml16
-rw-r--r--main/res/values/themes.xml192
-rw-r--r--main/res/xml/preferences.xml117
-rw-r--r--main/src/cgeo/calendar/CalendarAddon.java5
-rw-r--r--main/src/cgeo/contacts/ContactsAddon.java5
-rw-r--r--main/src/cgeo/geocaching/AboutActivity.java40
-rw-r--r--main/src/cgeo/geocaching/AbstractDialogFragment.java356
-rw-r--r--main/src/cgeo/geocaching/AbstractLoggingActivity.java36
-rw-r--r--main/src/cgeo/geocaching/AbstractPopupActivity.java260
-rw-r--r--main/src/cgeo/geocaching/CacheCache.java4
-rw-r--r--main/src/cgeo/geocaching/CacheDetailActivity.java872
-rw-r--r--main/src/cgeo/geocaching/CacheListActivity.java493
-rw-r--r--main/src/cgeo/geocaching/CacheListSpinnerAdapter.java68
-rw-r--r--main/src/cgeo/geocaching/CacheMenuHandler.java47
-rw-r--r--main/src/cgeo/geocaching/CachePopup.java206
-rw-r--r--main/src/cgeo/geocaching/CachePopupFragment.java230
-rw-r--r--main/src/cgeo/geocaching/CgeoApplication.java38
-rw-r--r--main/src/cgeo/geocaching/CompassActivity.java56
-rw-r--r--main/src/cgeo/geocaching/CreateShortcutActivity.java6
-rw-r--r--main/src/cgeo/geocaching/DataStore.java433
-rw-r--r--main/src/cgeo/geocaching/EditWaypointActivity.java37
-rw-r--r--main/src/cgeo/geocaching/Geocache.java248
-rw-r--r--main/src/cgeo/geocaching/ImageSelectActivity.java4
-rw-r--r--main/src/cgeo/geocaching/ImagesActivity.java6
-rw-r--r--main/src/cgeo/geocaching/LogCacheActivity.java292
-rw-r--r--main/src/cgeo/geocaching/LogEntry.java4
-rw-r--r--main/src/cgeo/geocaching/LogTrackableActivity.java101
-rw-r--r--main/src/cgeo/geocaching/MainActivity.java104
-rw-r--r--main/src/cgeo/geocaching/NavigateAnyPointActivity.java108
-rw-r--r--main/src/cgeo/geocaching/PocketQueryList.java7
-rw-r--r--main/src/cgeo/geocaching/SearchActivity.java45
-rw-r--r--main/src/cgeo/geocaching/SearchResult.java39
-rw-r--r--main/src/cgeo/geocaching/SelectMapfileActivity.java5
-rw-r--r--main/src/cgeo/geocaching/StaticMapsActivity.java28
-rw-r--r--main/src/cgeo/geocaching/StaticMapsProvider.java216
-rw-r--r--main/src/cgeo/geocaching/StatusFragment.java14
-rw-r--r--main/src/cgeo/geocaching/Trackable.java4
-rw-r--r--main/src/cgeo/geocaching/TrackableActivity.java203
-rw-r--r--main/src/cgeo/geocaching/UsefulAppsActivity.java22
-rw-r--r--main/src/cgeo/geocaching/Waypoint.java42
-rw-r--r--main/src/cgeo/geocaching/WaypointPopup.java136
-rw-r--r--main/src/cgeo/geocaching/WaypointPopupFragment.java147
-rw-r--r--main/src/cgeo/geocaching/activity/AbstractActionBarActivity.java34
-rw-r--r--main/src/cgeo/geocaching/activity/AbstractActivity.java93
-rw-r--r--main/src/cgeo/geocaching/activity/AbstractListActivity.java26
-rw-r--r--main/src/cgeo/geocaching/activity/AbstractViewPagerActivity.java58
-rw-r--r--main/src/cgeo/geocaching/activity/ActionBarListActivity.java34
-rw-r--r--main/src/cgeo/geocaching/activity/ActivityMixin.java116
-rw-r--r--main/src/cgeo/geocaching/activity/IAbstractActivity.java3
-rw-r--r--main/src/cgeo/geocaching/activity/SimpleWebviewActivity.java32
-rw-r--r--main/src/cgeo/geocaching/apps/AbstractLocusApp.java4
-rw-r--r--main/src/cgeo/geocaching/apps/cache/CacheBeaconApp.java18
-rw-r--r--main/src/cgeo/geocaching/apps/cache/GccApp.java28
-rw-r--r--main/src/cgeo/geocaching/apps/cache/WhereYouGoApp.java22
-rw-r--r--main/src/cgeo/geocaching/apps/cache/navi/AbstractStaticMapsApp.java8
-rw-r--r--main/src/cgeo/geocaching/apps/cache/navi/DownloadStaticMapsApp.java10
-rw-r--r--main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java32
-rw-r--r--main/src/cgeo/geocaching/apps/cache/navi/NavigonApp.java4
-rw-r--r--main/src/cgeo/geocaching/apps/cache/navi/RMapsApp.java2
-rw-r--r--main/src/cgeo/geocaching/apps/cache/navi/StaticMapApp.java10
-rw-r--r--main/src/cgeo/geocaching/apps/cachelist/CacheListAppFactory.java2
-rw-r--r--main/src/cgeo/geocaching/compatibility/AndroidLevel11.java17
-rw-r--r--main/src/cgeo/geocaching/compatibility/AndroidLevel11Emulation.java15
-rw-r--r--main/src/cgeo/geocaching/compatibility/AndroidLevel11Interface.java8
-rw-r--r--main/src/cgeo/geocaching/compatibility/Compatibility.java24
-rw-r--r--main/src/cgeo/geocaching/concurrent/BlockingThreadPool.java2
-rw-r--r--main/src/cgeo/geocaching/connector/AbstractConnector.java6
-rw-r--r--main/src/cgeo/geocaching/connector/ConnectorFactory.java17
-rw-r--r--main/src/cgeo/geocaching/connector/ec/ECApi.java4
-rw-r--r--main/src/cgeo/geocaching/connector/ec/ECConnector.java2
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCConnector.java6
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCConstants.java1
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCLogin.java20
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCMap.java109
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCParser.java408
-rw-r--r--main/src/cgeo/geocaching/connector/gc/IconDecoder.java2
-rw-r--r--main/src/cgeo/geocaching/connector/gc/RecaptchaHandler.java26
-rw-r--r--main/src/cgeo/geocaching/connector/gc/Tile.java55
-rw-r--r--main/src/cgeo/geocaching/connector/gc/UncertainProperty.java (renamed from main/src/cgeo/geocaching/utils/UncertainProperty.java)3
-rw-r--r--main/src/cgeo/geocaching/connector/oc/OCApiLiveConnector.java28
-rw-r--r--main/src/cgeo/geocaching/connector/oc/OCAuthParams.java10
-rw-r--r--main/src/cgeo/geocaching/connector/oc/OkapiClient.java99
-rw-r--r--main/src/cgeo/geocaching/enumerations/CacheAttribute.java4
-rw-r--r--main/src/cgeo/geocaching/enumerations/CacheSize.java2
-rw-r--r--main/src/cgeo/geocaching/enumerations/CacheType.java6
-rw-r--r--main/src/cgeo/geocaching/enumerations/LoadFlags.java38
-rw-r--r--main/src/cgeo/geocaching/enumerations/LogType.java4
-rw-r--r--main/src/cgeo/geocaching/enumerations/WaypointType.java4
-rw-r--r--main/src/cgeo/geocaching/export/ExportFactory.java67
-rw-r--r--main/src/cgeo/geocaching/export/FieldnoteExport.java28
-rw-r--r--main/src/cgeo/geocaching/export/GpxExport.java41
-rw-r--r--main/src/cgeo/geocaching/export/GpxSerializer.java6
-rw-r--r--main/src/cgeo/geocaching/files/AbstractFileListActivity.java8
-rw-r--r--main/src/cgeo/geocaching/files/FileParser.java8
-rw-r--r--main/src/cgeo/geocaching/files/FileType.java8
-rw-r--r--main/src/cgeo/geocaching/files/FileTypeDetector.java77
-rw-r--r--main/src/cgeo/geocaching/files/GPXImporter.java103
-rw-r--r--main/src/cgeo/geocaching/files/GPXParser.java22
-rw-r--r--main/src/cgeo/geocaching/files/LocParser.java17
-rw-r--r--main/src/cgeo/geocaching/files/LocalStorage.java2
-rw-r--r--main/src/cgeo/geocaching/files/SimpleDirChooser.java84
-rw-r--r--main/src/cgeo/geocaching/filter/AbstractFilter.java2
-rw-r--r--main/src/cgeo/geocaching/filter/AttributeFilter.java2
-rw-r--r--main/src/cgeo/geocaching/filter/DifficultyFilter.java2
-rw-r--r--main/src/cgeo/geocaching/filter/DistanceFilter.java2
-rw-r--r--main/src/cgeo/geocaching/filter/FilterUserInterface.java6
-rw-r--r--main/src/cgeo/geocaching/filter/OriginFilter.java2
-rw-r--r--main/src/cgeo/geocaching/filter/PopularityFilter.java2
-rw-r--r--main/src/cgeo/geocaching/filter/PopularityRatioFilter.java19
-rw-r--r--main/src/cgeo/geocaching/filter/SizeFilter.java2
-rw-r--r--main/src/cgeo/geocaching/filter/StateFilter.java16
-rw-r--r--main/src/cgeo/geocaching/filter/TerrainFilter.java2
-rw-r--r--main/src/cgeo/geocaching/filter/TypeFilter.java2
-rw-r--r--main/src/cgeo/geocaching/gcvote/GCVote.java39
-rw-r--r--main/src/cgeo/geocaching/geopoint/Geopoint.java11
-rw-r--r--main/src/cgeo/geocaching/geopoint/Units.java13
-rw-r--r--main/src/cgeo/geocaching/list/AbstractList.java6
-rw-r--r--main/src/cgeo/geocaching/list/PseudoList.java31
-rw-r--r--main/src/cgeo/geocaching/list/StoredList.java75
-rw-r--r--main/src/cgeo/geocaching/loaders/OfflineGeocacheListLoader.java22
-rw-r--r--main/src/cgeo/geocaching/maps/AbstractMap.java9
-rw-r--r--main/src/cgeo/geocaching/maps/CGeoMap.java970
-rw-r--r--main/src/cgeo/geocaching/maps/CachesOverlay.java8
-rw-r--r--main/src/cgeo/geocaching/maps/MapProviderFactory.java6
-rw-r--r--main/src/cgeo/geocaching/maps/PositionAndScaleOverlay.java7
-rw-r--r--main/src/cgeo/geocaching/maps/PositionDrawer.java10
-rw-r--r--main/src/cgeo/geocaching/maps/PositionHistory.java2
-rw-r--r--main/src/cgeo/geocaching/maps/ScaleDrawer.java9
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleCacheOverlay.java (renamed from main/src/cgeo/geocaching/maps/google/GoogleCacheOverlay.java)2
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleCacheOverlayItem.java (renamed from main/src/cgeo/geocaching/maps/google/GoogleCacheOverlayItem.java)2
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleGeoPoint.java (renamed from main/src/cgeo/geocaching/maps/google/GoogleGeoPoint.java)2
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleMapActivity.java (renamed from main/src/cgeo/geocaching/maps/google/GoogleMapActivity.java)14
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleMapController.java (renamed from main/src/cgeo/geocaching/maps/google/GoogleMapController.java)2
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleMapItemFactory.java (renamed from main/src/cgeo/geocaching/maps/google/GoogleMapItemFactory.java)2
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleMapProjection.java (renamed from main/src/cgeo/geocaching/maps/google/GoogleMapProjection.java)2
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleMapProvider.java (renamed from main/src/cgeo/geocaching/maps/google/GoogleMapProvider.java)2
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleMapView.java (renamed from main/src/cgeo/geocaching/maps/google/GoogleMapView.java)18
-rw-r--r--main/src/cgeo/geocaching/maps/google/v1/GoogleOverlay.java (renamed from main/src/cgeo/geocaching/maps/google/GoogleOverlay.java)7
-rw-r--r--main/src/cgeo/geocaching/maps/interfaces/MapActivityImpl.java3
-rw-r--r--main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java3
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapActivity.java6
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapProvider.java2
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java12
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/MapsforgeOverlay.java5
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapActivity024.java6
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapView024.java12
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeOverlay.java5
-rw-r--r--main/src/cgeo/geocaching/network/HtmlImage.java111
-rw-r--r--main/src/cgeo/geocaching/network/OAuth.java2
-rw-r--r--main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java2
-rw-r--r--main/src/cgeo/geocaching/network/StatusUpdater.java10
-rw-r--r--main/src/cgeo/geocaching/search/AutoCompleteAdapter.java17
-rw-r--r--main/src/cgeo/geocaching/search/SearchSuggestionCursor.java46
-rw-r--r--main/src/cgeo/geocaching/search/SuggestionProvider.java16
-rw-r--r--main/src/cgeo/geocaching/sensors/DirectionProvider.java42
-rw-r--r--main/src/cgeo/geocaching/sensors/GeoDataProvider.java18
-rw-r--r--main/src/cgeo/geocaching/settings/AbstractCheckCredentialsPreference.java39
-rw-r--r--main/src/cgeo/geocaching/settings/CheckECCredentialsPreference.java6
-rw-r--r--main/src/cgeo/geocaching/settings/CheckGcCredentialsPreference.java4
-rw-r--r--main/src/cgeo/geocaching/settings/OAuthPreference.java13
-rw-r--r--main/src/cgeo/geocaching/settings/OCPreferenceKeys.java17
-rw-r--r--main/src/cgeo/geocaching/settings/RegisterSend2CgeoPreference.java8
-rw-r--r--main/src/cgeo/geocaching/settings/Settings.java94
-rw-r--r--main/src/cgeo/geocaching/settings/SettingsActivity.java160
-rw-r--r--main/src/cgeo/geocaching/settings/TemplateTextPreference.java32
-rw-r--r--main/src/cgeo/geocaching/settings/TextPreference.java20
-rw-r--r--main/src/cgeo/geocaching/settings/WpThresholdPreference.java24
-rw-r--r--main/src/cgeo/geocaching/sorting/ComparatorUserInterface.java122
-rw-r--r--main/src/cgeo/geocaching/sorting/DateComparator.java2
-rw-r--r--main/src/cgeo/geocaching/sorting/PopularityRatioComparator.java6
-rw-r--r--main/src/cgeo/geocaching/sorting/SortActionProvider.java153
-rw-r--r--main/src/cgeo/geocaching/ui/AbstractCachingListViewPageViewCreator.java1
-rw-r--r--main/src/cgeo/geocaching/ui/AbstractCachingPageViewCreator.java11
-rw-r--r--main/src/cgeo/geocaching/ui/AbstractUserClickListener.java2
-rw-r--r--main/src/cgeo/geocaching/ui/AddressListAdapter.java6
-rw-r--r--main/src/cgeo/geocaching/ui/CacheDetailsCreator.java39
-rw-r--r--main/src/cgeo/geocaching/ui/CacheListAdapter.java113
-rw-r--r--main/src/cgeo/geocaching/ui/CompassView.java65
-rw-r--r--main/src/cgeo/geocaching/ui/EditNoteDialog.java33
-rw-r--r--main/src/cgeo/geocaching/ui/FileSelectionListAdapter.java14
-rw-r--r--main/src/cgeo/geocaching/ui/GPXListAdapter.java12
-rw-r--r--main/src/cgeo/geocaching/ui/HtmlImageCounter.java19
-rw-r--r--main/src/cgeo/geocaching/ui/ImagesList.java26
-rw-r--r--main/src/cgeo/geocaching/ui/LoggingUI.java4
-rw-r--r--main/src/cgeo/geocaching/ui/WeakReferenceHandler.java2
-rw-r--r--main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java191
-rw-r--r--main/src/cgeo/geocaching/ui/dialog/CustomProgressDialog.java33
-rw-r--r--main/src/cgeo/geocaching/ui/dialog/DateDialog.java46
-rw-r--r--main/src/cgeo/geocaching/ui/dialog/Dialogs.java79
-rw-r--r--main/src/cgeo/geocaching/ui/dialog/LiveMapInfoDialogBuilder.java11
-rw-r--r--main/src/cgeo/geocaching/ui/dialog/NoTitleDialog.java32
-rw-r--r--main/src/cgeo/geocaching/ui/logs/CacheLogsViewCreator.java4
-rw-r--r--main/src/cgeo/geocaching/ui/logs/LogsViewCreator.java61
-rw-r--r--main/src/cgeo/geocaching/utils/AsyncTaskWithProgress.java17
-rw-r--r--main/src/cgeo/geocaching/utils/DatabaseBackupUtils.java13
-rw-r--r--main/src/cgeo/geocaching/utils/DebugUtils.java37
-rw-r--r--main/src/cgeo/geocaching/utils/Formatter.java (renamed from main/src/cgeo/geocaching/ui/Formatter.java)10
-rw-r--r--main/src/cgeo/geocaching/utils/HtmlUtils.java2
-rw-r--r--main/src/cgeo/geocaching/utils/ImageUtils.java53
-rw-r--r--main/src/cgeo/geocaching/utils/LazyInitializedList.java2
-rw-r--r--main/src/cgeo/geocaching/utils/LeastRecentlyUsedSet.java8
-rw-r--r--main/src/cgeo/geocaching/utils/Log.java17
-rw-r--r--main/src/cgeo/geocaching/utils/LogTemplateProvider.java63
-rw-r--r--main/src/cgeo/geocaching/utils/MapUtils.java126
-rw-r--r--main/src/cgeo/geocaching/utils/OOMDumpingUncaughtExceptionHandler.java79
-rw-r--r--main/src/cgeo/geocaching/utils/RxUtils.java14
-rw-r--r--main/src/cgeo/geocaching/utils/ShareUtils.java27
-rw-r--r--main/src/cgeo/geocaching/utils/SimpleCancellableHandler.java4
-rw-r--r--main/src/cgeo/geocaching/utils/SimpleHandler.java4
-rw-r--r--main/src/cgeo/geocaching/utils/TextUtils.java20
-rw-r--r--main/src/cgeo/geocaching/utils/TranslationUtils.java4
-rw-r--r--main/templates/keys.xml4
-rw-r--r--main/thirdparty/android/support/v4/app/FragmentListActivity.java77
-rw-r--r--main/thirdparty/com/viewpagerindicator/TitlePageIndicator.java138
-rw-r--r--main/version.properties21
-rw-r--r--mapswithme-api/.settings/org.eclipse.jdt.core.prefs4
-rw-r--r--mapswithme-api/build.gradle2
-rw-r--r--mapswithme-api/mapswithme-api.iml1
-rw-r--r--send2cgeo/chrome-extension/manifest.json17
-rw-r--r--send2cgeo/chrome-extension/send2cgeo.48.pngbin0 -> 4077 bytes
-rw-r--r--send2cgeo/chrome-extension/send2cgeo.64.pngbin0 -> 5970 bytes
-rw-r--r--send2cgeo/chrome-extension/send2cgeo.user.js107
-rw-r--r--send2cgeo/send2cgeo.user.js18
-rw-r--r--settings.gradle5
-rw-r--r--tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/lint.xml5
-rw-r--r--tests/proguard-project.txt56
-rw-r--r--tests/project.properties2
-rw-r--r--tests/src/cgeo/CGeoTestCase.java2
-rw-r--r--tests/src/cgeo/geocaching/CgeoApplicationTest.java9
-rw-r--r--tests/src/cgeo/geocaching/DataStoreTest.java14
-rw-r--r--tests/src/cgeo/geocaching/StaticMapsProviderTest.java7
-rw-r--r--tests/src/cgeo/geocaching/apps/cache/WhereYouGoAppTest.java15
-rw-r--r--tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java10
-rw-r--r--tests/src/cgeo/geocaching/connector/gc/GCParserTest.java14
-rw-r--r--tests/src/cgeo/geocaching/connector/gc/TrackablesTest.java4
-rw-r--r--tests/src/cgeo/geocaching/connector/gc/UncertainPropertyTest.java (renamed from tests/src/cgeo/geocaching/utils/UncertainPropertyTest.java)4
-rw-r--r--tests/src/cgeo/geocaching/connector/oc/OkapiClientTest.java14
-rw-r--r--tests/src/cgeo/geocaching/export/ExportTest.java4
-rw-r--r--tests/src/cgeo/geocaching/files/FileTypeDetectorTest.java52
-rw-r--r--tests/src/cgeo/geocaching/files/GPXParserTest.java24
-rw-r--r--tests/src/cgeo/geocaching/files/InvalidXMLCharacterFilterReaderTest.java1
-rw-r--r--tests/src/cgeo/geocaching/filter/StateNotFoundFilterTest.java28
-rw-r--r--tests/src/cgeo/geocaching/geopoint/GeoPointFormatterTest.java4
-rw-r--r--tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java2
-rw-r--r--tests/src/cgeo/geocaching/geopoint/UnitsTest.java12
-rw-r--r--tests/src/cgeo/geocaching/geopoint/ViewportTest.java4
-rw-r--r--tests/src/cgeo/geocaching/settings/TestSettings.java4
-rw-r--r--tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java9
-rw-r--r--tests/src/cgeo/geocaching/test/mock/GC2CJPF.java2
-rw-r--r--tests/src/cgeo/geocaching/test/mock/MockedCache.java1
-rw-r--r--tests/src/cgeo/geocaching/twitter/TwitterTest.java12
-rw-r--r--tests/src/cgeo/geocaching/utils/FormatterTest.java (renamed from tests/src/cgeo/geocaching/ui/FormatterTest.java)3
-rw-r--r--tests/src/cgeo/geocaching/utils/LogTemplateProviderTest.java46
-rw-r--r--tests/src/cgeo/geocaching/utils/TextUtilsTest.java6
963 files changed, 16982 insertions, 7673 deletions
diff --git a/.gitignore b/.gitignore
index 0cdff83..96d98d0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,4 +19,9 @@ org.moreunit.prefs
/main/project/attributes/drawable-mdpi/
/main/project/attributes/iconlist1res.html
/main/project/settings/drawable-mdpi/
-.directory \ No newline at end of file
+.directory
+.gradle/
+.idea/libraries/
+main/build/
+mapswithme-api/build/
+build
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
index cab819f..7cd87fc 100644
--- a/.idea/codeStyleSettings.xml
+++ b/.idea/codeStyleSettings.xml
@@ -3,12 +3,66 @@
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
+ <option name="GENERATE_FINAL_LOCALS" value="true" />
+ <option name="GENERATE_FINAL_PARAMETERS" value="true" />
+ <option name="INSERT_INNER_CLASS_IMPORTS" value="true" />
+ <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="50" />
+ <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="50" />
+ <option name="IMPORT_LAYOUT_TABLE">
+ <value>
+ <package name="" withSubpackages="true" static="true" />
+ <emptyLine />
+ <package name="butterknife" withSubpackages="true" static="false" />
+ <emptyLine />
+ <package name="cgeo" withSubpackages="true" static="false" />
+ <emptyLine />
+ <package name="ch" withSubpackages="true" static="false" />
+ <emptyLine />
+ <package name="com" withSubpackages="true" static="false" />
+ <emptyLine />
+ <package name="edu" withSubpackages="true" static="false" />
+ <emptyLine />
+ <package name="menion" withSubpackages="true" static="false" />
+ <emptyLine />
+ <package name="org" withSubpackages="true" static="false" />
+ <emptyLine />
+ <package name="rx" withSubpackages="true" static="false" />
+ <emptyLine />
+ <package name="" withSubpackages="true" static="false" />
+ <emptyLine />
+ <package name="android" withSubpackages="true" static="false" />
+ <emptyLine />
+ <package name="java" withSubpackages="true" static="false" />
+ <emptyLine />
+ <package name="javax" withSubpackages="true" static="false" />
+ <emptyLine />
+ </value>
+ </option>
+ <option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" />
+ <option name="JD_PARAM_DESCRIPTION_ON_NEW_LINE" value="true" />
+ <option name="WRAP_COMMENTS" value="true" />
<XML>
+ <option name="XML_KEEP_LINE_BREAKS" value="false" />
+ <option name="XML_ALIGN_ATTRIBUTES" value="false" />
+ <option name="XML_SPACE_INSIDE_EMPTY_TAG" value="true" />
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
+ <codeStyleSettings language="Groovy">
+ <option name="PARENT_SETTINGS_INSTALLED" value="true" />
+ </codeStyleSettings>
+ <codeStyleSettings language="JAVA">
+ <option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
+ <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
+ <option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="1" />
+ </codeStyleSettings>
+ <codeStyleSettings language="XML">
+ <indentOptions>
+ <option name="CONTINUATION_INDENT_SIZE" value="4" />
+ </indentOptions>
+ </codeStyleSettings>
</value>
</option>
- <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default (1)" />
+ <option name="USE_PER_PROJECT_SETTINGS" value="true" />
</component>
</project>
diff --git a/.idea/inspectionProfiles/c_geo_standards.xml b/.idea/inspectionProfiles/c_geo_standards.xml
index 68f0977..cf3d2fb 100644
--- a/.idea/inspectionProfiles/c_geo_standards.xml
+++ b/.idea/inspectionProfiles/c_geo_standards.xml
@@ -39,9 +39,9 @@
<inspection_tool class="ConfusingElse" enabled="true" level="WARNING" enabled_by_default="true">
<option name="reportWhenNoStatementFollow" value="false" />
</inspection_tool>
- <inspection_tool class="ConstantConditions" enabled="false" level="WARNING" enabled_by_default="false">
- <option name="SUGGEST_NULLABLE_ANNOTATIONS" value="true" />
- <option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="false" />
+ <inspection_tool class="ConstantConditions" enabled="true" level="WARNING" enabled_by_default="true">
+ <option name="SUGGEST_NULLABLE_ANNOTATIONS" value="false" />
+ <option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="true" />
</inspection_tool>
<inspection_tool class="DefaultNotLastCaseInSwitch" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="Deprecation" enabled="true" level="WARNING" enabled_by_default="true">
@@ -145,6 +145,10 @@
<inspection_tool class="ListenerMayUseAdapter" enabled="true" level="WARNING" enabled_by_default="true">
<option name="checkForEmptyMethods" value="true" />
</inspection_tool>
+ <inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
+ <option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
+ <option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
+ </inspection_tool>
<inspection_tool class="LoopConditionNotUpdatedInsideLoop" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreIterators" value="false" />
</inspection_tool>
@@ -180,6 +184,11 @@
<option name="REPORT_ANNOTATION_NOT_PROPAGATED_TO_OVERRIDERS" value="true" />
<option name="REPORT_NULLS_PASSED_TO_NON_ANNOTATED_METHOD" value="true" />
</inspection_tool>
+ <inspection_tool class="ObjectEquality" enabled="true" level="WARNING" enabled_by_default="true">
+ <option name="m_ignoreEnums" value="true" />
+ <option name="m_ignoreClassObjects" value="false" />
+ <option name="m_ignorePrivateConstructors" value="false" />
+ </inspection_tool>
<inspection_tool class="ObsoleteCollection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreRequiredObsoleteCollectionTypes" value="false" />
</inspection_tool>
@@ -197,6 +206,12 @@
<option name="myAdditionalRequiredHtmlAttributes" value="" />
</inspection_tool>
<inspection_tool class="ReturnFromFinallyBlock" enabled="false" level="WARNING" enabled_by_default="false" />
+ <inspection_tool class="ReturnNull" enabled="false" level="WEAK WARNING" enabled_by_default="false">
+ <option name="m_reportObjectMethods" value="true" />
+ <option name="m_reportArrayMethods" value="true" />
+ <option name="m_reportCollectionMethods" value="true" />
+ <option name="m_ignorePrivateMethods" value="false" />
+ </inspection_tool>
<inspection_tool class="SameParameterValue" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SameReturnValue" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SimplifiableEqualsExpression" enabled="true" level="WARNING" enabled_by_default="true" />
@@ -209,6 +224,7 @@
</inspection_tool>
<inspection_tool class="StringBufferReplaceableByString" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="StringBufferToStringInConcatenation" enabled="true" level="WARNING" enabled_by_default="true" />
+ <inspection_tool class="StringConcatenationInFormatCall" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="StringConstructor" enabled="false" level="WARNING" enabled_by_default="false">
<option name="ignoreSubstringArguments" value="false" />
</inspection_tool>
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 7f13329..3ee65a0 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -30,7 +30,7 @@
<component name="ProjectResources">
<default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
</component>
- <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="Android 4.4.2 Google APIs" project-jdk-type="Android SDK">
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" assert-keyword="true" jdk-15="true" project-jdk-name="Android 4.4.2 Google APIs" project-jdk-type="Android SDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 8a12661..aa26ebf 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -2,6 +2,7 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
+ <module fileurl="file://$PROJECT_DIR$/android-support-v7-appcompat/android-support-v7-appcompat.iml" filepath="$PROJECT_DIR$/android-support-v7-appcompat/android-support-v7-appcompat.iml" />
<module fileurl="file://$PROJECT_DIR$/main/cgeo.iml" filepath="$PROJECT_DIR$/main/cgeo.iml" />
<module fileurl="file://$PROJECT_DIR$/cgeo-calendar/cgeo-calendar.iml" filepath="$PROJECT_DIR$/cgeo-calendar/cgeo-calendar.iml" />
<module fileurl="file://$PROJECT_DIR$/cgeo-contacts/cgeo-contacts.iml" filepath="$PROJECT_DIR$/cgeo-contacts/cgeo-contacts.iml" />
diff --git a/README.md b/README.md
index 51fe4a5..e51e890 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
-[c:geo](http://www.cgeo.org) is a simple yet powerful unofficial geocaching client for Android devices. In contrast to other similar applications, c:geo doesn't require a web browser nor file exports. You can just go geocaching with your phone and without any home preparation or worries. Of course, you can go without paying - it's free.
+[c:geo](http://www.cgeo.org) is an open source, full-featured, always ready-to-go client for geocaching.com (unofficial) and offers basic support for other geocaching platforms.
+It does not require a web browser or exports - just download and start right away.
You want to contribute?
-----------------------
@@ -53,9 +54,9 @@ If the workspace directory name contains a space and leads to errors in the -dex
5. edit `local.properties` (see comments in the file)
6. copy `./main/templates/keys.xml` to `./main/res/values/`
7. edit `./main/res/values/keys.xml` and insert several keys (see comments in the file)
-7.a) Google Maps API key
-7.b) request your personal consumer key and secret at [opencaching.de OKAPI signup](http://www.opencaching.de/okapi/signup.html)
-7.c) request your personal consumer key and secret at [opencaching.pl OKAPI signup](http://www.opencaching.pl/okapi/signup.html)
+ * Google Maps API key (you can leave it empty, but then Google Maps don't work)
+ * request your personal consumer key and secret at [opencaching.de OKAPI signup](http://www.opencaching.de/okapi/signup.html)
+ * request your personal consumer key and secret at [opencaching.pl OKAPI signup](http://www.opencaching.pl/okapi/signup.html)
### Building with Ant ###
diff --git a/android-support-v7-appcompat/.classpath b/android-support-v7-appcompat/.classpath
new file mode 100644
index 0000000..fb2265b
--- /dev/null
+++ b/android-support-v7-appcompat/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+ <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
+ <classpathentry exported="true" kind="lib" path="libs/android-support-v4.jar"/>
+ <classpathentry exported="true" kind="lib" path="libs/android-support-v7-appcompat.jar"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="output" path="bin/classes"/>
+</classpath>
diff --git a/android-support-v7-appcompat/.project b/android-support-v7-appcompat/.project
new file mode 100644
index 0000000..957d33d
--- /dev/null
+++ b/android-support-v7-appcompat/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>android-support-v7-appcompat</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ApkBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/android-support-v7-appcompat/.settings/org.eclipse.jdt.core.prefs b/android-support-v7-appcompat/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..48ab4c6
--- /dev/null
+++ b/android-support-v7-appcompat/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/android-support-v7-appcompat/AndroidManifest.xml b/android-support-v7-appcompat/AndroidManifest.xml
new file mode 100644
index 0000000..dac4cb2
--- /dev/null
+++ b/android-support-v7-appcompat/AndroidManifest.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.support.v7.appcompat">
+ <uses-sdk android:minSdkVersion="7"/>
+ <application />
+</manifest>
diff --git a/android-support-v7-appcompat/README.txt b/android-support-v7-appcompat/README.txt
new file mode 100644
index 0000000..8e8de05
--- /dev/null
+++ b/android-support-v7-appcompat/README.txt
@@ -0,0 +1,10 @@
+Library Project including compatibility ActionBar.
+
+This can be used by an Android project to provide
+access to ActionBar on applications running on API 7+.
+
+There is technically no source, but the src folder is necessary
+to ensure that the build system works. The content is actually
+located in libs/android-support-v7-appcompat.jar.
+The accompanying resources must also be included in the application.
+
diff --git a/android-support-v7-appcompat/android-support-v7-appcompat.iml b/android-support-v7-appcompat/android-support-v7-appcompat.iml
new file mode 100644
index 0000000..ca339e4
--- /dev/null
+++ b/android-support-v7-appcompat/android-support-v7-appcompat.iml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="EclipseModuleManager" forced_jdk="true">
+ <libelement value="jar://$MODULE_DIR$/libs/android-support-v4.jar!/" />
+ <libelement value="jar://$MODULE_DIR$/libs/android-support-v7-appcompat.jar!/" />
+ <conelement value="com.android.ide.eclipse.adt.DEPENDENCIES" />
+ <src_description expected_position="4">
+ <src_folder value="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK" expected_position="0" />
+ <src_folder value="com.android.ide.eclipse.adt.LIBRARIES" expected_position="1" />
+ <src_folder value="file://$MODULE_DIR$/src" expected_position="5" />
+ <src_folder value="file://$MODULE_DIR$/gen" expected_position="6" />
+ </src_description>
+ </component>
+ <component name="FacetManager">
+ <facet type="android" name="Android">
+ <configuration>
+ <option name="LIBRARY_PROJECT" value="true" />
+ </configuration>
+ </facet>
+ </component>
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/bin/classes" />
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
+ </content>
+ <orderEntry type="jdk" jdkName="Android API 19 Platform" jdkType="Android SDK" />
+ <orderEntry type="module-library" exported="">
+ <library name="android-support-v4.jar">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/libs/android-support-v4.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="android-support-v7-appcompat.jar">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/libs/android-support-v7-appcompat.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
+
diff --git a/android-support-v7-appcompat/build.xml b/android-support-v7-appcompat/build.xml
new file mode 100644
index 0000000..0764010
--- /dev/null
+++ b/android-support-v7-appcompat/build.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="android-support-v7-appcompat" 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-support-v7-appcompat/libs/android-support-v4.jar b/android-support-v7-appcompat/libs/android-support-v4.jar
new file mode 100644
index 0000000..187bdf4
--- /dev/null
+++ b/android-support-v7-appcompat/libs/android-support-v4.jar
Binary files differ
diff --git a/android-support-v7-appcompat/libs/android-support-v7-appcompat.jar b/android-support-v7-appcompat/libs/android-support-v7-appcompat.jar
new file mode 100644
index 0000000..e352c0b
--- /dev/null
+++ b/android-support-v7-appcompat/libs/android-support-v7-appcompat.jar
Binary files differ
diff --git a/android-support-v7-appcompat/lint.xml b/android-support-v7-appcompat/lint.xml
new file mode 100644
index 0000000..9fffd8d
--- /dev/null
+++ b/android-support-v7-appcompat/lint.xml
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<lint>
+ <issue id="AdapterViewChildren" severity="ignore" />
+ <issue id="AllowBackup" severity="ignore" />
+ <issue id="AlwaysShowAction" severity="ignore" />
+ <issue id="ButtonCase" severity="ignore" />
+ <issue id="ButtonOrder" severity="ignore" />
+ <issue id="ButtonStyle" severity="ignore" />
+ <issue id="CommitPrefEdits" severity="ignore" />
+ <issue id="CommitTransaction" severity="ignore" />
+ <issue id="ContentDescription" severity="ignore" />
+ <issue id="CutPasteId" severity="ignore" />
+ <issue id="DalvikOverride" severity="ignore" />
+ <issue id="DefaultLocale" severity="ignore" />
+ <issue id="Deprecated" severity="ignore" />
+ <issue id="DeviceAdmin" severity="ignore" />
+ <issue id="DisableBaselineAlignment" severity="ignore" />
+ <issue id="DrawAllocation" severity="ignore" />
+ <issue id="DuplicateActivity" severity="ignore" />
+ <issue id="DuplicateDefinition" severity="ignore" />
+ <issue id="DuplicateIds" severity="ignore" />
+ <issue id="DuplicateIncludedIds" severity="ignore" />
+ <issue id="DuplicateUsesFeature" severity="ignore" />
+ <issue id="EnforceUTF8" severity="ignore" />
+ <issue id="ExportedContentProvider" severity="ignore" />
+ <issue id="ExportedReceiver" severity="ignore" />
+ <issue id="ExportedService" severity="ignore" />
+ <issue id="ExtraText" severity="ignore" />
+ <issue id="ExtraTranslation" severity="ignore" />
+ <issue id="FloatMath" severity="ignore" />
+ <issue id="GifUsage" severity="ignore" />
+ <issue id="GradleOverrides" severity="ignore" />
+ <issue id="GrantAllUris" severity="ignore" />
+ <issue id="GridLayout" severity="ignore" />
+ <issue id="HandlerLeak" severity="ignore" />
+ <issue id="HardcodedDebugMode" severity="ignore" />
+ <issue id="HardcodedText" severity="ignore" />
+ <issue id="IconColors" severity="ignore" />
+ <issue id="IconDensities" severity="ignore" />
+ <issue id="IconDipSize" severity="ignore" />
+ <issue id="IconDuplicates" severity="ignore" />
+ <issue id="IconDuplicatesConfig" severity="ignore" />
+ <issue id="IconExtension" severity="ignore" />
+ <issue id="IconLauncherShape" severity="ignore" />
+ <issue id="IconLocation" severity="ignore" />
+ <issue id="IconMissingDensityFolder" severity="ignore" />
+ <issue id="IconMixedNinePatch" severity="ignore" />
+ <issue id="IconNoDpi" severity="ignore" />
+ <issue id="IconXmlAndPng" severity="ignore" />
+ <issue id="IllegalResourceRef" severity="ignore" />
+ <issue id="InOrMmUsage" severity="ignore" />
+ <issue id="InconsistentArrays" severity="ignore" />
+ <issue id="InconsistentLayout" severity="ignore" />
+ <issue id="InefficientWeight" severity="ignore" />
+ <issue id="InlinedApi" severity="ignore" />
+ <issue id="InnerclassSeparator" severity="ignore" />
+ <issue id="Instantiatable" severity="ignore" />
+ <issue id="InvalidId" severity="ignore" />
+ <issue id="InvalidPackage" severity="ignore" />
+ <issue id="JavascriptInterface" severity="ignore" />
+ <issue id="LabelFor" severity="ignore" />
+ <issue id="LibraryCustomView" severity="ignore" />
+ <issue id="LocalSuppress" severity="ignore" />
+ <issue id="MangledCRLF" severity="ignore" />
+ <issue id="ManifestOrder" severity="ignore" />
+ <issue id="ManifestTypo" severity="ignore" />
+ <issue id="MenuTitle" severity="ignore" />
+ <issue id="MergeRootFrame" severity="ignore" />
+ <issue id="MissingApplicationIcon" severity="ignore" />
+ <issue id="MissingId" severity="ignore" />
+ <issue id="MissingPrefix" severity="ignore" />
+ <issue id="MissingQuantity" severity="ignore" />
+ <issue id="MissingRegistered" severity="ignore" />
+ <issue id="MissingSuperCall" severity="ignore" />
+ <issue id="MissingTranslation" severity="ignore" />
+ <issue id="MissingVersion" severity="ignore" />
+ <issue id="MockLocation" severity="ignore" />
+ <issue id="MultipleUsesSdk" severity="ignore" />
+ <issue id="NamespaceTypo" severity="ignore" />
+ <issue id="NestedScrolling" severity="ignore" />
+ <issue id="NestedWeights" severity="ignore" />
+ <issue id="NewApi" severity="ignore" />
+ <issue id="NotSibling" severity="ignore" />
+ <issue id="ObsoleteLayoutParam" severity="ignore" />
+ <issue id="OldTargetApi" severity="ignore" />
+ <issue id="OnClick" severity="ignore" />
+ <issue id="Orientation" severity="ignore" />
+ <issue id="Overdraw" severity="ignore" />
+ <issue id="Override" severity="ignore" />
+ <issue id="PackagedPrivateKey" severity="ignore" />
+ <issue id="ParcelCreator" severity="ignore" />
+ <issue id="PrivateResource" severity="ignore" />
+ <issue id="Proguard" severity="ignore" />
+ <issue id="ProguardSplit" severity="ignore" />
+ <issue id="ProtectedPermissions" severity="ignore" />
+ <issue id="PxUsage" severity="ignore" />
+ <issue id="Recycle" severity="ignore" />
+ <issue id="Registered" severity="ignore" />
+ <issue id="RequiredSize" severity="ignore" />
+ <issue id="ResAuto" severity="ignore" />
+ <issue id="ResourceAsColor" severity="ignore" />
+ <issue id="ScrollViewCount" severity="ignore" />
+ <issue id="ScrollViewSize" severity="ignore" />
+ <issue id="SdCardPath" severity="ignore" />
+ <issue id="SecureRandom" severity="ignore" />
+ <issue id="ServiceCast" severity="ignore" />
+ <issue id="SetJavaScriptEnabled" severity="ignore" />
+ <issue id="ShowToast" severity="ignore" />
+ <issue id="SimpleDateFormat" severity="ignore" />
+ <issue id="SmallSp" severity="ignore" />
+ <issue id="SpUsage" severity="ignore" />
+ <issue id="StateListReachable" severity="ignore" />
+ <issue id="StringFormatCount" severity="ignore" />
+ <issue id="StringFormatInvalid" severity="ignore" />
+ <issue id="StringFormatMatches" severity="ignore" />
+ <issue id="StyleCycle" severity="ignore" />
+ <issue id="Suspicious0dp" severity="ignore" />
+ <issue id="SuspiciousImport" severity="ignore" />
+ <issue id="TextFields" severity="ignore" />
+ <issue id="TextViewEdits" severity="ignore" />
+ <issue id="TooDeepLayout" severity="ignore" />
+ <issue id="TooManyViews" severity="ignore" />
+ <issue id="TrulyRandom" severity="ignore" />
+ <issue id="TypographyDashes" severity="ignore" />
+ <issue id="TypographyEllipsis" severity="ignore" />
+ <issue id="TypographyFractions" severity="ignore" />
+ <issue id="TypographyOther" severity="ignore" />
+ <issue id="Typos" severity="ignore" />
+ <issue id="UniquePermission" severity="ignore" />
+ <issue id="UnknownId" severity="ignore" />
+ <issue id="UnknownIdInLayout" severity="ignore" />
+ <issue id="UnlocalizedSms" severity="ignore" />
+ <issue id="UnusedNamespace" severity="ignore" />
+ <issue id="UnusedQuantity" severity="ignore" />
+ <issue id="UnusedResources" severity="ignore" />
+ <issue id="UseCheckPermission" severity="ignore" />
+ <issue id="UseCompoundDrawables" severity="ignore" />
+ <issue id="UseSparseArrays" severity="ignore" />
+ <issue id="UseValueOf" severity="ignore" />
+ <issue id="UselessLeaf" severity="ignore" />
+ <issue id="UselessParent" severity="ignore" />
+ <issue id="UsesMinSdkAttributes" severity="ignore" />
+ <issue id="ValidFragment" severity="ignore" />
+ <issue id="ViewConstructor" severity="ignore" />
+ <issue id="ViewTag" severity="ignore" />
+ <issue id="Wakelock" severity="ignore" />
+ <issue id="WorldReadableFiles" severity="ignore" />
+ <issue id="WorldWriteableFiles" severity="ignore" />
+ <issue id="WrongCall" severity="ignore" />
+ <issue id="WrongCase" severity="ignore" />
+ <issue id="WrongFolder" severity="ignore" />
+ <issue id="WrongManifestParent" severity="ignore" />
+ <issue id="WrongViewCast" severity="ignore" />
+</lint> \ No newline at end of file
diff --git a/android-support-v7-appcompat/proguard-project.txt b/android-support-v7-appcompat/proguard-project.txt
new file mode 100644
index 0000000..f2fe155
--- /dev/null
+++ b/android-support-v7-appcompat/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-support-v7-appcompat/project.properties b/android-support-v7-appcompat/project.properties
new file mode 100644
index 0000000..91d2b02
--- /dev/null
+++ b/android-support-v7-appcompat/project.properties
@@ -0,0 +1,15 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+target=android-19
+android.library=true
diff --git a/android-support-v7-appcompat/res/anim/abc_fade_in.xml b/android-support-v7-appcompat/res/anim/abc_fade_in.xml
new file mode 100644
index 0000000..da7ee29
--- /dev/null
+++ b/android-support-v7-appcompat/res/anim/abc_fade_in.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+
+<alpha xmlns:android="http://schemas.android.com/apk/res/android"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:fromAlpha="0.0" android:toAlpha="1.0"
+ android:duration="@android:integer/config_mediumAnimTime" /> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/anim/abc_fade_out.xml b/android-support-v7-appcompat/res/anim/abc_fade_out.xml
new file mode 100644
index 0000000..c81b39a
--- /dev/null
+++ b/android-support-v7-appcompat/res/anim/abc_fade_out.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+
+<alpha xmlns:android="http://schemas.android.com/apk/res/android"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:fromAlpha="1.0" android:toAlpha="0.0"
+ android:duration="@android:integer/config_mediumAnimTime" /> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/anim/abc_slide_in_bottom.xml b/android-support-v7-appcompat/res/anim/abc_slide_in_bottom.xml
new file mode 100644
index 0000000..1afa8fe
--- /dev/null
+++ b/android-support-v7-appcompat/res/anim/abc_slide_in_bottom.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:fromYDelta="50%p" android:toYDelta="0"
+ android:duration="@android:integer/config_mediumAnimTime"/>
diff --git a/android-support-v7-appcompat/res/anim/abc_slide_in_top.xml b/android-support-v7-appcompat/res/anim/abc_slide_in_top.xml
new file mode 100644
index 0000000..ab824f2
--- /dev/null
+++ b/android-support-v7-appcompat/res/anim/abc_slide_in_top.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:fromYDelta="-50%p" android:toYDelta="0"
+ android:duration="@android:integer/config_mediumAnimTime"/> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/anim/abc_slide_out_bottom.xml b/android-support-v7-appcompat/res/anim/abc_slide_out_bottom.xml
new file mode 100644
index 0000000..b309fe8
--- /dev/null
+++ b/android-support-v7-appcompat/res/anim/abc_slide_out_bottom.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+ android:interpolator="@android:anim/accelerate_interpolator"
+ android:fromYDelta="0" android:toYDelta="50%p"
+ android:duration="@android:integer/config_mediumAnimTime"/> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/anim/abc_slide_out_top.xml b/android-support-v7-appcompat/res/anim/abc_slide_out_top.xml
new file mode 100644
index 0000000..e84d1c7
--- /dev/null
+++ b/android-support-v7-appcompat/res/anim/abc_slide_out_top.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+ android:interpolator="@android:anim/accelerate_interpolator"
+ android:fromYDelta="0" android:toYDelta="-50%p"
+ android:duration="@android:integer/config_mediumAnimTime"/> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/color/abc_search_url_text_holo.xml b/android-support-v7-appcompat/res/color/abc_search_url_text_holo.xml
new file mode 100644
index 0000000..c4579fa
--- /dev/null
+++ b/android-support-v7-appcompat/res/color/abc_search_url_text_holo.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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:color="@color/abc_search_url_text_pressed"/>
+ <item android:state_selected="true" android:color="@color/abc_search_url_text_selected"/>
+ <item android:color="@color/abc_search_url_text_normal"/> <!-- not selected -->
+</selector> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_bottom_solid_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_bottom_solid_dark_holo.9.png
new file mode 100644
index 0000000..769463b
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_bottom_solid_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_bottom_solid_light_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_bottom_solid_light_holo.9.png
new file mode 100644
index 0000000..7305047
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_bottom_solid_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_bottom_transparent_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_bottom_transparent_dark_holo.9.png
new file mode 100644
index 0000000..712a551
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_bottom_transparent_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_bottom_transparent_light_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_bottom_transparent_light_holo.9.png
new file mode 100644
index 0000000..bf3b943
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_bottom_transparent_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_share_pack_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_share_pack_holo_dark.9.png
new file mode 100644
index 0000000..6c14157
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_share_pack_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_share_pack_holo_light.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_share_pack_holo_light.9.png
new file mode 100644
index 0000000..f4ff16b
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_share_pack_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_solid_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_solid_dark_holo.9.png
new file mode 100644
index 0000000..cbbaec5
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_solid_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_solid_light_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_solid_light_holo.9.png
new file mode 100644
index 0000000..af917e5
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_solid_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_stacked_solid_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_stacked_solid_dark_holo.9.png
new file mode 100644
index 0000000..0520e5a
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_stacked_solid_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_stacked_solid_light_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_stacked_solid_light_holo.9.png
new file mode 100644
index 0000000..e3e3f93
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_stacked_solid_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_stacked_transparent_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_stacked_transparent_dark_holo.9.png
new file mode 100644
index 0000000..1e39572
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_stacked_transparent_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_stacked_transparent_light_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_stacked_transparent_light_holo.9.png
new file mode 100644
index 0000000..a16db85
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_stacked_transparent_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_transparent_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_transparent_dark_holo.9.png
new file mode 100644
index 0000000..0eff695
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_transparent_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_transparent_light_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_transparent_light_holo.9.png
new file mode 100644
index 0000000..219b170
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ab_transparent_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_cab_background_bottom_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_cab_background_bottom_holo_dark.9.png
new file mode 100644
index 0000000..1d836f6
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_cab_background_bottom_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_cab_background_bottom_holo_light.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_cab_background_bottom_holo_light.9.png
new file mode 100644
index 0000000..5818666
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_cab_background_bottom_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_cab_background_top_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_cab_background_top_holo_dark.9.png
new file mode 100644
index 0000000..564fb34
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_cab_background_top_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_cab_background_top_holo_light.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_cab_background_top_holo_light.9.png
new file mode 100644
index 0000000..ae21b76
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_cab_background_top_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_ab_back_holo_dark.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_ab_back_holo_dark.png
new file mode 100644
index 0000000..897a1c1
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_ab_back_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_ab_back_holo_light.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_ab_back_holo_light.png
new file mode 100644
index 0000000..0c89f71
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_ab_back_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_cab_done_holo_dark.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_cab_done_holo_dark.png
new file mode 100644
index 0000000..d8662e3
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_cab_done_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_cab_done_holo_light.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_cab_done_holo_light.png
new file mode 100644
index 0000000..ed03f62
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_cab_done_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_clear_disabled.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_clear_disabled.png
new file mode 100644
index 0000000..d97c342
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_clear_disabled.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_clear_normal.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_clear_normal.png
new file mode 100644
index 0000000..33ad8d4
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_clear_normal.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_clear_search_api_disabled_holo_light.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_clear_search_api_disabled_holo_light.png
new file mode 100644
index 0000000..3edbd74
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_clear_search_api_disabled_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_clear_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_clear_search_api_holo_light.png
new file mode 100644
index 0000000..90db01b
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_clear_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_commit_search_api_holo_dark.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_commit_search_api_holo_dark.png
new file mode 100644
index 0000000..83f36a9
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_commit_search_api_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_commit_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_commit_search_api_holo_light.png
new file mode 100644
index 0000000..a3cc21e
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_commit_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_go.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_go.png
new file mode 100644
index 0000000..97b825e
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_go.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_go_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_go_search_api_holo_light.png
new file mode 100644
index 0000000..7e1ba2a
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_go_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_menu_moreoverflow_normal_holo_dark.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_menu_moreoverflow_normal_holo_dark.png
new file mode 100644
index 0000000..2abc458
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_menu_moreoverflow_normal_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_menu_moreoverflow_normal_holo_light.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_menu_moreoverflow_normal_holo_light.png
new file mode 100644
index 0000000..bb6aef1
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_menu_moreoverflow_normal_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_menu_share_holo_dark.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_menu_share_holo_dark.png
new file mode 100644
index 0000000..6f747c8
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_menu_share_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_menu_share_holo_light.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_menu_share_holo_light.png
new file mode 100644
index 0000000..682b2fd
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_menu_share_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_search.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_search.png
new file mode 100644
index 0000000..bf8bd66
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_search.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_search_api_holo_light.png
new file mode 100644
index 0000000..72e207b
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_voice_search.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_voice_search.png
new file mode 100644
index 0000000..66d14ae
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_voice_search.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_voice_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_voice_search_api_holo_light.png
new file mode 100644
index 0000000..3481c98
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_ic_voice_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_list_divider_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_list_divider_holo_dark.9.png
new file mode 100644
index 0000000..986ab0b
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_list_divider_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_list_divider_holo_light.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_list_divider_holo_light.9.png
new file mode 100644
index 0000000..0279e17
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_list_divider_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_list_focused_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_list_focused_holo.9.png
new file mode 100644
index 0000000..5552708
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_list_focused_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_list_longpressed_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_list_longpressed_holo.9.png
new file mode 100644
index 0000000..4ea7afa
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_list_longpressed_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_list_pressed_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_list_pressed_holo_dark.9.png
new file mode 100644
index 0000000..5654cd6
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_list_pressed_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_list_pressed_holo_light.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_list_pressed_holo_light.9.png
new file mode 100644
index 0000000..5654cd6
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_list_pressed_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_list_selector_disabled_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_list_selector_disabled_holo_dark.9.png
new file mode 100644
index 0000000..f6fd30d
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_list_selector_disabled_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_list_selector_disabled_holo_light.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_list_selector_disabled_holo_light.9.png
new file mode 100644
index 0000000..ca8e9a2
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_list_selector_disabled_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_menu_dropdown_panel_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_menu_dropdown_panel_holo_dark.9.png
new file mode 100644
index 0000000..72ee35f
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_menu_dropdown_panel_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_menu_dropdown_panel_holo_light.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_menu_dropdown_panel_holo_light.9.png
new file mode 100644
index 0000000..0d1f9bf
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_menu_dropdown_panel_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_menu_hardkey_panel_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_menu_hardkey_panel_holo_dark.9.png
new file mode 100644
index 0000000..465ee6d
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_menu_hardkey_panel_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_menu_hardkey_panel_holo_light.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_menu_hardkey_panel_holo_light.9.png
new file mode 100644
index 0000000..76a5c53
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_menu_hardkey_panel_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_default_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_default_holo_dark.9.png
new file mode 100644
index 0000000..88f8765
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_default_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_default_holo_light.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_default_holo_light.9.png
new file mode 100644
index 0000000..fa68a13
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_default_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_disabled_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_disabled_holo_dark.9.png
new file mode 100644
index 0000000..78c63cb
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_disabled_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_disabled_holo_light.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_disabled_holo_light.9.png
new file mode 100644
index 0000000..e13a9f8
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_disabled_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_focused_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_focused_holo_dark.9.png
new file mode 100644
index 0000000..26d2e16
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_focused_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_focused_holo_light.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_focused_holo_light.9.png
new file mode 100644
index 0000000..00ae92a
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_focused_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_pressed_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_pressed_holo_dark.9.png
new file mode 100644
index 0000000..dc20a8d
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_pressed_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_pressed_holo_light.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_pressed_holo_light.9.png
new file mode 100644
index 0000000..272a2a1
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_spinner_ab_pressed_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_tab_selected_focused_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_tab_selected_focused_holo.9.png
new file mode 100644
index 0000000..673e3bf
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_tab_selected_focused_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_tab_selected_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_tab_selected_holo.9.png
new file mode 100644
index 0000000..d57df98
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_tab_selected_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_tab_selected_pressed_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_tab_selected_pressed_holo.9.png
new file mode 100644
index 0000000..6278eef
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_tab_selected_pressed_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_tab_unselected_pressed_holo.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_tab_unselected_pressed_holo.9.png
new file mode 100644
index 0000000..aadc6f8
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_tab_unselected_pressed_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_default_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_default_holo_dark.9.png
new file mode 100644
index 0000000..70c0e73
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_default_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_default_holo_light.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_default_holo_light.9.png
new file mode 100644
index 0000000..36e71d8
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_default_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_right_default_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_right_default_holo_dark.9.png
new file mode 100644
index 0000000..4be4af5
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_right_default_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_right_default_holo_light.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_right_default_holo_light.9.png
new file mode 100644
index 0000000..e72193f
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_right_default_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_right_selected_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_right_selected_holo_dark.9.png
new file mode 100644
index 0000000..8f20b9d
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_right_selected_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_right_selected_holo_light.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_right_selected_holo_light.9.png
new file mode 100644
index 0000000..04f657e
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_right_selected_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_selected_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_selected_holo_dark.9.png
new file mode 100644
index 0000000..99309ef
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_selected_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_selected_holo_light.9.png b/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_selected_holo_light.9.png
new file mode 100644
index 0000000..9bde7fb
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-hdpi/abc_textfield_search_selected_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_bottom_solid_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_bottom_solid_dark_holo.9.png
new file mode 100644
index 0000000..b229367
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_bottom_solid_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_bottom_solid_light_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_bottom_solid_light_holo.9.png
new file mode 100644
index 0000000..0706c8a
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_bottom_solid_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_bottom_transparent_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_bottom_transparent_dark_holo.9.png
new file mode 100644
index 0000000..d814d02
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_bottom_transparent_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_bottom_transparent_light_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_bottom_transparent_light_holo.9.png
new file mode 100644
index 0000000..b139c8e
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_bottom_transparent_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_share_pack_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_share_pack_holo_dark.9.png
new file mode 100644
index 0000000..ed4ba34
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_share_pack_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_share_pack_holo_light.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_share_pack_holo_light.9.png
new file mode 100644
index 0000000..8f10bd5
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_share_pack_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_solid_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_solid_dark_holo.9.png
new file mode 100644
index 0000000..743d00b
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_solid_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_solid_light_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_solid_light_holo.9.png
new file mode 100644
index 0000000..17c1fb9
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_solid_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_stacked_solid_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_stacked_solid_dark_holo.9.png
new file mode 100644
index 0000000..007a4b2
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_stacked_solid_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_stacked_solid_light_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_stacked_solid_light_holo.9.png
new file mode 100644
index 0000000..ad6e1a4
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_stacked_solid_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_stacked_transparent_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_stacked_transparent_dark_holo.9.png
new file mode 100644
index 0000000..0ad6c88
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_stacked_transparent_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_stacked_transparent_light_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_stacked_transparent_light_holo.9.png
new file mode 100644
index 0000000..19b50ab
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_stacked_transparent_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_transparent_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_transparent_dark_holo.9.png
new file mode 100644
index 0000000..ad980b1
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_transparent_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_transparent_light_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_transparent_light_holo.9.png
new file mode 100644
index 0000000..60e6c52
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ab_transparent_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_cab_background_bottom_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_cab_background_bottom_holo_dark.9.png
new file mode 100644
index 0000000..d8f1c8b
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_cab_background_bottom_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_cab_background_bottom_holo_light.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_cab_background_bottom_holo_light.9.png
new file mode 100644
index 0000000..31e4989
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_cab_background_bottom_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_cab_background_top_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_cab_background_top_holo_dark.9.png
new file mode 100644
index 0000000..7c2cbe5
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_cab_background_top_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_cab_background_top_holo_light.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_cab_background_top_holo_light.9.png
new file mode 100644
index 0000000..30cbdc1
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_cab_background_top_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_ab_back_holo_dark.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_ab_back_holo_dark.png
new file mode 100644
index 0000000..df2d3d1
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_ab_back_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_ab_back_holo_light.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_ab_back_holo_light.png
new file mode 100644
index 0000000..b2aa9c2
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_ab_back_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_cab_done_holo_dark.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_cab_done_holo_dark.png
new file mode 100644
index 0000000..a17b6a7
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_cab_done_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_cab_done_holo_light.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_cab_done_holo_light.png
new file mode 100644
index 0000000..b28b3b5
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_cab_done_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_clear_disabled.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_clear_disabled.png
new file mode 100644
index 0000000..79228ba
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_clear_disabled.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_clear_normal.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_clear_normal.png
new file mode 100644
index 0000000..86944a8
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_clear_normal.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_clear_search_api_disabled_holo_light.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_clear_search_api_disabled_holo_light.png
new file mode 100644
index 0000000..c0bdf06
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_clear_search_api_disabled_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_clear_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_clear_search_api_holo_light.png
new file mode 100644
index 0000000..15b86cb
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_clear_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_commit_search_api_holo_dark.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_commit_search_api_holo_dark.png
new file mode 100644
index 0000000..844c99c
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_commit_search_api_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_commit_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_commit_search_api_holo_light.png
new file mode 100644
index 0000000..86c170e
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_commit_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_go.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_go.png
new file mode 100644
index 0000000..bf19833
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_go.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_go_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_go_search_api_holo_light.png
new file mode 100644
index 0000000..8518498
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_go_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_menu_moreoverflow_normal_holo_dark.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_menu_moreoverflow_normal_holo_dark.png
new file mode 100644
index 0000000..ba704b6
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_menu_moreoverflow_normal_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_menu_moreoverflow_normal_holo_light.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_menu_moreoverflow_normal_holo_light.png
new file mode 100644
index 0000000..01d6816
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_menu_moreoverflow_normal_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_menu_share_holo_dark.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_menu_share_holo_dark.png
new file mode 100644
index 0000000..6bf21e3
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_menu_share_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_menu_share_holo_light.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_menu_share_holo_light.png
new file mode 100644
index 0000000..70fe31a
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_menu_share_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_search.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_search.png
new file mode 100644
index 0000000..4be72f1
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_search.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_search_api_holo_light.png
new file mode 100644
index 0000000..f2e26f8
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_voice_search.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_voice_search.png
new file mode 100644
index 0000000..73c6be6
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_voice_search.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_voice_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_voice_search_api_holo_light.png
new file mode 100644
index 0000000..71d838e
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_ic_voice_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_list_divider_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_list_divider_holo_dark.9.png
new file mode 100644
index 0000000..986ab0b
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_list_divider_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_list_divider_holo_light.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_list_divider_holo_light.9.png
new file mode 100644
index 0000000..0279e17
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_list_divider_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_list_focused_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_list_focused_holo.9.png
new file mode 100644
index 0000000..00f05d8
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_list_focused_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_list_longpressed_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_list_longpressed_holo.9.png
new file mode 100644
index 0000000..3bf8e03
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_list_longpressed_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_list_pressed_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_list_pressed_holo_dark.9.png
new file mode 100644
index 0000000..6e77525
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_list_pressed_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_list_pressed_holo_light.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_list_pressed_holo_light.9.png
new file mode 100644
index 0000000..6e77525
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_list_pressed_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_list_selector_disabled_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_list_selector_disabled_holo_dark.9.png
new file mode 100644
index 0000000..92da2f0
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_list_selector_disabled_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_list_selector_disabled_holo_light.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_list_selector_disabled_holo_light.9.png
new file mode 100644
index 0000000..42cb646
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_list_selector_disabled_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_menu_dropdown_panel_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_menu_dropdown_panel_holo_dark.9.png
new file mode 100644
index 0000000..31dc342
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_menu_dropdown_panel_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_menu_dropdown_panel_holo_light.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_menu_dropdown_panel_holo_light.9.png
new file mode 100644
index 0000000..755c145
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_menu_dropdown_panel_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_menu_hardkey_panel_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_menu_hardkey_panel_holo_dark.9.png
new file mode 100644
index 0000000..3677994
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_menu_hardkey_panel_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_menu_hardkey_panel_holo_light.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_menu_hardkey_panel_holo_light.9.png
new file mode 100644
index 0000000..02b25f0
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_menu_hardkey_panel_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_default_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_default_holo_dark.9.png
new file mode 100644
index 0000000..8d75946
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_default_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_default_holo_light.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_default_holo_light.9.png
new file mode 100644
index 0000000..716560b
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_default_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_disabled_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_disabled_holo_dark.9.png
new file mode 100644
index 0000000..c3ba89c
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_disabled_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_disabled_holo_light.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_disabled_holo_light.9.png
new file mode 100644
index 0000000..67c5358
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_disabled_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_focused_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_focused_holo_dark.9.png
new file mode 100644
index 0000000..c015f43
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_focused_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_focused_holo_light.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_focused_holo_light.9.png
new file mode 100644
index 0000000..487edc2
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_focused_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_pressed_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_pressed_holo_dark.9.png
new file mode 100644
index 0000000..2fa15e7
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_pressed_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_pressed_holo_light.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_pressed_holo_light.9.png
new file mode 100644
index 0000000..a964b22
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_spinner_ab_pressed_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_tab_selected_focused_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_tab_selected_focused_holo.9.png
new file mode 100644
index 0000000..c9972e7
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_tab_selected_focused_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_tab_selected_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_tab_selected_holo.9.png
new file mode 100644
index 0000000..587337c
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_tab_selected_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_tab_selected_pressed_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_tab_selected_pressed_holo.9.png
new file mode 100644
index 0000000..155c4fc
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_tab_selected_pressed_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_tab_unselected_pressed_holo.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_tab_unselected_pressed_holo.9.png
new file mode 100644
index 0000000..b1223fe
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_tab_unselected_pressed_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_default_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_default_holo_dark.9.png
new file mode 100644
index 0000000..081657e
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_default_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_default_holo_light.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_default_holo_light.9.png
new file mode 100644
index 0000000..3f312b4
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_default_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_right_default_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_right_default_holo_dark.9.png
new file mode 100644
index 0000000..b086fae
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_right_default_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_right_default_holo_light.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_right_default_holo_light.9.png
new file mode 100644
index 0000000..73c336a
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_right_default_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_right_selected_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_right_selected_holo_dark.9.png
new file mode 100644
index 0000000..726e0ff
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_right_selected_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_right_selected_holo_light.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_right_selected_holo_light.9.png
new file mode 100644
index 0000000..726e0ff
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_right_selected_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_selected_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_selected_holo_dark.9.png
new file mode 100644
index 0000000..1767c16
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_selected_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_selected_holo_light.9.png b/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_selected_holo_light.9.png
new file mode 100644
index 0000000..1767c16
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-mdpi/abc_textfield_search_selected_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_bottom_solid_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_bottom_solid_dark_holo.9.png
new file mode 100644
index 0000000..5753346
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_bottom_solid_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_bottom_solid_light_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_bottom_solid_light_holo.9.png
new file mode 100644
index 0000000..8155fe8
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_bottom_solid_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_bottom_transparent_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_bottom_transparent_dark_holo.9.png
new file mode 100644
index 0000000..6cee9a1
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_bottom_transparent_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_bottom_transparent_light_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_bottom_transparent_light_holo.9.png
new file mode 100644
index 0000000..fa4d76a
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_bottom_transparent_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_share_pack_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_share_pack_holo_dark.9.png
new file mode 100644
index 0000000..55099d4
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_share_pack_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_share_pack_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_share_pack_holo_light.9.png
new file mode 100644
index 0000000..3c4701f
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_share_pack_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_solid_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_solid_dark_holo.9.png
new file mode 100644
index 0000000..6622cba
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_solid_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_solid_light_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_solid_light_holo.9.png
new file mode 100644
index 0000000..c427297
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_solid_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_stacked_solid_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_stacked_solid_dark_holo.9.png
new file mode 100644
index 0000000..a0d9c1b
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_stacked_solid_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_stacked_solid_light_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_stacked_solid_light_holo.9.png
new file mode 100644
index 0000000..d36f99f
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_stacked_solid_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_stacked_transparent_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_stacked_transparent_dark_holo.9.png
new file mode 100644
index 0000000..5ad475d
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_stacked_transparent_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_stacked_transparent_light_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_stacked_transparent_light_holo.9.png
new file mode 100644
index 0000000..6ade5ee
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_stacked_transparent_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_transparent_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_transparent_dark_holo.9.png
new file mode 100644
index 0000000..719b923
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_transparent_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_transparent_light_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_transparent_light_holo.9.png
new file mode 100644
index 0000000..6da264d
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ab_transparent_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_cab_background_bottom_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_cab_background_bottom_holo_dark.9.png
new file mode 100644
index 0000000..0bd0980
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_cab_background_bottom_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_cab_background_bottom_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_cab_background_bottom_holo_light.9.png
new file mode 100644
index 0000000..43ed26d
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_cab_background_bottom_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_cab_background_top_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_cab_background_top_holo_dark.9.png
new file mode 100644
index 0000000..6b31579
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_cab_background_top_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_cab_background_top_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_cab_background_top_holo_light.9.png
new file mode 100644
index 0000000..df0121b
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_cab_background_top_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_ab_back_holo_dark.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_ab_back_holo_dark.png
new file mode 100644
index 0000000..8ded62f
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_ab_back_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_ab_back_holo_light.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_ab_back_holo_light.png
new file mode 100644
index 0000000..517e9f7
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_ab_back_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_cab_done_holo_dark.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_cab_done_holo_dark.png
new file mode 100644
index 0000000..2e06dd0
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_cab_done_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_cab_done_holo_light.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_cab_done_holo_light.png
new file mode 100644
index 0000000..bb19810
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_cab_done_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_clear_disabled.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_clear_disabled.png
new file mode 100644
index 0000000..e35c5f0
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_clear_disabled.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_clear_normal.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_clear_normal.png
new file mode 100644
index 0000000..f9dee98
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_clear_normal.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_clear_search_api_disabled_holo_light.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_clear_search_api_disabled_holo_light.png
new file mode 100644
index 0000000..7fd7aeb
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_clear_search_api_disabled_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_clear_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_clear_search_api_holo_light.png
new file mode 100644
index 0000000..53cfbd3
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_clear_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_commit_search_api_holo_dark.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_commit_search_api_holo_dark.png
new file mode 100644
index 0000000..d8faf90
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_commit_search_api_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_commit_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_commit_search_api_holo_light.png
new file mode 100644
index 0000000..e7c7280
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_commit_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_go.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_go.png
new file mode 100644
index 0000000..1e2dcfa
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_go.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_go_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_go_search_api_holo_light.png
new file mode 100644
index 0000000..f12eafc
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_go_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_menu_moreoverflow_normal_holo_dark.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_menu_moreoverflow_normal_holo_dark.png
new file mode 100644
index 0000000..a92fb1d
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_menu_moreoverflow_normal_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_menu_moreoverflow_normal_holo_light.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_menu_moreoverflow_normal_holo_light.png
new file mode 100644
index 0000000..930ca8d
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_menu_moreoverflow_normal_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_menu_share_holo_dark.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_menu_share_holo_dark.png
new file mode 100644
index 0000000..45a0f1d
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_menu_share_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_menu_share_holo_light.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_menu_share_holo_light.png
new file mode 100644
index 0000000..528e554
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_menu_share_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_search.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_search.png
new file mode 100644
index 0000000..998f91b
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_search.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_search_api_holo_light.png
new file mode 100644
index 0000000..a4cdf1c
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_voice_search.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_voice_search.png
new file mode 100644
index 0000000..c625a36
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_voice_search.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_voice_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_voice_search_api_holo_light.png
new file mode 100644
index 0000000..c332ba0
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_ic_voice_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_divider_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_divider_holo_dark.9.png
new file mode 100644
index 0000000..e62f011
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_divider_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_divider_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_divider_holo_light.9.png
new file mode 100644
index 0000000..65061c0
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_divider_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_focused_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_focused_holo.9.png
new file mode 100644
index 0000000..b545f8e
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_focused_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_longpressed_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_longpressed_holo.9.png
new file mode 100644
index 0000000..eda10e6
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_longpressed_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_pressed_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_pressed_holo_dark.9.png
new file mode 100644
index 0000000..e4b3393
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_pressed_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_pressed_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_pressed_holo_light.9.png
new file mode 100644
index 0000000..e4b3393
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_pressed_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_selector_disabled_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_selector_disabled_holo_dark.9.png
new file mode 100644
index 0000000..88726b6
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_selector_disabled_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_selector_disabled_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_selector_disabled_holo_light.9.png
new file mode 100644
index 0000000..c6a7d4d
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_list_selector_disabled_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_menu_dropdown_panel_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_menu_dropdown_panel_holo_dark.9.png
new file mode 100644
index 0000000..abc48f8
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_menu_dropdown_panel_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_menu_dropdown_panel_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_menu_dropdown_panel_holo_light.9.png
new file mode 100644
index 0000000..48905ed
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_menu_dropdown_panel_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_menu_hardkey_panel_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_menu_hardkey_panel_holo_dark.9.png
new file mode 100644
index 0000000..c1ad023
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_menu_hardkey_panel_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_menu_hardkey_panel_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_menu_hardkey_panel_holo_light.9.png
new file mode 100644
index 0000000..a1e33d6
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_menu_hardkey_panel_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_default_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_default_holo_dark.9.png
new file mode 100644
index 0000000..c43293d
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_default_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_default_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_default_holo_light.9.png
new file mode 100644
index 0000000..3dc481e
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_default_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_disabled_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_disabled_holo_dark.9.png
new file mode 100644
index 0000000..9a7b173
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_disabled_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_disabled_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_disabled_holo_light.9.png
new file mode 100644
index 0000000..6888fdc
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_disabled_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_focused_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_focused_holo_dark.9.png
new file mode 100644
index 0000000..9408b47
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_focused_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_focused_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_focused_holo_light.9.png
new file mode 100644
index 0000000..1cb95d1
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_focused_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_pressed_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_pressed_holo_dark.9.png
new file mode 100644
index 0000000..a3c7711
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_pressed_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_pressed_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_pressed_holo_light.9.png
new file mode 100644
index 0000000..2a21210
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_spinner_ab_pressed_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_tab_selected_focused_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_tab_selected_focused_holo.9.png
new file mode 100644
index 0000000..03cfb09
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_tab_selected_focused_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_tab_selected_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_tab_selected_holo.9.png
new file mode 100644
index 0000000..e4229f2
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_tab_selected_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_tab_selected_pressed_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_tab_selected_pressed_holo.9.png
new file mode 100644
index 0000000..e862cb1
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_tab_selected_pressed_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_tab_unselected_pressed_holo.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_tab_unselected_pressed_holo.9.png
new file mode 100644
index 0000000..f1eb673
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_tab_unselected_pressed_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_default_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_default_holo_dark.9.png
new file mode 100644
index 0000000..8fdbbf3
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_default_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_default_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_default_holo_light.9.png
new file mode 100644
index 0000000..4e9ae43
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_default_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_right_default_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_right_default_holo_dark.9.png
new file mode 100644
index 0000000..98f4871
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_right_default_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_right_default_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_right_default_holo_light.9.png
new file mode 100644
index 0000000..733373e
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_right_default_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_right_selected_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_right_selected_holo_dark.9.png
new file mode 100644
index 0000000..0c6bb03
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_right_selected_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_right_selected_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_right_selected_holo_light.9.png
new file mode 100644
index 0000000..0c6bb03
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_right_selected_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_selected_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_selected_holo_dark.9.png
new file mode 100644
index 0000000..e5bfd8a
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_selected_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_selected_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_selected_holo_light.9.png
new file mode 100644
index 0000000..1743da6
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xhdpi/abc_textfield_search_selected_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_bottom_solid_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_bottom_solid_dark_holo.9.png
new file mode 100644
index 0000000..ba6f005
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_bottom_solid_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_bottom_solid_light_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_bottom_solid_light_holo.9.png
new file mode 100644
index 0000000..7c7eb77
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_bottom_solid_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_bottom_transparent_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_bottom_transparent_dark_holo.9.png
new file mode 100644
index 0000000..62aa5d6
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_bottom_transparent_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_bottom_transparent_light_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_bottom_transparent_light_holo.9.png
new file mode 100644
index 0000000..136d8b6
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_bottom_transparent_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_share_pack_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_share_pack_holo_dark.9.png
new file mode 100644
index 0000000..d8cdf1a
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_share_pack_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_share_pack_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_share_pack_holo_light.9.png
new file mode 100644
index 0000000..a49a207
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_share_pack_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_solid_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_solid_dark_holo.9.png
new file mode 100644
index 0000000..580d122
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_solid_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_solid_light_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_solid_light_holo.9.png
new file mode 100644
index 0000000..55d96e0
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_solid_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_stacked_solid_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_stacked_solid_dark_holo.9.png
new file mode 100644
index 0000000..1e8a9a9
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_stacked_solid_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_stacked_solid_light_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_stacked_solid_light_holo.9.png
new file mode 100644
index 0000000..4bb233f
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_stacked_solid_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_stacked_transparent_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_stacked_transparent_dark_holo.9.png
new file mode 100644
index 0000000..e1768ab
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_stacked_transparent_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_stacked_transparent_light_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_stacked_transparent_light_holo.9.png
new file mode 100644
index 0000000..83fbbc4
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_stacked_transparent_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_transparent_dark_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_transparent_dark_holo.9.png
new file mode 100644
index 0000000..9f0a2e7
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_transparent_dark_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_transparent_light_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_transparent_light_holo.9.png
new file mode 100644
index 0000000..b959bd9
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ab_transparent_light_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_cab_background_bottom_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_cab_background_bottom_holo_dark.9.png
new file mode 100644
index 0000000..087a6d6
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_cab_background_bottom_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_cab_background_bottom_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_cab_background_bottom_holo_light.9.png
new file mode 100644
index 0000000..98d5d33
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_cab_background_bottom_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_cab_background_top_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_cab_background_top_holo_dark.9.png
new file mode 100644
index 0000000..30db6bf
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_cab_background_top_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_cab_background_top_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_cab_background_top_holo_light.9.png
new file mode 100644
index 0000000..ced92af
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_cab_background_top_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_ab_back_holo_dark.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_ab_back_holo_dark.png
new file mode 100644
index 0000000..05cfc9f
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_ab_back_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_ab_back_holo_light.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_ab_back_holo_light.png
new file mode 100644
index 0000000..b3a6fb4
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_ab_back_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_cab_done_holo_dark.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_cab_done_holo_dark.png
new file mode 100644
index 0000000..f06cd48
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_cab_done_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_cab_done_holo_light.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_cab_done_holo_light.png
new file mode 100644
index 0000000..40a448e
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_cab_done_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_clear_disabled.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_clear_disabled.png
new file mode 100644
index 0000000..3c74adf
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_clear_disabled.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_clear_normal.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_clear_normal.png
new file mode 100644
index 0000000..1312732
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_clear_normal.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_clear_search_api_disabled_holo_light.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_clear_search_api_disabled_holo_light.png
new file mode 100644
index 0000000..d9eee29
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_clear_search_api_disabled_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_clear_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_clear_search_api_holo_light.png
new file mode 100644
index 0000000..681b981
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_clear_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_commit_search_api_holo_dark.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_commit_search_api_holo_dark.png
new file mode 100644
index 0000000..33c81ce
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_commit_search_api_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_commit_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_commit_search_api_holo_light.png
new file mode 100644
index 0000000..be3c224
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_commit_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_go.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_go.png
new file mode 100644
index 0000000..622712b
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_go.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_go_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_go_search_api_holo_light.png
new file mode 100644
index 0000000..def0ac4
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_go_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_menu_moreoverflow_normal_holo_dark.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_menu_moreoverflow_normal_holo_dark.png
new file mode 100644
index 0000000..c1aa1c2
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_menu_moreoverflow_normal_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_menu_moreoverflow_normal_holo_light.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_menu_moreoverflow_normal_holo_light.png
new file mode 100644
index 0000000..d856d2b
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_menu_moreoverflow_normal_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_menu_share_holo_dark.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_menu_share_holo_dark.png
new file mode 100644
index 0000000..22ddd92
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_menu_share_holo_dark.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_menu_share_holo_light.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_menu_share_holo_light.png
new file mode 100644
index 0000000..8148e53
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_menu_share_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_search.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_search.png
new file mode 100644
index 0000000..08866a6
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_search.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_search_api_holo_light.png
new file mode 100644
index 0000000..4ea3c9d
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_voice_search.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_voice_search.png
new file mode 100644
index 0000000..f8c50d9
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_voice_search.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_voice_search_api_holo_light.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_voice_search_api_holo_light.png
new file mode 100644
index 0000000..0674795
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_ic_voice_search_api_holo_light.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_divider_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_divider_holo_dark.9.png
new file mode 100644
index 0000000..745e866
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_divider_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_divider_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_divider_holo_light.9.png
new file mode 100644
index 0000000..af30b86
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_divider_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_focused_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_focused_holo.9.png
new file mode 100644
index 0000000..147fc5d
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_focused_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_longpressed_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_longpressed_holo.9.png
new file mode 100644
index 0000000..2063d0a
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_longpressed_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_pressed_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_pressed_holo_dark.9.png
new file mode 100644
index 0000000..1399f66
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_pressed_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_pressed_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_pressed_holo_light.9.png
new file mode 100644
index 0000000..1399f66
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_pressed_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_selector_disabled_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_selector_disabled_holo_dark.9.png
new file mode 100644
index 0000000..175b82c
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_selector_disabled_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_selector_disabled_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_selector_disabled_holo_light.9.png
new file mode 100644
index 0000000..aad8a46
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_list_selector_disabled_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_menu_dropdown_panel_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_menu_dropdown_panel_holo_dark.9.png
new file mode 100644
index 0000000..bf98017
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_menu_dropdown_panel_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_menu_dropdown_panel_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_menu_dropdown_panel_holo_light.9.png
new file mode 100644
index 0000000..7c72e3e
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_menu_dropdown_panel_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_menu_hardkey_panel_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_menu_hardkey_panel_holo_dark.9.png
new file mode 100644
index 0000000..31a4caa
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_menu_hardkey_panel_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_menu_hardkey_panel_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_menu_hardkey_panel_holo_light.9.png
new file mode 100644
index 0000000..f5c18d0
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_menu_hardkey_panel_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_default_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_default_holo_dark.9.png
new file mode 100644
index 0000000..d293589
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_default_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_default_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_default_holo_light.9.png
new file mode 100644
index 0000000..a43e9fe
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_default_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_disabled_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_disabled_holo_dark.9.png
new file mode 100644
index 0000000..f10f0bf
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_disabled_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_disabled_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_disabled_holo_light.9.png
new file mode 100644
index 0000000..4f9a3a6
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_disabled_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_focused_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_focused_holo_dark.9.png
new file mode 100644
index 0000000..d67dcb3
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_focused_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_focused_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_focused_holo_light.9.png
new file mode 100644
index 0000000..0271d6b
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_focused_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_pressed_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_pressed_holo_dark.9.png
new file mode 100644
index 0000000..72a760a
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_pressed_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_pressed_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_pressed_holo_light.9.png
new file mode 100644
index 0000000..a129aab
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_spinner_ab_pressed_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_tab_selected_focused_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_tab_selected_focused_holo.9.png
new file mode 100644
index 0000000..cd15b0a
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_tab_selected_focused_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_tab_selected_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_tab_selected_holo.9.png
new file mode 100644
index 0000000..05c642a
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_tab_selected_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_tab_selected_pressed_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_tab_selected_pressed_holo.9.png
new file mode 100644
index 0000000..f857a22
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_tab_selected_pressed_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_tab_unselected_pressed_holo.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_tab_unselected_pressed_holo.9.png
new file mode 100644
index 0000000..bc856f9
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_tab_unselected_pressed_holo.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_default_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_default_holo_dark.9.png
new file mode 100644
index 0000000..90932d6
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_default_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_default_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_default_holo_light.9.png
new file mode 100644
index 0000000..ae7b369
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_default_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_right_default_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_right_default_holo_dark.9.png
new file mode 100644
index 0000000..deba2d5
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_right_default_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_right_default_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_right_default_holo_light.9.png
new file mode 100644
index 0000000..ab26e8d
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_right_default_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_right_selected_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_right_selected_holo_dark.9.png
new file mode 100644
index 0000000..3d5ebca
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_right_selected_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_right_selected_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_right_selected_holo_light.9.png
new file mode 100644
index 0000000..3d5ebca
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_right_selected_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_selected_holo_dark.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_selected_holo_dark.9.png
new file mode 100644
index 0000000..c8c2e6e
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_selected_holo_dark.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_selected_holo_light.9.png b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_selected_holo_light.9.png
new file mode 100644
index 0000000..ebb7c75
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable-xxhdpi/abc_textfield_search_selected_holo_light.9.png
Binary files differ
diff --git a/android-support-v7-appcompat/res/drawable/abc_ic_clear.xml b/android-support-v7-appcompat/res/drawable/abc_ic_clear.xml
new file mode 100644
index 0000000..802af6f
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable/abc_ic_clear.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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/abc_ic_clear_disabled" />
+ <item
+ android:drawable="@drawable/abc_ic_clear_normal" />
+</selector>
diff --git a/android-support-v7-appcompat/res/drawable/abc_ic_clear_holo_light.xml b/android-support-v7-appcompat/res/drawable/abc_ic_clear_holo_light.xml
new file mode 100644
index 0000000..4b84efc
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable/abc_ic_clear_holo_light.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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/abc_ic_clear_search_api_disabled_holo_light" />
+ <item
+ android:drawable="@drawable/abc_ic_clear_search_api_holo_light" />
+</selector>
diff --git a/android-support-v7-appcompat/res/drawable/abc_item_background_holo_dark.xml b/android-support-v7-appcompat/res/drawable/abc_item_background_holo_dark.xml
new file mode 100644
index 0000000..72162c2
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable/abc_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/abc_list_selector_disabled_holo_dark" />
+ <item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/abc_list_selector_disabled_holo_dark" />
+ <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/abc_list_selector_background_transition_holo_dark" />
+ <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/abc_list_selector_background_transition_holo_dark" />
+ <item android:state_focused="true" android:drawable="@drawable/abc_list_focused_holo" />
+ <item android:drawable="@android:color/transparent" />
+</selector>
diff --git a/android-support-v7-appcompat/res/drawable/abc_item_background_holo_light.xml b/android-support-v7-appcompat/res/drawable/abc_item_background_holo_light.xml
new file mode 100644
index 0000000..1c180b2
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable/abc_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/abc_list_selector_disabled_holo_light" />
+ <item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/abc_list_selector_disabled_holo_light" />
+ <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/abc_list_selector_background_transition_holo_light" />
+ <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/abc_list_selector_background_transition_holo_light" />
+ <item android:state_focused="true" android:drawable="@drawable/abc_list_focused_holo" />
+ <item android:drawable="@android:color/transparent" />
+</selector>
diff --git a/android-support-v7-appcompat/res/drawable/abc_list_selector_background_transition_holo_dark.xml b/android-support-v7-appcompat/res/drawable/abc_list_selector_background_transition_holo_dark.xml
new file mode 100644
index 0000000..0add58c
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable/abc_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/abc_list_pressed_holo_dark" />
+ <item android:drawable="@drawable/abc_list_longpressed_holo" />
+</transition>
diff --git a/android-support-v7-appcompat/res/drawable/abc_list_selector_background_transition_holo_light.xml b/android-support-v7-appcompat/res/drawable/abc_list_selector_background_transition_holo_light.xml
new file mode 100644
index 0000000..0c1d3e6
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable/abc_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/abc_list_pressed_holo_light" />
+ <item android:drawable="@drawable/abc_list_longpressed_holo" />
+</transition>
diff --git a/android-support-v7-appcompat/res/drawable/abc_list_selector_holo_dark.xml b/android-support-v7-appcompat/res/drawable/abc_list_selector_holo_dark.xml
new file mode 100644
index 0000000..1fb5fc4
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable/abc_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/abc_list_selector_disabled_holo_dark" />
+ <item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/abc_list_selector_disabled_holo_dark" />
+ <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/abc_list_selector_background_transition_holo_dark" />
+ <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/abc_list_selector_background_transition_holo_dark" />
+ <item android:state_focused="true" android:drawable="@drawable/abc_list_focused_holo" />
+</selector>
diff --git a/android-support-v7-appcompat/res/drawable/abc_list_selector_holo_light.xml b/android-support-v7-appcompat/res/drawable/abc_list_selector_holo_light.xml
new file mode 100644
index 0000000..8d24047
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable/abc_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/abc_list_selector_disabled_holo_light" />
+ <item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/abc_list_selector_disabled_holo_light" />
+ <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/abc_list_selector_background_transition_holo_light" />
+ <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/abc_list_selector_background_transition_holo_light" />
+ <item android:state_focused="true" android:drawable="@drawable/abc_list_focused_holo" />
+
+</selector>
diff --git a/android-support-v7-appcompat/res/drawable/abc_search_dropdown_dark.xml b/android-support-v7-appcompat/res/drawable/abc_search_dropdown_dark.xml
new file mode 100644
index 0000000..75e8917
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable/abc_search_dropdown_dark.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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-support-v7-appcompat/res/drawable/abc_search_dropdown_light.xml b/android-support-v7-appcompat/res/drawable/abc_search_dropdown_light.xml
new file mode 100644
index 0000000..80d4928
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable/abc_search_dropdown_light.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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-support-v7-appcompat/res/drawable/abc_spinner_ab_holo_dark.xml b/android-support-v7-appcompat/res/drawable/abc_spinner_ab_holo_dark.xml
new file mode 100644
index 0000000..934b374
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable/abc_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/abc_spinner_ab_disabled_holo_dark" />
+ <item android:state_pressed="true"
+ android:drawable="@drawable/abc_spinner_ab_pressed_holo_dark" />
+ <item android:state_pressed="false" android:state_focused="true"
+ android:drawable="@drawable/abc_spinner_ab_focused_holo_dark" />
+ <item android:drawable="@drawable/abc_spinner_ab_default_holo_dark" />
+</selector>
diff --git a/android-support-v7-appcompat/res/drawable/abc_spinner_ab_holo_light.xml b/android-support-v7-appcompat/res/drawable/abc_spinner_ab_holo_light.xml
new file mode 100644
index 0000000..dd0245e
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable/abc_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/abc_spinner_ab_disabled_holo_light" />
+ <item android:state_pressed="true"
+ android:drawable="@drawable/abc_spinner_ab_pressed_holo_light" />
+ <item android:state_pressed="false" android:state_focused="true"
+ android:drawable="@drawable/abc_spinner_ab_focused_holo_light" />
+ <item android:drawable="@drawable/abc_spinner_ab_default_holo_light" />
+</selector>
diff --git a/android-support-v7-appcompat/res/drawable/abc_tab_indicator_ab_holo.xml b/android-support-v7-appcompat/res/drawable/abc_tab_indicator_ab_holo.xml
new file mode 100644
index 0000000..3c828d8
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable/abc_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/abc_tab_selected_holo" />
+
+ <!-- Focused states -->
+ <item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/abc_list_focused_holo" />
+ <item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/abc_tab_selected_focused_holo" />
+
+ <!-- Pressed -->
+ <!-- Non focused states -->
+ <item android:state_focused="false" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/abc_list_pressed_holo_dark" />
+ <item android:state_focused="false" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/abc_tab_selected_pressed_holo" />
+
+ <!-- Focused states -->
+ <item android:state_focused="true" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/abc_tab_unselected_pressed_holo" />
+ <item android:state_focused="true" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/abc_tab_selected_pressed_holo" />
+</selector>
diff --git a/android-support-v7-appcompat/res/drawable/abc_textfield_searchview_holo_dark.xml b/android-support-v7-appcompat/res/drawable/abc_textfield_searchview_holo_dark.xml
new file mode 100644
index 0000000..6e9bc4c
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable/abc_textfield_searchview_holo_dark.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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/abc_textfield_search_selected_holo_dark" />
+ <item android:drawable="@drawable/abc_textfield_search_default_holo_dark" />
+</selector>
+
diff --git a/android-support-v7-appcompat/res/drawable/abc_textfield_searchview_holo_light.xml b/android-support-v7-appcompat/res/drawable/abc_textfield_searchview_holo_light.xml
new file mode 100644
index 0000000..a02e4b0
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable/abc_textfield_searchview_holo_light.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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/abc_textfield_search_selected_holo_light" />
+ <item android:drawable="@drawable/abc_textfield_search_default_holo_light" />
+</selector>
+
diff --git a/android-support-v7-appcompat/res/drawable/abc_textfield_searchview_right_holo_dark.xml b/android-support-v7-appcompat/res/drawable/abc_textfield_searchview_right_holo_dark.xml
new file mode 100644
index 0000000..b55a995
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable/abc_textfield_searchview_right_holo_dark.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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/abc_textfield_search_right_selected_holo_dark" />
+ <item android:drawable="@drawable/abc_textfield_search_right_default_holo_dark" />
+</selector>
+
diff --git a/android-support-v7-appcompat/res/drawable/abc_textfield_searchview_right_holo_light.xml b/android-support-v7-appcompat/res/drawable/abc_textfield_searchview_right_holo_light.xml
new file mode 100644
index 0000000..7710232
--- /dev/null
+++ b/android-support-v7-appcompat/res/drawable/abc_textfield_searchview_right_holo_light.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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/abc_textfield_search_right_selected_holo_light" />
+ <item android:drawable="@drawable/abc_textfield_search_right_default_holo_light" />
+</selector>
+
diff --git a/android-support-v7-appcompat/res/layout-v11/abc_action_bar_decor.xml b/android-support-v7-appcompat/res/layout-v11/abc_action_bar_decor.xml
new file mode 100644
index 0000000..a212d56
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout-v11/abc_action_bar_decor.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+
+<android.support.v7.internal.widget.NativeActionModeAwareLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/action_bar_root"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical"
+ android:fitsSystemWindows="true">
+
+ <include layout="@layout/abc_action_bar_decor_include" />
+
+</android.support.v7.internal.widget.NativeActionModeAwareLayout>
diff --git a/android-support-v7-appcompat/res/layout-v11/abc_simple_decor.xml b/android-support-v7-appcompat/res/layout-v11/abc_simple_decor.xml
new file mode 100644
index 0000000..03a8f10
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout-v11/abc_simple_decor.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+
+<android.support.v7.internal.widget.NativeActionModeAwareLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/action_bar_root"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:fitsSystemWindows="true">
+
+ <FrameLayout
+ android:id="@id/action_bar_activity_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:foreground="?android:attr/windowContentOverlay"/>
+
+</android.support.v7.internal.widget.NativeActionModeAwareLayout>
diff --git a/android-support-v7-appcompat/res/layout-v14/abc_activity_chooser_view.xml b/android-support-v7-appcompat/res/layout-v14/abc_activity_chooser_view.xml
new file mode 100644
index 0000000..4ce359b
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout-v14/abc_activity_chooser_view.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2013, 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/activity_chooser_view_content"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_gravity="center"
+ style="?attr/activityChooserViewStyle">
+
+ <include layout="@layout/abc_activity_chooser_view_include" />
+
+</LinearLayout> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/layout/abc_action_bar_decor.xml b/android-support-v7-appcompat/res/layout/abc_action_bar_decor.xml
new file mode 100644
index 0000000..327e26f
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_action_bar_decor.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical"
+ android:fitsSystemWindows="true">
+
+ <include layout="@layout/abc_action_bar_decor_include" />
+
+</LinearLayout>
diff --git a/android-support-v7-appcompat/res/layout/abc_action_bar_decor_include.xml b/android-support-v7-appcompat/res/layout/abc_action_bar_decor_include.xml
new file mode 100644
index 0000000..3f2356b
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_action_bar_decor_include.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+
+<merge xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <android.support.v7.internal.widget.ActionBarContainer
+ android:id="@+id/action_bar_container"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ style="?attr/actionBarStyle">
+
+ <android.support.v7.internal.widget.ActionBarView
+ android:id="@+id/action_bar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ style="?attr/actionBarStyle" />
+
+ <android.support.v7.internal.widget.ActionBarContextView
+ android:id="@+id/action_context_bar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:visibility="gone"
+ style="?attr/actionModeStyle" />
+ </android.support.v7.internal.widget.ActionBarContainer>
+
+ <FrameLayout
+ android:id="@id/action_bar_activity_content"
+ android:layout_width="fill_parent"
+ android:layout_height="0dip"
+ android:layout_weight="1"
+ android:foregroundGravity="fill_horizontal|top"
+ android:foreground="?android:attr/windowContentOverlay" />
+
+ <android.support.v7.internal.widget.ActionBarContainer
+ android:id="@+id/split_action_bar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ style="?attr/actionBarSplitStyle"
+ android:visibility="gone"
+ android:gravity="center" />
+
+</merge>
diff --git a/android-support-v7-appcompat/res/layout/abc_action_bar_decor_overlay.xml b/android-support-v7-appcompat/res/layout/abc_action_bar_decor_overlay.xml
new file mode 100644
index 0000000..5ea8fc1
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_action_bar_decor_overlay.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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.
+-->
+
+<android.support.v7.internal.widget.ActionBarOverlayLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/action_bar_overlay_layout"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+ <FrameLayout android:id="@id/action_bar_activity_content"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"/>
+ <LinearLayout android:id="@+id/top_action_bar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="top">
+ <android.support.v7.internal.widget.ActionBarContainer android:id="@+id/action_bar_container"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ style="?attr/actionBarStyle"
+ android:gravity="top">
+ <android.support.v7.internal.widget.ActionBarView
+ android:id="@+id/action_bar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ style="?attr/actionBarStyle"/>
+ <android.support.v7.internal.widget.ActionBarContextView
+ android:id="@+id/action_context_bar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:visibility="gone"
+ style="?attr/actionModeStyle"/>
+ </android.support.v7.internal.widget.ActionBarContainer>
+ <ImageView android:src="?android:attr/windowContentOverlay"
+ android:scaleType="fitXY"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"/>
+ </LinearLayout>
+ <android.support.v7.internal.widget.ActionBarContainer android:id="@+id/split_action_bar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom"
+ style="?attr/actionBarSplitStyle"
+ android:visibility="gone"
+ android:gravity="center"/>
+</android.support.v7.internal.widget.ActionBarOverlayLayout>
diff --git a/android-support-v7-appcompat/res/layout/abc_action_bar_home.xml b/android-support-v7-appcompat/res/layout/abc_action_bar_home.xml
new file mode 100644
index 0000000..7063c36
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_action_bar_home.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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="android.support.v7.internal.widget.ActionBarView$HomeView"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:background="?attr/actionBarItemBackground">
+ <ImageView android:id="@+id/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/home"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginRight="8dip"
+ android:layout_marginTop="@dimen/abc_action_bar_icon_vertical_padding"
+ android:layout_marginBottom="@dimen/abc_action_bar_icon_vertical_padding"
+ android:layout_gravity="center"
+ android:adjustViewBounds="true"
+ android:scaleType="fitCenter"/>
+</view>
diff --git a/android-support-v7-appcompat/res/layout/abc_action_bar_tab.xml b/android-support-v7-appcompat/res/layout/abc_action_bar_tab.xml
new file mode 100644
index 0000000..06043a2
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_action_bar_tab.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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="android.support.v7.internal.widget.ScrollingTabContainerView$TabView"
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:layout_height="wrap_content"
+ style="?attr/actionBarTabStyle"/>
diff --git a/android-support-v7-appcompat/res/layout/abc_action_bar_tabbar.xml b/android-support-v7-appcompat/res/layout/abc_action_bar_tabbar.xml
new file mode 100644
index 0000000..08f9c89
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_action_bar_tabbar.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+
+<android.support.v7.internal.widget.LinearLayoutICS
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ style="?attr/actionBarTabBarStyle"/>
diff --git a/android-support-v7-appcompat/res/layout/abc_action_bar_title_item.xml b/android-support-v7-appcompat/res/layout/abc_action_bar_title_item.xml
new file mode 100644
index 0000000..0cb1237
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_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="8dip"
+ android:background="?attr/actionBarItemBackground"
+ android:enabled="false">
+
+ <ImageView android:id="@+id/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/action_bar_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:ellipsize="end"/>
+ <TextView android:id="@+id/action_bar_subtitle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/abc_action_bar_subtitle_top_margin"
+ android:layout_marginBottom="@dimen/abc_action_bar_subtitle_bottom_margin"
+ android:singleLine="true"
+ android:ellipsize="end"
+ android:visibility="gone"/>
+ </LinearLayout>
+</LinearLayout>
diff --git a/android-support-v7-appcompat/res/layout/abc_action_bar_view_list_nav_layout.xml b/android-support-v7-appcompat/res/layout/abc_action_bar_view_list_nav_layout.xml
new file mode 100644
index 0000000..5c105ab
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_action_bar_view_list_nav_layout.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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
+ dd
+ 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.
+-->
+
+<!-- Styled linear layout, compensating for the lack of a defStyle parameter
+ in pre-Honeycomb LinearLayout's constructor. -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ style="?attr/actionBarTabBarStyle">
+</LinearLayout> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/layout/abc_action_menu_item_layout.xml b/android-support-v7-appcompat/res/layout/abc_action_menu_item_layout.xml
new file mode 100644
index 0000000..150ea50
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_action_menu_item_layout.xml
@@ -0,0 +1,30 @@
+<?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
+ dd
+ 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.
+-->
+
+<android.support.v7.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:gravity="center"
+ android:focusable="true"
+ android:paddingTop="4dip"
+ android:paddingBottom="4dip"
+ android:paddingLeft="8dip"
+ android:paddingRight="8dip"
+ android:textAppearance="?attr/actionMenuTextAppearance"
+ android:textColor="?attr/actionMenuTextColor"
+ style="?attr/actionButtonStyle"/>
diff --git a/android-support-v7-appcompat/res/layout/abc_action_menu_layout.xml b/android-support-v7-appcompat/res/layout/abc_action_menu_layout.xml
new file mode 100644
index 0000000..37a02e6
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_action_menu_layout.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.
+-->
+
+<android.support.v7.internal.view.menu.ActionMenuView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ app:divider="?attr/actionBarDivider"
+ app:dividerPadding="12dip"
+ android:gravity="center_vertical"/>
diff --git a/android-support-v7-appcompat/res/layout/abc_action_mode_bar.xml b/android-support-v7-appcompat/res/layout/abc_action_mode_bar.xml
new file mode 100644
index 0000000..b81cd85
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_action_mode_bar.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2012, 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.
+*/
+-->
+<android.support.v7.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-support-v7-appcompat/res/layout/abc_action_mode_close_item.xml b/android-support-v7-appcompat/res/layout/abc_action_mode_close_item.xml
new file mode 100644
index 0000000..2c76b8b
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_action_mode_close_item.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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/action_mode_close_button"
+ android:focusable="true"
+ android:clickable="true"
+ android:paddingLeft="8dip"
+ android:contentDescription="@string/abc_action_mode_done"
+ 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"/>
+</LinearLayout>
diff --git a/android-support-v7-appcompat/res/layout/abc_activity_chooser_view.xml b/android-support-v7-appcompat/res/layout/abc_activity_chooser_view.xml
new file mode 100644
index 0000000..eb42598
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_activity_chooser_view.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2013, 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.
+*/
+-->
+<android.support.v7.internal.widget.LinearLayoutICS
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/activity_chooser_view_content"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_gravity="center"
+ style="?attr/activityChooserViewStyle">
+
+ <include layout="@layout/abc_activity_chooser_view_include" />
+
+</android.support.v7.internal.widget.LinearLayoutICS> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/layout/abc_activity_chooser_view_include.xml b/android-support-v7-appcompat/res/layout/abc_activity_chooser_view_include.xml
new file mode 100644
index 0000000..975b13e
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_activity_chooser_view_include.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2013, 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.
+*/
+-->
+<merge
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <FrameLayout
+ android:id="@+id/expand_activities_button"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_gravity="center"
+ android:focusable="true"
+ android:addStatesFromChildren="true"
+ android:background="?attr/actionBarItemBackground">
+
+ <ImageView
+ android:id="@+id/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/default_activity_button"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_gravity="center"
+ android:focusable="true"
+ android:addStatesFromChildren="true"
+ android:background="?attr/actionBarItemBackground">
+
+ <ImageView
+ android:id="@+id/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>
+
+</merge> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/layout/abc_activity_chooser_view_list_item.xml b/android-support-v7-appcompat/res/layout/abc_activity_chooser_view_list_item.xml
new file mode 100644
index 0000000..887427d
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_activity_chooser_view_list_item.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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/list_item"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/dropdownListPreferredItemHeight"
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip"
+ android:minWidth="196dip"
+ android:orientation="vertical">
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:duplicateParentState="true" >
+
+ <ImageView
+ android:id="@+id/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/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> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/layout/abc_expanded_menu_layout.xml b/android-support-v7-appcompat/res/layout/abc_expanded_menu_layout.xml
new file mode 100644
index 0000000..f4af882
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_expanded_menu_layout.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+
+<android.support.v7.internal.view.menu.ExpandedMenuView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/expanded_menu"
+ android:layout_width="?attr/panelMenuListWidth"
+ android:layout_height="wrap_content"/>
diff --git a/android-support-v7-appcompat/res/layout/abc_list_menu_item_checkbox.xml b/android-support-v7-appcompat/res/layout/abc_list_menu_item_checkbox.xml
new file mode 100644
index 0000000..d9c3f06
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_list_menu_item_checkbox.xml
@@ -0,0 +1,26 @@
+<?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/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-support-v7-appcompat/res/layout/abc_list_menu_item_icon.xml b/android-support-v7-appcompat/res/layout/abc_list_menu_item_icon.xml
new file mode 100644
index 0000000..acd005a
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_list_menu_item_icon.xml
@@ -0,0 +1,28 @@
+<?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/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-support-v7-appcompat/res/layout/abc_list_menu_item_layout.xml b/android-support-v7-appcompat/res/layout/abc_list_menu_item_layout.xml
new file mode 100644
index 0000000..d3be782
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_list_menu_item_layout.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+
+<android.support.v7.internal.view.menu.ListMenuItemView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/listPreferredItemHeightSmall">
+
+ <!-- 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_marginLeft="?attr/listPreferredItemPaddingLeft"
+ android:layout_marginRight="?attr/listPreferredItemPaddingRight"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:duplicateParentState="true">
+
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:textAppearance="?attr/textAppearanceListItemSmall"
+ android:singleLine="true"
+ android:duplicateParentState="true"
+ android:ellipsize="marquee"
+ android:fadingEdge="horizontal" />
+
+ <TextView
+ android:id="@+id/shortcut"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/title"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:singleLine="true"
+ android:duplicateParentState="true" />
+
+ </RelativeLayout>
+
+ <!-- Checkbox, and/or radio button will be inserted here. -->
+
+</android.support.v7.internal.view.menu.ListMenuItemView>
diff --git a/android-support-v7-appcompat/res/layout/abc_list_menu_item_radio.xml b/android-support-v7-appcompat/res/layout/abc_list_menu_item_radio.xml
new file mode 100644
index 0000000..0ca8d7a
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_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/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-support-v7-appcompat/res/layout/abc_popup_menu_item_layout.xml b/android-support-v7-appcompat/res/layout/abc_popup_menu_item_layout.xml
new file mode 100644
index 0000000..1e4e27d
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_popup_menu_item_layout.xml
@@ -0,0 +1,61 @@
+<?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.
+-->
+
+<android.support.v7.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/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/shortcut"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/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. -->
+
+</android.support.v7.internal.view.menu.ListMenuItemView>
diff --git a/android-support-v7-appcompat/res/layout/abc_search_dropdown_item_icons_2line.xml b/android-support-v7-appcompat/res/layout/abc_search_dropdown_item_icons_2line.xml
new file mode 100644
index 0000000..ffc3aed
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_search_dropdown_item_icons_2line.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2013 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/abc_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/abc_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> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/layout/abc_search_view.xml b/android-support-v7-appcompat/res/layout/abc_search_view.xml
new file mode 100644
index 0000000..da8adb8
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_search_view.xml
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright (C) 2013 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/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/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="?android:attr/textColorPrimary"
+ android:visibility="gone"
+ />
+
+ <ImageView
+ android:id="@+id/search_button"
+ style="?attr/actionButtonStyle"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_vertical"
+ android:src="?attr/searchViewSearchIcon"
+ android:focusable="true"
+ android:contentDescription="@string/abc_searchview_description_search"
+ />
+
+ <LinearLayout
+ android:id="@+id/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/search_mag_icon"
+ android:layout_width="@dimen/abc_dropdownitem_icon_width"
+ android:layout_height="wrap_content"
+ android:scaleType="centerInside"
+ android:layout_marginLeft="@dimen/abc_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/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="android.support.v7.widget.SearchView$SearchAutoComplete"
+ style="?attr/searchViewAutoCompleteTextView"
+ android:id="@+id/search_src_text"
+ android:layout_height="36dip"
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:minWidth="@dimen/abc_search_view_text_min_width"
+ android:layout_gravity="bottom"
+ android:paddingLeft="@dimen/abc_dropdownitem_text_padding_left"
+ android:paddingRight="@dimen/abc_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/search_edit_frame"
+ android:dropDownVerticalOffset="0dip"
+ android:dropDownHorizontalOffset="0dip"
+ android:contentDescription="@string/abc_searchview_description_query"
+ />
+
+ <ImageView
+ android:id="@+id/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/abc_searchview_description_clear"
+ />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/submit_area"
+ android:orientation="horizontal"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:background="?attr/searchViewTextFieldRight">
+
+ <ImageView
+ android:id="@+id/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/abc_searchview_description_submit"
+ />
+
+ <ImageView
+ android:id="@+id/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/abc_searchview_description_voice"
+ />
+ </LinearLayout>
+ </LinearLayout>
+
+</LinearLayout> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/layout/abc_simple_decor.xml b/android-support-v7-appcompat/res/layout/abc_simple_decor.xml
new file mode 100644
index 0000000..78316e8
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/abc_simple_decor.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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/action_bar_root"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:fitsSystemWindows="true">
+
+ <FrameLayout
+ android:id="@id/action_bar_activity_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:foreground="?android:attr/windowContentOverlay"/>
+
+</LinearLayout>
diff --git a/android-support-v7-appcompat/res/layout/support_simple_spinner_dropdown_item.xml b/android-support-v7-appcompat/res/layout/support_simple_spinner_dropdown_item.xml
new file mode 100644
index 0000000..d2f177a
--- /dev/null
+++ b/android-support-v7-appcompat/res/layout/support_simple_spinner_dropdown_item.xml
@@ -0,0 +1,25 @@
+<?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"
+ style="?attr/spinnerDropDownItemStyle"
+ android:singleLine="true"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/dropdownListPreferredItemHeight"
+ android:ellipsize="marquee"/> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/values-af/strings.xml b/android-support-v7-appcompat/res/values-af/strings.xml
new file mode 100644
index 0000000..f7348c4
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-af/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Klaar"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Navigeer tuis"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Navigeer op"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Nog opsies"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Soek"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Soeknavraag"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Vee navraag uit"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Dien navraag in"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Stemsoektog"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Kies \'n program"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Sien alles"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Deel met %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Deel met"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-am/strings.xml b/android-support-v7-appcompat/res/values-am/strings.xml
new file mode 100644
index 0000000..e849b31
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-am/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"ተከናውኗል"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"ወደ መነሻ ይዳስሱ"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"ወደ ላይ ይዳስሱ"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"ተጨማሪ አማራጮች"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"ፍለጋ"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"የፍለጋ ጥያቄ"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"መጠይቅ አጽዳ"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"መጠይቅ ያስረክቡ"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"የድምፅ ፍለጋ"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"መተግበሪያ ይምረጡ"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"ሁሉንም ይመልከቱ"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"ከ%s ጋር ያጋሩ"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"ከሚከተለው ጋር ያጋሩ"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-ar/strings.xml b/android-support-v7-appcompat/res/values-ar/strings.xml
new file mode 100644
index 0000000..be41ac8
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-ar/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"تم"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"التنقل إلى الشاشة الرئيسية"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"التنقل إلى أعلى"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"خيارات إضافية"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"بحث"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"طلب البحث"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"محو طلب البحث"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"إرسال طلب البحث"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"البحث الصوتي"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"اختيار تطبيق"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"عرض الكل"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"مشاركة مع %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"مشاركة مع"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-bg/strings.xml b/android-support-v7-appcompat/res/values-bg/strings.xml
new file mode 100644
index 0000000..de3bde8
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-bg/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Готово"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Придвижване към „Начало“"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Придвижване нагоре"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Още опции"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Търсене"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Заявка за търсене"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Изчистване на заявката"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Изпращане на заявката"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Гласово търсене"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Изберете приложение"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Вижте всички"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Споделяне със: %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Споделяне със:"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-ca/strings.xml b/android-support-v7-appcompat/res/values-ca/strings.xml
new file mode 100644
index 0000000..bfd4cb0
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-ca/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Fet"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Navega a la pàgina d\'inici"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Navega cap a dalt"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Més opcions"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Cerca"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Consulta de cerca"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Esborra la consulta"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Envia la consulta"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Cerca per veu"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Selecciona una aplicació"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Mostra\'ls tots"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Comparteix amb %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Comparteix amb"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-cs/strings.xml b/android-support-v7-appcompat/res/values-cs/strings.xml
new file mode 100644
index 0000000..1465fdc
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-cs/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Hotovo"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Přejít na plochu"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Přejít nahoru"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Více možností"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Hledat"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Vyhledávací dotaz"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Smazat dotaz"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Odeslat dotaz"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Hlasové vyhledávání"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Vybrat aplikaci"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Zobrazit vše"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Sdílet pomocí %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Sdílet pomocí"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-da/strings.xml b/android-support-v7-appcompat/res/values-da/strings.xml
new file mode 100644
index 0000000..b178513
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-da/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Luk"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Naviger hjem"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Naviger op"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Flere muligheder"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Søg"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Søgeforespørgsel"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Ryd forespørgslen"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Indsend forespørgslen"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Stemmesøgning"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Vælg en app"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Se alle"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Del med %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Del med"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-de/strings.xml b/android-support-v7-appcompat/res/values-de/strings.xml
new file mode 100644
index 0000000..6da4b71
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-de/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Fertig"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Zur Startseite"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Nach oben"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Weitere Optionen"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Suchen"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Suchanfrage"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Suchanfrage löschen"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Suchanfrage senden"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Sprachsuche"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"App auswählen"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Alle ansehen"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Freigeben für %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Freigeben für"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-el/strings.xml b/android-support-v7-appcompat/res/values-el/strings.xml
new file mode 100644
index 0000000..4c0e286
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-el/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Τέλος"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Πλοήγηση στην αρχική σελίδα"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Πλοήγηση προς τα επάνω"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Περισσότερες επιλογές"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Αναζήτηση"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Ερώτημα αναζήτησης"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Διαγραφή ερωτήματος"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Υποβολή ερωτήματος"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Φωνητική αναζήτηση"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Επιλέξτε κάποια εφαρμογή"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Προβολή όλων"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Κοινή χρήση με %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Κοινή χρήση με"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-en-rGB/strings.xml b/android-support-v7-appcompat/res/values-en-rGB/strings.xml
new file mode 100644
index 0000000..3ec0b0e
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-en-rGB/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Finished"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Navigate home"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Navigate up"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"More options"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Search"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Search query"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Clear query"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Submit query"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Voice search"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Choose an app"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"See all"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Share with %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Share with"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-en-rIN/strings.xml b/android-support-v7-appcompat/res/values-en-rIN/strings.xml
new file mode 100644
index 0000000..3ec0b0e
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-en-rIN/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Finished"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Navigate home"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Navigate up"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"More options"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Search"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Search query"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Clear query"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Submit query"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Voice search"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Choose an app"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"See all"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Share with %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Share with"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-es-rUS/strings.xml b/android-support-v7-appcompat/res/values-es-rUS/strings.xml
new file mode 100644
index 0000000..6ab7942
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-es-rUS/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Listo"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Navegar a la página principal"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Navegar hacia arriba"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Más opciones"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Búsqueda"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Consulta de búsqueda"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Eliminar la consulta"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Enviar consulta"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Búsqueda por voz"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Elige una aplicación."</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Ver todo"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Compartir con %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Compartir con"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-es/strings.xml b/android-support-v7-appcompat/res/values-es/strings.xml
new file mode 100644
index 0000000..ed15b35
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-es/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Listo"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Ir a la pantalla de inicio"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Desplazarse hacia arriba"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Más opciones"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Buscar"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Consulta"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Borrar consulta"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Enviar consulta"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Búsqueda por voz"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Seleccionar una aplicación"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Ver todo"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Compartir con %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Compartir con"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-et-rEE/strings.xml b/android-support-v7-appcompat/res/values-et-rEE/strings.xml
new file mode 100644
index 0000000..2ae925d
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-et-rEE/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Valmis"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Navigeerimine avaekraanile"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Navigeerimine üles"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Rohkem valikuid"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Otsing"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Otsingupäring"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Päringu tühistamine"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Päringu esitamine"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Häälotsing"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Valige rakendus"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Kuva kõik"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Jagamine kasutajaga %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Jagamine:"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-fa/strings.xml b/android-support-v7-appcompat/res/values-fa/strings.xml
new file mode 100644
index 0000000..989df14
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-fa/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"انجام شد"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"پیمایش به صفحه اصلی"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"پیمایش به بالا"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"گزینه‌های بیشتر"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"جستجو"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"عبارت جستجو"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"پاک کردن عبارت جستجو"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"ارسال عبارت جستجو"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"جستجوی شفاهی"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"انتخاب برنامه"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"مشاهده همه"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"اشتراک‌گذاری با %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"اشتراک‌گذاری با"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-fi/strings.xml b/android-support-v7-appcompat/res/values-fi/strings.xml
new file mode 100644
index 0000000..6755cea
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-fi/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Valmis"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Siirry etusivulle"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Siirry ylös"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Lisää"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Haku"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Hakulauseke"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Tyhjennä kysely"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Lähetä kysely"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Puhehaku"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Valitse sovellus"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Näytä kaikki"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Jakaminen: %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Jakaminen:"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-fr-rCA/strings.xml b/android-support-v7-appcompat/res/values-fr-rCA/strings.xml
new file mode 100644
index 0000000..417705a
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-fr-rCA/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Terminé"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Revenir à l\'accueil"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Revenir en haut de la page"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Plus d\'options"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Rechercher"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Requête de recherche"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Effacer la requête"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Envoyer la requête"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Recherche vocale"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Sélectionnez une application"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Voir toutes les chaînes"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Partager avec %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Partager avec"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-fr/strings.xml b/android-support-v7-appcompat/res/values-fr/strings.xml
new file mode 100644
index 0000000..27b8f38
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-fr/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"OK"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Revenir à l\'accueil"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Revenir en haut de la page"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Plus d\'options"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Rechercher"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Requête de recherche"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Effacer la requête"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Envoyer la requête"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Recherche vocale"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Sélectionner une application"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Tout afficher"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Partager avec %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Partager avec"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-hi/strings.xml b/android-support-v7-appcompat/res/values-hi/strings.xml
new file mode 100644
index 0000000..b236ebb
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-hi/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"पूर्ण"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"मुखपृष्ठ पर नेविगेट करें"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"ऊपर नेविगेट करें"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"अधिक विकल्प"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"खोजें"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"खोज क्वेरी"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"क्‍वेरी साफ़ करें"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"क्वेरी सबमिट करें"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"ध्वनि खोज"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"कोई एप्‍लिकेशन चुनें"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"सभी देखें"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"%s के साथ साझा करें"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"इसके द्वारा साझा करें"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-hr/strings.xml b/android-support-v7-appcompat/res/values-hr/strings.xml
new file mode 100644
index 0000000..680e39f
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-hr/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Gotovo"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Idi na početnu"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Idi gore"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Dodatne opcije"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Pretraživanje"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Upit za pretraživanje"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Izbriši upit"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Pošalji upit"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Glasovno pretraživanje"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Odabir aplikacije"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Prikaži sve"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Dijeljenje sa: %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Dijeljenje sa"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-hu/strings.xml b/android-support-v7-appcompat/res/values-hu/strings.xml
new file mode 100644
index 0000000..52dafb0
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-hu/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Kész"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Ugrás a főoldalra"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Felfelé mozgatás"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"További lehetőségek"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Keresés"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Keresési lekérdezés"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Lekérdezés törlése"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Lekérdezés küldése"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Hangalapú keresés"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Válasszon ki egy alkalmazást"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Összes megtekintése"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Megosztás a következővel: %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Megosztás a következővel:"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-hy-rAM/strings.xml b/android-support-v7-appcompat/res/values-hy-rAM/strings.xml
new file mode 100644
index 0000000..6c0ee27
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-hy-rAM/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Կատարված է"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Ուղղվել տուն"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Ուղղվել վերև"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Այլ ընտրանքներ"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Որոնել"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Որոնման հարցում"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Մաքրել հարցումը"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Ուղարկել հարցումը"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Ձայնային որոնում"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Ընտրել ծրագիր"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Տեսնել բոլորը"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Տարածել ըստ %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Տարածել"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-in/strings.xml b/android-support-v7-appcompat/res/values-in/strings.xml
new file mode 100644
index 0000000..9481e83
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-in/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Selesai"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Navigasi ke beranda"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Navigasi naik"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Opsi lain"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Telusuri"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Kueri penelusuran"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Hapus kueri"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Kirim kueri"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Penelusuran suara"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Pilih aplikasi"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Lihat semua"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Bagikan dengan %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Bagikan dengan"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-it/strings.xml b/android-support-v7-appcompat/res/values-it/strings.xml
new file mode 100644
index 0000000..a8b0f2c
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-it/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Fine"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Vai alla home page"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Vai in alto"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Altre opzioni"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Cerca"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Query di ricerca"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Cancella query"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Invia query"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Ricerca vocale"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Scegli un\'applicazione"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Visualizza tutte"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Condividi con %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Condividi con"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-iw/strings.xml b/android-support-v7-appcompat/res/values-iw/strings.xml
new file mode 100644
index 0000000..07609b0
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-iw/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"בוצע"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"נווט לדף הבית"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"נווט למעלה"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"עוד אפשרויות"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"חפש"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"שאילתת חיפוש"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"מחק שאילתה"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"שלח שאילתה"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"חיפוש קולי"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"בחר אפליקציה"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"ראה הכול"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"שתף עם %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"שתף עם"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-ja/strings.xml b/android-support-v7-appcompat/res/values-ja/strings.xml
new file mode 100644
index 0000000..659358a
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-ja/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"完了"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"ホームへ移動"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"上へ移動"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"その他のオプション"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"検索"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"検索キーワード"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"検索キーワードを削除"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"検索キーワードを送信"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"音声検索"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"アプリの選択"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"すべて表示"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"%sと共有"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"共有"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-ka-rGE/strings.xml b/android-support-v7-appcompat/res/values-ka-rGE/strings.xml
new file mode 100644
index 0000000..0c430b1
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-ka-rGE/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"დასრულდა"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"მთავარზე ნავიგაცია"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"ზემოთ ნავიგაცია"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"მეტი ვარიანტები"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"ძიება"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"ძიების მოთხოვნა"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"მოთხოვნის გასუფთავება"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"მოთხოვნის გადაგზავნა"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"ხმოვანი ძიება"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"აპის არჩევა"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"ყველას ნახვა"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"%s-თან გაზიარება"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"გაზიარება:"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-km-rKH/strings.xml b/android-support-v7-appcompat/res/values-km-rKH/strings.xml
new file mode 100644
index 0000000..597aec5
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-km-rKH/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"រួចរាល់"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"រកមើល​ទៅ​ដើម"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"រកមើល​ឡើងលើ"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"ជម្រើស​ច្រើន​ទៀត"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"ស្វែងរក"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"ស្វែងរក​សំណួរ"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"សម្អាត​សំណួរ"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"ដាក់​​​ស្នើ​សំណួរ"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"ការស្វែងរក​សំឡេង"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"ជ្រើស​កម្មវិធី"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"មើល​ទាំងអស់"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"ចែករំលែក​ជាមួយ %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"ចែករំលែក​ជាមួយ"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-ko/strings.xml b/android-support-v7-appcompat/res/values-ko/strings.xml
new file mode 100644
index 0000000..d331975
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-ko/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"완료"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"홈 탐색"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"위로 탐색"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"옵션 더보기"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"검색"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"검색어"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"검색어 삭제"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"검색어 보내기"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"음성 검색"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"앱 선택"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"전체 보기"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"%s와(과) 공유"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"공유 대상"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-land/bools.xml b/android-support-v7-appcompat/res/values-land/bools.xml
new file mode 100644
index 0000000..cdadd69
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-land/bools.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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="abc_split_action_bar_is_narrow">false</bool>
+ <bool name="abc_action_bar_embed_tabs_pre_jb">true</bool>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-land/config.xml b/android-support-v7-appcompat/res/values-land/config.xml
new file mode 100644
index 0000000..d0d990d
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-land/config.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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="abc_config_allowActionMenuItemTextWithIcon">true</bool>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-land/dimens.xml b/android-support-v7-appcompat/res/values-land/dimens.xml
new file mode 100644
index 0000000..9aaf587
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-land/dimens.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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="abc_action_bar_default_height">40dip</dimen>
+ <!-- Vertical padding around action bar icons. -->
+ <dimen name="abc_action_bar_icon_vertical_padding">4dip</dimen>
+ <!-- Text size for action bar titles -->
+ <dimen name="abc_action_bar_title_text_size">16dp</dimen>
+ <!-- Text size for action bar subtitles -->
+ <dimen name="abc_action_bar_subtitle_text_size">12dp</dimen>
+ <!-- Top margin for action bar subtitles -->
+ <dimen name="abc_action_bar_subtitle_top_margin">-2dp</dimen>
+ <!-- Bottom margin for action bar subtitles -->
+ <dimen name="abc_action_bar_subtitle_bottom_margin">4dip</dimen>
+ <!-- Size of the indeterminate Progress Bar -->
+ <dimen name="abc_action_bar_progress_bar_size">32dp</dimen>
+</resources> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/values-large-v14/themes_base.xml b/android-support-v7-appcompat/res/values-large-v14/themes_base.xml
new file mode 100644
index 0000000..d898069
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-large-v14/themes_base.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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>
+
+ <style name="Theme.Base.AppCompat.DialogWhenLarge"
+ parent="Theme.Base.AppCompat.DialogWhenLarge.Base" />
+
+ <style name="Theme.Base.AppCompat.Light.DialogWhenLarge"
+ parent="Theme.Base.AppCompat.Light.DialogWhenLarge.Base" />
+
+</resources>
diff --git a/android-support-v7-appcompat/res/values-large/bools.xml b/android-support-v7-appcompat/res/values-large/bools.xml
new file mode 100644
index 0000000..cdadd69
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-large/bools.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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="abc_split_action_bar_is_narrow">false</bool>
+ <bool name="abc_action_bar_embed_tabs_pre_jb">true</bool>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-large/config.xml b/android-support-v7-appcompat/res/values-large/config.xml
new file mode 100644
index 0000000..c4f04a3
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-large/config.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2012, 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>
+ <!-- Whether action menu items should obey the "withText" showAsAction.
+ This may be set to false for situations where space is
+ extremely limited. -->
+ <bool name="abc_config_allowActionMenuItemTextWithIcon">true</bool>
+
+ <!-- see comment in values/config.xml -->
+ <dimen name="abc_config_prefDialogWidth">440dp</dimen>
+</resources> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/values-large/dimens.xml b/android-support-v7-appcompat/res/values-large/dimens.xml
new file mode 100644
index 0000000..de1cefc
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-large/dimens.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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>
+ <!-- Minimum width of the search view text entry area. -->
+ <dimen name="abc_search_view_text_min_width">192dip</dimen>
+ <!-- The maximum number of action buttons that should be permitted within
+ an action bar/action mode. This will be used to determine how many
+ showAsAction="ifRoom" items can fit. "always" items can override this. -->
+ <integer name="abc_max_action_buttons">4</integer>
+
+ <!-- The platform's desired fixed width for a dialog along the major axis
+ (the screen is in landscape). This may be either a fraction or a dimension.-->
+ <item type="dimen" name="dialog_fixed_width_major">60%</item>
+ <!-- The platform's desired fixed width for a dialog along the minor axis
+ (the screen is in portrait). This may be either a fraction or a dimension.-->
+ <item type="dimen" name="dialog_fixed_width_minor">90%</item>
+ <!-- The platform's desired fixed height for a dialog along the major axis
+ (the screen is in portrait). This may be either a fraction or a dimension.-->
+ <item type="dimen" name="dialog_fixed_height_major">60%</item>
+ <!-- The platform's desired fixed height for a dialog along the minor axis
+ (the screen is in landscape). This may be either a fraction or a dimension.-->
+ <item type="dimen" name="dialog_fixed_height_minor">90%</item>
+
+</resources>
diff --git a/android-support-v7-appcompat/res/values-large/themes_base.xml b/android-support-v7-appcompat/res/values-large/themes_base.xml
new file mode 100644
index 0000000..a19dcf0
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-large/themes_base.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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>
+
+ <style name="Theme.Base.AppCompat.DialogWhenLarge"
+ parent="Theme.Base.AppCompat.Dialog.FixedSize" />
+
+ <style name="Theme.Base.AppCompat.Light.DialogWhenLarge"
+ parent="Theme.Base.AppCompat.Dialog.Light.FixedSize" />
+
+</resources>
diff --git a/android-support-v7-appcompat/res/values-lo-rLA/strings.xml b/android-support-v7-appcompat/res/values-lo-rLA/strings.xml
new file mode 100644
index 0000000..7eb42ea
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-lo-rLA/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"ແລ້ວໆ"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"ກັບໄປໜ້າຫຼັກ"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"ຂຶ້ນເທິງ"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"ໂຕເລືອກອື່ນ"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"ຊອກຫາ"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"ຊອກຫາ"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"ລຶບຂໍ້ຄວາມຊອກຫາ"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"ສົ່ງການຊອກຫາ"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"ຊອກຫາດ້ວຍສຽງ"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"ເລືອກແອັບຯ"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"ເບິ່ງທັງຫມົດ"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"ແບ່ງ​ປັນ​ກັບ​ %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"ແບ່ງປັນກັບ"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-lt/strings.xml b/android-support-v7-appcompat/res/values-lt/strings.xml
new file mode 100644
index 0000000..c4738a7
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-lt/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Atlikta"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Eiti į pagrindinį puslapį"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Eiti į viršų"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Daugiau parinkčių"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Paieška"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Paieškos užklausa"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Išvalyti užklausą"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Pateikti užklausą"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Paieška balsu"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Pasirinkti programą"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Peržiūrėti viską"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Bendrinti naudojant „%s“"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Bendrinti naudojant"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-lv/strings.xml b/android-support-v7-appcompat/res/values-lv/strings.xml
new file mode 100644
index 0000000..c33858a
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-lv/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Gatavs"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Pārvietoties uz sākuma ekrānu"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Pārvietoties augšup"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Vairāk opciju"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Meklēt"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Meklēšanas vaicājums"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Notīrīt vaicājumu"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Iesniegt vaicājumu"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Meklēšana ar balsi"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Izvēlieties lietotni"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Skatīt visu"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Kopīgot ar %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Kopīgot ar:"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-mn-rMN/strings.xml b/android-support-v7-appcompat/res/values-mn-rMN/strings.xml
new file mode 100644
index 0000000..203e959
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-mn-rMN/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Дууссан"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Нүүр хуудас руу шилжих"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Дээш шилжих"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Нэмэлт сонголтууд"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Хайх"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Хайх асуулга"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Асуулгыг цэвэрлэх"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Асуулгыг илгээх"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Дуут хайлт"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Апп сонгох"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Бүгдийг харах"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"%s-тай хуваалцах"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Хуваалцах"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-ms-rMY/strings.xml b/android-support-v7-appcompat/res/values-ms-rMY/strings.xml
new file mode 100644
index 0000000..b174068
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-ms-rMY/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Selesai"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Navigasi skrin utama"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Navigasi ke atas"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Lagi pilihan"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Cari"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Pertanyaan carian"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Kosongkan pertanyaan"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Serah pertanyaan"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Carian suara"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Pilih apl"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Lihat semua"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Kongsi dengan %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Kongsi dengan"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-nb/strings.xml b/android-support-v7-appcompat/res/values-nb/strings.xml
new file mode 100644
index 0000000..0d70b3b
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-nb/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Fullført"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Gå til startsiden"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Gå opp"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Flere alternativer"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Søk"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Søkeord"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Slett søket"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Utfør søket"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Talesøk"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Velg en app"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Se alle"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Del med %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Del med"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-nl/strings.xml b/android-support-v7-appcompat/res/values-nl/strings.xml
new file mode 100644
index 0000000..1375f9e
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-nl/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Gereed"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Navigeren naar startpositie"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Omhoog navigeren"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Meer opties"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Zoeken"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Zoekopdracht"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Zoekopdracht wissen"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Zoekopdracht verzenden"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Gesproken zoekopdracht"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Een app selecteren"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Alles weergeven"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Delen met %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Delen met"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-pl/strings.xml b/android-support-v7-appcompat/res/values-pl/strings.xml
new file mode 100644
index 0000000..aa1ba79
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-pl/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Gotowe"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Przejdź do strony głównej"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Przejdź wyżej"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Więcej opcji"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Szukaj"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Wyszukiwane hasło"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Wyczyść zapytanie"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Wyślij zapytanie"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Wyszukiwanie głosowe"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Wybierz aplikację"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Zobacz wszystkie"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Udostępnij dla %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Udostępnij dla"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-pt-rPT/strings.xml b/android-support-v7-appcompat/res/values-pt-rPT/strings.xml
new file mode 100644
index 0000000..0d63f5f
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-pt-rPT/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Concluído"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Navegar para a página inicial"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Navegar para cima"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Mais opções"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Pesquisar"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Consulta de pesquisa"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Limpar consulta"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Enviar consulta"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Pesquisa por voz"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Escolher uma aplicação"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Ver tudo"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Partilhar com %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Partilhar com"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-pt/strings.xml b/android-support-v7-appcompat/res/values-pt/strings.xml
new file mode 100644
index 0000000..88b09ea
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-pt/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Concluído"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Navegar para a página inicial"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Navegar para cima"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Mais opções"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Pesquisar"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Consulta de pesquisa"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Limpar consulta"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Enviar consulta"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Pesquisa por voz"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Selecione um aplicativo"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Ver tudo"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Compartilhar com %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Compartilhar com"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-ro/strings.xml b/android-support-v7-appcompat/res/values-ro/strings.xml
new file mode 100644
index 0000000..36a7b31
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-ro/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Terminat"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Navigați la ecranul de pornire"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Navigați în sus"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Mai multe opțiuni"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Căutați"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Interogare de căutare"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Ștergeți interogarea"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Trimiteți interogarea"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Căutare vocală"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Alegeți o aplicaţie"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Afișați-le pe toate"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Trimiteți la %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Trimiteți la"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-ru/strings.xml b/android-support-v7-appcompat/res/values-ru/strings.xml
new file mode 100644
index 0000000..5c22e5e
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-ru/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Готово"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Перейти на главный экран"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Перейти вверх"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Другие параметры"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Поиск"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Поисковый запрос"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Удалить запрос"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Отправить запрос"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Голосовой поиск"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Выбрать приложение"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Показать все"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Открыть доступ пользователю %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Открыть доступ"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-sk/strings.xml b/android-support-v7-appcompat/res/values-sk/strings.xml
new file mode 100644
index 0000000..253f3e5
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-sk/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Hotovo"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Prejsť na plochu"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Prejsť hore"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Ďalšie možnosti"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Hľadať"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Vyhľadávací dopyt"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Vymazať dopyt"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Odoslať dopyt"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Hlasové vyhľadávanie"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Zvoľte aplikáciu"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Zobraziť všetko"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Zdieľať pomocou %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Zdieľať pomocou"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-sl/strings.xml b/android-support-v7-appcompat/res/values-sl/strings.xml
new file mode 100644
index 0000000..8e3e23e
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-sl/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Končano"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Krmarjenje domov"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Krmarjenje navzgor"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Več možnosti"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Iskanje"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Iskalna poizvedba"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Izbris poizvedbe"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Pošiljanje poizvedbe"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Glasovno iskanje"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Izbira aplikacije"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Pokaži vse"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Deljenje z:"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Deljenje z"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-sr/strings.xml b/android-support-v7-appcompat/res/values-sr/strings.xml
new file mode 100644
index 0000000..213c939
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-sr/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Готово"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Одлазак на Почетну"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Кретање нагоре"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Још опција"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Претрага"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Упит за претрагу"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Брисање упита"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Слање упита"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Гласовна претрага"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Избор апликације"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Прикажи све"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Дели са апликацијом %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Дели са"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-sv/strings.xml b/android-support-v7-appcompat/res/values-sv/strings.xml
new file mode 100644
index 0000000..49c7a5d
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-sv/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Klart"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Visa startsidan"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Navigera uppåt"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Fler alternativ"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Sök"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Sökfråga"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Ta bort frågan"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Skicka fråga"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Röstsökning"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Välj en app"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Visa alla"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Dela med %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Dela med"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-sw/strings.xml b/android-support-v7-appcompat/res/values-sw/strings.xml
new file mode 100644
index 0000000..6455ba5
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-sw/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Nimemaliza"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Nenda mwanzo"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Nenda juu"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Chaguo zaidi"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Tafuta"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Hoja ya utafutaji"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Futa hoja"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Wasilisha hoja"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Tafuta kwa kutamka"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Chagua programu"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Angalia zote"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Shiriki na %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Shiriki na:"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-sw600dp/config.xml b/android-support-v7-appcompat/res/values-sw600dp/config.xml
new file mode 100644
index 0000000..fba21e1
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-sw600dp/config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2012, 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>
+ <!-- see comment in values/config.xml -->
+ <dimen name="abc_config_prefDialogWidth">580dp</dimen>
+</resources> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/values-sw600dp/dimens.xml b/android-support-v7-appcompat/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000..94fe525
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-sw600dp/dimens.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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>
+ <!-- The maximum number of action buttons that should be permitted within
+ an action bar/action mode. This will be used to determine how many
+ showAsAction="ifRoom" items can fit. "always" items can override this. -->
+ <integer name="abc_max_action_buttons">5</integer>
+ <!-- Default height of an action bar. -->
+ <dimen name="abc_action_bar_default_height">56dip</dimen>
+ <!-- Vertical padding around action bar icons. -->
+ <dimen name="abc_action_bar_icon_vertical_padding">4dip</dimen>
+ <!-- Text size for action bar titles -->
+ <dimen name="abc_action_bar_title_text_size">18dp</dimen>
+ <!-- Text size for action bar subtitles -->
+ <dimen name="abc_action_bar_subtitle_text_size">14dp</dimen>
+ <!-- Top margin for action bar subtitles -->
+ <dimen name="abc_action_bar_subtitle_top_margin">-3dp</dimen>
+ <!-- Bottom margin for action bar subtitles -->
+ <dimen name="abc_action_bar_subtitle_bottom_margin">9dip</dimen>
+</resources> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/values-th/strings.xml b/android-support-v7-appcompat/res/values-th/strings.xml
new file mode 100644
index 0000000..275dc57
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-th/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"เสร็จสิ้น"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"นำทางไปหน้าแรก"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"นำทางขึ้น"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"ตัวเลือกอื่น"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"ค้นหา"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"ข้อความค้นหา"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"ล้างข้อความค้นหา"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"ส่งข้อความค้นหา"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"ค้นหาด้วยเสียง"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"เลือกแอป"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"ดูทั้งหมด"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"แชร์กับ %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"แชร์กับ"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-tl/strings.xml b/android-support-v7-appcompat/res/values-tl/strings.xml
new file mode 100644
index 0000000..e0705d6
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-tl/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Tapos na"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Mag-navigate patungo sa home"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Mag-navigate pataas"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Higit pang mga opsyon"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Maghanap"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Query sa paghahanap"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"I-clear ang query"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Isumite ang query"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Paghahanap gamit ang boses"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Pumili ng isang app"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Tingnan lahat"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Ibahagi sa/kay %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Ibahagi sa/kay"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-tr/strings.xml b/android-support-v7-appcompat/res/values-tr/strings.xml
new file mode 100644
index 0000000..61cb966
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-tr/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Tamamlandı"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Ana ekrana git"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Yukarı git"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Diğer seçenekler"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Ara"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Arama sorgusu"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Sorguyu temizle"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Sorguyu gönder"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Sesli arama"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Bir uygulama seçin"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Tümünü göster"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"%s ile paylaş"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Şununla paylaş"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-uk/strings.xml b/android-support-v7-appcompat/res/values-uk/strings.xml
new file mode 100644
index 0000000..f670140
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-uk/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Готово"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Перейти на головний"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Перейти вгору"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Інші опції"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Пошук"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Пошуковий запит"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Очистити запит"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Надіслати запит"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Голосовий пошук"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Вибрати програму"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Переглянути всі"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Надіслати через %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Надіслати через"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-v11/styles_base.xml b/android-support-v7-appcompat/res/values-v11/styles_base.xml
new file mode 100644
index 0000000..2cee503
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-v11/styles_base.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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>
+
+ <!-- Like in themes_base.xml, the namespace "*.AppCompat.Base" is used to
+ define base styles for the platform version. The "*.AppCompat"
+ variants are for direct use or use as parent styles by the app. -->
+ <eat-comment/>
+
+ <!-- Progress Bar -->
+
+ <style name="Widget.AppCompat.Base.ProgressBar.Horizontal"
+ parent="android:Widget.Holo.ProgressBar.Horizontal">
+ </style>
+
+ <style name="Widget.AppCompat.Base.ProgressBar"
+ parent="android:Widget.Holo.ProgressBar">
+ </style>
+
+ <!-- AutoCompleteTextView styles (for SearchView) -->
+
+ <style name="Widget.AppCompat.Base.AutoCompleteTextView"
+ parent="android:Widget.Holo.AutoCompleteTextView">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.AutoCompleteTextView"
+ parent="android:Widget.Holo.Light.AutoCompleteTextView">
+ </style>
+
+</resources> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/values-v11/themes_base.xml b/android-support-v7-appcompat/res/values-v11/themes_base.xml
new file mode 100644
index 0000000..ddd9d59
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-v11/themes_base.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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>
+
+ <!-- Themes in the "Theme.Base" family vary based on the current platform
+ version to provide the correct basis on each device. You probably don't
+ want to use them directly in your apps.
+
+ Themes in the "Theme.AppCompat" family are meant to be extended or used
+ directly by apps.
+
+ This is the values-v11/ file that only declares the Base themes for
+ Honeycomb+. You probably want to edit values/themes.xml instead. -->
+ <eat-comment/>
+
+ <!-- Base platform-dependent theme -->
+ <style name="Theme.Base" parent="android:Theme.Holo">
+ <item name="android:windowNoTitle">true</item>
+ <item name="android:windowActionBar">false</item>
+
+ <!--
+ A native Action Mode could be displayed (for text selection, etc) so we need to ensure
+ that it is positioned correctly, so we request windowActionModeOverlay so that it
+ displays over the compat Action Bar.
+ -->
+ <item name="android:windowActionModeOverlay">true</item>
+
+ <!-- Attributes populated from the framework to be read by apps -->
+ <item name="buttonBarStyle">?android:attr/buttonBarStyle</item>
+ <item name="buttonBarButtonStyle">?android:attr/buttonBarButtonStyle</item>
+ <item name="selectableItemBackground">?android:attr/selectableItemBackground</item>
+ </style>
+
+ <!-- Base platform-dependent theme providing a light-themed activity. -->
+ <style name="Theme.Base.Light" parent="android:Theme.Holo.Light">
+ <item name="android:windowNoTitle">true</item>
+ <item name="android:windowActionBar">false</item>
+
+ <!--
+ A native Action Mode could be displayed (for text selection, etc) so we need to ensure
+ that it is positioned correctly, so we request windowActionModeOverlay so that it
+ displays over the compat Action Bar.
+ -->
+ <item name="android:windowActionModeOverlay">true</item>
+
+ <!-- Attributes populated from the framework to be read by apps -->
+ <item name="buttonBarStyle">?android:attr/buttonBarStyle</item>
+ <item name="buttonBarButtonStyle">?android:attr/buttonBarButtonStyle</item>
+ <item name="selectableItemBackground">?android:attr/selectableItemBackground</item>
+ </style>
+
+ <style name="Theme.Base.AppCompat.Dialog.FixedSize" parent="android:Theme.Holo.Dialog">
+ <item name="windowFixedWidthMajor">@dimen/dialog_fixed_width_major</item>
+ <item name="windowFixedWidthMinor">@dimen/dialog_fixed_width_minor</item>
+ <item name="windowFixedHeightMajor">@dimen/dialog_fixed_height_major</item>
+ <item name="windowFixedHeightMinor">@dimen/dialog_fixed_height_minor</item>
+ <item name="windowActionBar">false</item>
+
+ <!-- Attributes populated from the framework to be read by apps -->
+ <item name="buttonBarStyle">?android:attr/buttonBarStyle</item>
+ <item name="buttonBarButtonStyle">?android:attr/buttonBarButtonStyle</item>
+ <item name="selectableItemBackground">?android:attr/selectableItemBackground</item>
+ </style>
+
+ <style name="Theme.Base.AppCompat.Dialog.Light.FixedSize"
+ parent="android:Theme.Holo.Light.Dialog">
+ <item name="windowFixedWidthMajor">@dimen/dialog_fixed_width_major</item>
+ <item name="windowFixedWidthMinor">@dimen/dialog_fixed_width_minor</item>
+ <item name="windowFixedHeightMajor">@dimen/dialog_fixed_height_major</item>
+ <item name="windowFixedHeightMinor">@dimen/dialog_fixed_height_minor</item>
+ <item name="windowActionBar">false</item>
+
+ <!-- Attributes populated from the framework to be read by apps -->
+ <item name="buttonBarStyle">?android:attr/buttonBarStyle</item>
+ <item name="buttonBarButtonStyle">?android:attr/buttonBarButtonStyle</item>
+ <item name="selectableItemBackground">?android:attr/selectableItemBackground</item>
+ </style>
+
+</resources>
diff --git a/android-support-v7-appcompat/res/values-v14/styles_base.xml b/android-support-v7-appcompat/res/values-v14/styles_base.xml
new file mode 100644
index 0000000..4c64aee
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-v14/styles_base.xml
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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>
+
+ <!-- Like in themes_base.xml, the namespace "*.AppCompat.Base" is used to
+ define base styles for the platform version. The "*.AppCompat"
+ variants are for direct use or use as parent styles by the app. -->
+ <eat-comment/>
+
+ <style name="Widget.AppCompat.Base.ActionBar"
+ parent="android:Widget.Holo.ActionBar">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar"
+ parent="android:Widget.Holo.Light.ActionBar">
+ </style>
+
+ <style name="Widget.AppCompat.Base.ActionBar.Solid"
+ parent="android:Widget.Holo.ActionBar.Solid">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar.Solid"
+ parent="android:Widget.Holo.Light.ActionBar.Solid">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar.Solid.Inverse"
+ parent="android:Widget.Holo.Light.ActionBar.Solid.Inverse">
+ </style>
+
+ <style name="Widget.AppCompat.Base.ActionBar.TabBar"
+ parent="android:Widget.Holo.ActionBar.TabBar">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar.TabBar"
+ parent="android:Widget.Holo.Light.ActionBar.TabBar">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar.TabBar.Inverse"
+ parent="android:Widget.Holo.Light.ActionBar.TabBar.Inverse">
+ </style>
+
+ <style name="Widget.AppCompat.Base.ActionBar.TabView"
+ parent="android:Widget.Holo.ActionBar.TabView">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar.TabView"
+ parent="android:Widget.Holo.Light.ActionBar.TabView">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar.TabView.Inverse"
+ parent="android:Widget.Holo.Light.ActionBar.TabView.Inverse">
+ </style>
+
+ <style name="Widget.AppCompat.Base.ActionBar.TabText"
+ parent="android:Widget.Holo.ActionBar.TabText">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar.TabText"
+ parent="android:Widget.Holo.Light.ActionBar.TabText">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar.TabText.Inverse"
+ parent="android:Widget.Holo.Light.ActionBar.TabText.Inverse">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionMode.Inverse"
+ parent="android:Widget.Holo.Light.ActionMode.Inverse">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionBar.Menu"
+ parent="android:TextAppearance.Holo.Widget.ActionBar.Menu">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionBar.Title"
+ parent="android:TextAppearance.Holo.Widget.ActionBar.Title">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionBar.Subtitle"
+ parent="android:TextAppearance.Holo.Widget.ActionBar.Subtitle">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionBar.Title.Inverse"
+ parent="android:TextAppearance.Holo.Widget.ActionBar.Title.Inverse">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionBar.Subtitle.Inverse"
+ parent="android:TextAppearance.Holo.Widget.ActionBar.Subtitle.Inverse">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionMode.Title"
+ parent="android:TextAppearance.Holo.Widget.ActionMode.Title">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionMode.Subtitle"
+ parent="android:TextAppearance.Holo.Widget.ActionMode.Subtitle">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionMode.Title.Inverse"
+ parent="android:TextAppearance.Holo.Widget.ActionMode.Title.Inverse">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionMode.Subtitle.Inverse"
+ parent="android:TextAppearance.Holo.Widget.ActionMode.Subtitle.Inverse">
+ </style>
+
+ <!-- Action Button Styles -->
+
+ <style name="Widget.AppCompat.Base.ActionButton" parent="android:Widget.Holo.ActionButton">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionButton"
+ parent="android:Widget.Holo.Light.ActionButton">
+ </style>
+
+ <style name="Widget.AppCompat.Base.ActionButton.CloseMode"
+ parent="android:Widget.Holo.ActionButton.CloseMode">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionButton.CloseMode"
+ parent="android:Widget.Holo.Light.ActionButton.CloseMode">
+ </style>
+
+ <style name="Widget.AppCompat.Base.ActionButton.Overflow"
+ parent="android:Widget.Holo.ActionButton.Overflow">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionButton.Overflow"
+ parent="android:Widget.Holo.Light.ActionButton.Overflow">
+ </style>
+
+ <!-- Spinner Widgets -->
+
+ <style name="Widget.AppCompat.Base.ListView.DropDown"
+ parent="android:Widget.Holo.ListView.DropDown"/>
+
+ <style name="Widget.AppCompat.Light.Base.ListView.DropDown"
+ parent="android:Widget.Holo.ListView.DropDown"/>
+
+ <style name="Widget.AppCompat.Base.DropDownItem.Spinner"
+ parent="android:Widget.Holo.DropDownItem.Spinner"/>
+
+ <style name="Widget.AppCompat.Light.Base.DropDownItem.Spinner"
+ parent="android:Widget.Holo.Light.DropDownItem.Spinner"/>
+
+ <style name="Widget.AppCompat.Base.Spinner" parent="android:Widget.Holo.Spinner" />
+
+ <style name="Widget.AppCompat.Light.Base.Spinner" parent="android:Widget.Holo.Light.Spinner"/>
+
+ <style name="Widget.AppCompat.Base.ListView.Menu" parent="android:Widget.ListView.Menu" />
+
+ <!-- Popup Menu -->
+
+ <style name="Widget.AppCompat.Base.ListPopupWindow"
+ parent="android:Widget.Holo.ListPopupWindow">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ListPopupWindow"
+ parent="android:Widget.Holo.Light.ListPopupWindow">
+ </style>
+
+ <style name="Widget.AppCompat.Base.PopupMenu" parent="android:Widget.Holo.PopupMenu">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.PopupMenu"
+ parent="android:Widget.Holo.Light.PopupMenu">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Base.Widget.PopupMenu.Large"
+ parent="android:TextAppearance.Holo.Widget.PopupMenu.Large">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Base.Widget.PopupMenu.Small"
+ parent="android:TextAppearance.Holo.Widget.PopupMenu.Small">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Light.Base.Widget.PopupMenu.Large"
+ parent="android:TextAppearance.Holo.Widget.PopupMenu.Large">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Light.Base.Widget.PopupMenu.Small"
+ parent="android:TextAppearance.Holo.Widget.PopupMenu.Small">
+ </style>
+
+ <!-- Search View result styles -->
+
+ <style name="TextAppearance.AppCompat.Base.SearchResult.Title"
+ parent="@android:TextAppearance.Holo.SearchResult.Title">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Base.SearchResult.Subtitle"
+ parent="@android:TextAppearance.Holo.SearchResult.Subtitle">
+ </style>
+
+ <!--
+ TextAppearance.Holo.Light.SearchResult.* are private so we extend from the default
+ versions instead (which are exactly the same).
+ -->
+ <style name="TextAppearance.AppCompat.Light.Base.SearchResult.Title"
+ parent="@android:TextAppearance.Holo.SearchResult.Title">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Light.Base.SearchResult.Subtitle"
+ parent="@android:TextAppearance.Holo.SearchResult.Subtitle">
+ </style>
+
+ <style name="Widget.AppCompat.Base.ActivityChooserView" parent="">
+ <item name="android:gravity">center</item>
+ <item name="android:background">@drawable/abc_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>
+ </style>
+
+</resources>
diff --git a/android-support-v7-appcompat/res/values-v14/themes_base.xml b/android-support-v7-appcompat/res/values-v14/themes_base.xml
new file mode 100644
index 0000000..75c4ee7
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-v14/themes_base.xml
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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>
+
+ <!-- Themes in the "Theme.Base" family vary based on the current platform
+ version to provide the correct basis on each device. You probably don't
+ want to use them directly in your apps.
+
+ Themes in the "Theme.AppCompat" family are meant to be extended or used
+ directly by apps.
+
+ This is the values-v14/ file that only declares the Base themes for
+ Ice Cream Sandwich+. You probably want to edit values/themes.xml instead. -->
+ <eat-comment/>
+
+ <!-- Base platform-dependent theme providing an action bar in a dark-themed activity. -->
+ <style name="Theme.Base.AppCompat" parent="android:Theme.Holo">
+ <!-- Copy system flag values for our use -->
+ <item name="windowActionBar">?android:attr/windowActionBar</item>
+ <item name="actionBarSize">?android:attr/actionBarSize</item>
+ <item name="actionBarItemBackground">?android:attr/actionBarItemBackground</item>
+ <item name="selectableItemBackground">?android:attr/selectableItemBackground</item>
+ <item name="actionButtonStyle">?android:attr/actionButtonStyle</item>
+ <item name="dividerVertical">?android:attr/dividerVertical</item>
+ <item name="dividerHorizontal">?android:attr/dividerHorizontal</item>
+ <item name="actionBarWidgetTheme">@null</item>
+ <item name="android:actionBarWidgetTheme">?attr/actionBarWidgetTheme</item>
+
+ <!-- Required for use of support_simple_spinner_dropdown_item.xml -->
+ <item name="listPreferredItemHeight">?android:attr/listPreferredItemHeight</item>
+ <item name="listPreferredItemHeightSmall">?android:attr/listPreferredItemHeightSmall</item>
+ <item name="listPreferredItemHeightLarge">?android:attr/listPreferredItemHeightLarge</item>
+ <item name="listPreferredItemPaddingLeft">?android:attr/listPreferredItemPaddingLeft</item>
+ <item name="listPreferredItemPaddingRight">?android:attr/listPreferredItemPaddingRight
+ </item>
+
+ <!-- Attributes populated from the framework to be read by apps -->
+ <item name="buttonBarStyle">?android:attr/buttonBarStyle</item>
+ <item name="buttonBarButtonStyle">?android:attr/buttonBarButtonStyle</item>
+ </style>
+
+ <!-- Base platform-dependent theme providing an action bar in a light-themed activity. -->
+ <style name="Theme.Base.AppCompat.Light" parent="android:Theme.Holo.Light">
+ <!-- Copy system flag values for our use -->
+ <item name="windowActionBar">?android:attr/windowActionBar</item>
+ <item name="actionBarSize">?android:attr/actionBarSize</item>
+ <item name="actionBarItemBackground">?android:attr/actionBarItemBackground</item>
+ <item name="selectableItemBackground">?android:attr/selectableItemBackground</item>
+ <item name="actionButtonStyle">?android:attr/actionButtonStyle</item>
+ <item name="dividerVertical">?android:attr/dividerVertical</item>
+ <item name="dividerHorizontal">?android:attr/dividerHorizontal</item>
+ <item name="actionBarWidgetTheme">@null</item>
+ <item name="android:actionBarWidgetTheme">?attr/actionBarWidgetTheme</item>
+
+ <!-- Required for use of support_simple_spinner_dropdown_item.xml -->
+ <item name="listPreferredItemHeight">?android:attr/listPreferredItemHeight</item>
+ <item name="listPreferredItemHeightSmall">?android:attr/listPreferredItemHeightSmall</item>
+ <item name="listPreferredItemHeightLarge">?android:attr/listPreferredItemHeightLarge</item>
+ <item name="listPreferredItemPaddingLeft">?android:attr/listPreferredItemPaddingLeft</item>
+ <item name="listPreferredItemPaddingRight">?android:attr/listPreferredItemPaddingRight
+ </item>
+
+ <!-- Attributes populated from the framework to be read by apps -->
+ <item name="buttonBarStyle">?android:attr/buttonBarStyle</item>
+ <item name="buttonBarButtonStyle">?android:attr/buttonBarButtonStyle</item>
+ </style>
+
+ <!-- Base platform-dependent theme providing a dark action bar in a light-themed activity. -->
+ <style name="Theme.Base.AppCompat.Light.DarkActionBar"
+ parent="android:Theme.Holo.Light.DarkActionBar">
+ <!-- Copy system flag values for our use -->
+ <item name="windowActionBar">?android:attr/windowActionBar</item>
+ <item name="actionBarSize">?android:attr/actionBarSize</item>
+ <item name="actionBarItemBackground">?android:attr/actionBarItemBackground</item>
+ <item name="selectableItemBackground">?android:attr/selectableItemBackground</item>
+ <item name="actionButtonStyle">?android:attr/actionButtonStyle</item>
+ <item name="dividerVertical">?android:attr/dividerVertical</item>
+ <item name="dividerHorizontal">?android:attr/dividerHorizontal</item>
+ <item name="actionBarWidgetTheme">@style/Theme.AppCompat</item>
+ <item name="android:actionBarWidgetTheme">?attr/actionBarWidgetTheme</item>
+
+ <!-- Required for use of support_simple_spinner_dropdown_item.xml -->
+ <item name="listPreferredItemHeight">?android:attr/listPreferredItemHeight</item>
+ <item name="listPreferredItemHeightSmall">?android:attr/listPreferredItemHeightSmall</item>
+ <item name="listPreferredItemHeightLarge">?android:attr/listPreferredItemHeightLarge</item>
+ <item name="listPreferredItemPaddingLeft">?android:attr/listPreferredItemPaddingLeft</item>
+ <item name="listPreferredItemPaddingRight">?android:attr/listPreferredItemPaddingRight
+ </item>
+
+ <!-- Attributes populated from the framework to be read by apps -->
+ <item name="buttonBarStyle">?android:attr/buttonBarStyle</item>
+ <item name="buttonBarButtonStyle">?android:attr/buttonBarButtonStyle</item>
+ </style>
+
+ <style name="Theme.Base.AppCompat.DialogWhenLarge"
+ parent="Theme.Base.AppCompat.DialogWhenLarge.Base" />
+
+ <style name="Theme.Base.AppCompat.Light.DialogWhenLarge"
+ parent="Theme.Base.AppCompat.Light.DialogWhenLarge.Base" />
+
+ <!--
+ As we have defined the theme in values-large (for compat) and values-large takes precedence
+ over values-v14, we need to reset back to the Holo parent in values-large-v14. As the themes
+ in values-v14 & values-large-v14 are exactly the same, these "double base" themes can be
+ inherited from in both values-v14 and values-large-v14.
+ -->
+
+ <style name="Theme.Base.AppCompat.DialogWhenLarge.Base"
+ parent="android:Theme.Holo.DialogWhenLarge">
+ <!-- Copy system flag values for our use -->
+ <item name="windowActionBar">?android:attr/windowActionBar</item>
+ <item name="actionBarSize">?android:attr/actionBarSize</item>
+ <item name="actionBarItemBackground">?android:attr/actionBarItemBackground</item>
+ <item name="selectableItemBackground">?android:attr/selectableItemBackground</item>
+ <item name="actionButtonStyle">?android:attr/actionButtonStyle</item>
+ <item name="dividerVertical">?android:attr/dividerVertical</item>
+ <item name="dividerHorizontal">?android:attr/dividerHorizontal</item>
+ <item name="actionBarWidgetTheme">@null</item>
+ <item name="android:actionBarWidgetTheme">?attr/actionBarWidgetTheme</item>
+
+ <!-- Required for use of support_simple_spinner_dropdown_item.xml -->
+ <item name="listPreferredItemHeight">?android:attr/listPreferredItemHeight</item>
+ <item name="listPreferredItemHeightSmall">?android:attr/listPreferredItemHeightSmall</item>
+ <item name="listPreferredItemHeightLarge">?android:attr/listPreferredItemHeightLarge</item>
+ <item name="listPreferredItemPaddingLeft">?android:attr/listPreferredItemPaddingLeft</item>
+ <item name="listPreferredItemPaddingRight">?android:attr/listPreferredItemPaddingRight
+ </item>
+
+ <!-- Attributes populated from the framework to be read by apps -->
+ <item name="buttonBarStyle">?android:attr/buttonBarStyle</item>
+ <item name="buttonBarButtonStyle">?android:attr/buttonBarButtonStyle</item>
+ </style>
+
+ <style name="Theme.Base.AppCompat.Light.DialogWhenLarge.Base"
+ parent="android:Theme.Holo.Light.DialogWhenLarge">
+ <!-- Copy system flag values for our use -->
+ <item name="windowActionBar">?android:attr/windowActionBar</item>
+ <item name="actionBarSize">?android:attr/actionBarSize</item>
+ <item name="actionBarItemBackground">?android:attr/actionBarItemBackground</item>
+ <item name="selectableItemBackground">?android:attr/selectableItemBackground</item>
+ <item name="actionButtonStyle">?android:attr/actionButtonStyle</item>
+ <item name="dividerVertical">?android:attr/dividerVertical</item>
+ <item name="dividerHorizontal">?android:attr/dividerHorizontal</item>
+ <item name="actionBarWidgetTheme">@null</item>
+ <item name="android:actionBarWidgetTheme">?attr/actionBarWidgetTheme</item>
+
+ <!-- Required for use of support_simple_spinner_dropdown_item.xml -->
+ <item name="listPreferredItemHeight">?android:attr/listPreferredItemHeight</item>
+ <item name="listPreferredItemHeightSmall">?android:attr/listPreferredItemHeightSmall</item>
+ <item name="listPreferredItemHeightLarge">?android:attr/listPreferredItemHeightLarge</item>
+ <item name="listPreferredItemPaddingLeft">?android:attr/listPreferredItemPaddingLeft</item>
+ <item name="listPreferredItemPaddingRight">?android:attr/listPreferredItemPaddingRight
+ </item>
+
+ <!-- Attributes populated from the framework to be read by apps -->
+ <item name="buttonBarStyle">?android:attr/buttonBarStyle</item>
+ <item name="buttonBarButtonStyle">?android:attr/buttonBarButtonStyle</item>
+ </style>
+
+</resources>
diff --git a/android-support-v7-appcompat/res/values-vi/strings.xml b/android-support-v7-appcompat/res/values-vi/strings.xml
new file mode 100644
index 0000000..0840f73
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-vi/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Xong"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Điều hướng về trang chủ"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Điều hướng lên trên"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Thêm tùy chọn"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Tìm kiếm"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Tìm kiếm truy vấn"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Xóa truy vấn"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Gửi truy vấn"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Tìm kiếm bằng giọng nói"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Chọn một ứng dụng"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Xem tất cả"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Chia sẻ với %s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Chia sẻ với"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-w360dp/dimens.xml b/android-support-v7-appcompat/res/values-w360dp/dimens.xml
new file mode 100644
index 0000000..e5b2456
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-w360dp/dimens.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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>
+ <!-- The maximum number of action buttons that should be permitted within
+ an action bar/action mode. This will be used to determine how many
+ showAsAction="ifRoom" items can fit. "always" items can override this. -->
+ <integer name="abc_max_action_buttons">3</integer>
+</resources> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/values-w480dp/bools.xml b/android-support-v7-appcompat/res/values-w480dp/bools.xml
new file mode 100644
index 0000000..6e6a3df
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-w480dp/bools.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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="abc_action_bar_embed_tabs_pre_jb">true</bool>
+ <bool name="abc_split_action_bar_is_narrow">false</bool>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-w480dp/config.xml b/android-support-v7-appcompat/res/values-w480dp/config.xml
new file mode 100644
index 0000000..e95b6ff
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-w480dp/config.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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="abc_config_allowActionMenuItemTextWithIcon">true</bool>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-w500dp/dimens.xml b/android-support-v7-appcompat/res/values-w500dp/dimens.xml
new file mode 100644
index 0000000..dd6458b
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-w500dp/dimens.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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>
+ <!-- The maximum number of action buttons that should be permitted within
+ an action bar/action mode. This will be used to determine how many
+ showAsAction="ifRoom" items can fit. "always" items can override this. -->
+ <integer name="abc_max_action_buttons">4</integer>
+</resources> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/values-w600dp/dimens.xml b/android-support-v7-appcompat/res/values-w600dp/dimens.xml
new file mode 100644
index 0000000..5bbc34d
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-w600dp/dimens.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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>
+ <!-- The maximum number of action buttons that should be permitted within
+ an action bar/action mode. This will be used to determine how many
+ showAsAction="ifRoom" items can fit. "always" items can override this. -->
+ <integer name="abc_max_action_buttons">5</integer>
+
+ <!-- Default height of an action bar. -->
+ <dimen name="abc_action_bar_default_height">56dip</dimen>
+ <!-- Vertical padding around action bar icons. -->
+ <dimen name="abc_action_bar_icon_vertical_padding">4dip</dimen>
+ <!-- Text size for action bar titles -->
+ <dimen name="abc_action_bar_title_text_size">18dp</dimen>
+ <!-- Text size for action bar subtitles -->
+ <dimen name="abc_action_bar_subtitle_text_size">14dp</dimen>
+ <!-- Top margin for action bar subtitles -->
+ <dimen name="abc_action_bar_subtitle_top_margin">-3dp</dimen>
+ <!-- Bottom margin for action bar subtitles -->
+ <dimen name="abc_action_bar_subtitle_bottom_margin">9dip</dimen>
+ <!-- Minimum width for an action button in the menu area of an action bar -->
+ <dimen name="abc_action_button_min_width">64dip</dimen>
+
+ <!-- Minimum width of the search view text entry area. -->
+ <dimen name="abc_search_view_text_min_width">192dip</dimen>
+</resources> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/values-w720dp/bools.xml b/android-support-v7-appcompat/res/values-w720dp/bools.xml
new file mode 100644
index 0000000..05c5aab
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-w720dp/bools.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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="abc_action_bar_expanded_action_views_exclusive">false</bool>
+</resources> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/values-xlarge/bools.xml b/android-support-v7-appcompat/res/values-xlarge/bools.xml
new file mode 100644
index 0000000..05c5aab
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-xlarge/bools.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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="abc_action_bar_expanded_action_views_exclusive">false</bool>
+</resources> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/values-xlarge/dimens.xml b/android-support-v7-appcompat/res/values-xlarge/dimens.xml
new file mode 100644
index 0000000..4172442
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-xlarge/dimens.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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>
+
+ <!-- The maximum number of action buttons that should be permitted within
+ an action bar/action mode. This will be used to determine how many
+ showAsAction="ifRoom" items can fit. "always" items can override this. -->
+ <integer name="abc_max_action_buttons">5</integer>
+
+ <!-- Default height of an action bar. -->
+ <dimen name="abc_action_bar_default_height">56dip</dimen>
+ <!-- Vertical padding around action bar icons. -->
+ <dimen name="abc_action_bar_icon_vertical_padding">4dip</dimen>
+ <!-- Text size for action bar titles -->
+ <dimen name="abc_action_bar_title_text_size">18dp</dimen>
+ <!-- Text size for action bar subtitles -->
+ <dimen name="abc_action_bar_subtitle_text_size">14dp</dimen>
+ <!-- Top margin for action bar subtitles -->
+ <dimen name="abc_action_bar_subtitle_top_margin">-3dp</dimen>
+ <!-- Bottom margin for action bar subtitles -->
+ <dimen name="abc_action_bar_subtitle_bottom_margin">9dip</dimen>
+ <!-- Minimum width for an action button in the menu area of an action bar -->
+ <dimen name="abc_action_button_min_width">64dip</dimen>
+
+ <!-- Minimum width of the search view text entry area. -->
+ <dimen name="abc_search_view_text_min_width">192dip</dimen>
+
+ <!-- The platform's desired fixed width for a dialog along the major axis
+ (the screen is in landscape). This may be either a fraction or a dimension.-->
+ <item type="dimen" name="dialog_fixed_width_major">50%</item>
+ <!-- The platform's desired fixed width for a dialog along the minor axis
+ (the screen is in portrait). This may be either a fraction or a dimension.-->
+ <item type="dimen" name="dialog_fixed_width_minor">70%</item>
+ <!-- The platform's desired fixed height for a dialog along the major axis
+ (the screen is in portrait). This may be either a fraction or a dimension.-->
+ <item type="dimen" name="dialog_fixed_height_major">60%</item>
+ <!-- The platform's desired fixed height for a dialog along the minor axis
+ (the screen is in landscape). This may be either a fraction or a dimension.-->
+ <item type="dimen" name="dialog_fixed_height_minor">90%</item>
+
+</resources>
diff --git a/android-support-v7-appcompat/res/values-zh-rCN/strings.xml b/android-support-v7-appcompat/res/values-zh-rCN/strings.xml
new file mode 100644
index 0000000..87b36b0
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-zh-rCN/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"完成"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"转到主屏幕"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"转到上一层级"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"更多选项"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"搜索"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"搜索查询"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"清除查询"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"提交查询"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"语音搜索"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"选择应用"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"查看全部"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"通过%s分享"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"分享方式"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-zh-rHK/strings.xml b/android-support-v7-appcompat/res/values-zh-rHK/strings.xml
new file mode 100644
index 0000000..f6a367d
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-zh-rHK/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"完成"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"瀏覽主頁"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"向上瀏覽"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"更多選項"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"搜尋"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"搜尋查詢"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"清除查詢"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"提交查詢"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"語音搜尋"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"選擇應用程式"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"顯示全部"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"與「%s」分享"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"分享對象"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-zh-rTW/strings.xml b/android-support-v7-appcompat/res/values-zh-rTW/strings.xml
new file mode 100644
index 0000000..c804ccf
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-zh-rTW/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"完成"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"瀏覽首頁"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"向上瀏覽"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"更多選項"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"搜尋"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"搜尋查詢"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"清除查詢"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"提交查詢"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"語音搜尋"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"選擇應用程式"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"查看全部"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"與「%s」分享"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"選擇分享對象"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values-zu/strings.xml b/android-support-v7-appcompat/res/values-zu/strings.xml
new file mode 100644
index 0000000..92eac7e
--- /dev/null
+++ b/android-support-v7-appcompat/res/values-zu/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2012 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:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="abc_action_mode_done" msgid="4076576682505996667">"Kwenziwe"</string>
+ <string name="abc_action_bar_home_description" msgid="4600421777120114993">"Zulazulela ekhaya"</string>
+ <string name="abc_action_bar_up_description" msgid="1594238315039666878">"Zulazulela phezulu"</string>
+ <string name="abc_action_menu_overflow_description" msgid="3588849162933574182">"Izinketho eziningi"</string>
+ <string name="abc_searchview_description_search" msgid="8264924765203268293">"Sesha"</string>
+ <string name="abc_searchview_description_query" msgid="2550479030709304392">"Umbuzo wosesho"</string>
+ <string name="abc_searchview_description_clear" msgid="3691816814315814921">"Sula inkinga"</string>
+ <string name="abc_searchview_description_submit" msgid="8928215447528550784">"Hambisa umbuzo"</string>
+ <string name="abc_searchview_description_voice" msgid="893419373245838918">"Ukusesha ngezwi"</string>
+ <string name="abc_activitychooserview_choose_application" msgid="2031811694353399454">"Khetha uhlelo lokusebenza"</string>
+ <string name="abc_activity_chooser_view_see_all" msgid="7468859129482906941">"Buka konke"</string>
+ <string name="abc_shareactionprovider_share_with_application" msgid="7165123711973476752">"Yabelana no-%s"</string>
+ <string name="abc_shareactionprovider_share_with" msgid="3421042268587513524">"Yabelana no-"</string>
+</resources>
diff --git a/android-support-v7-appcompat/res/values/attrs.xml b/android-support-v7-appcompat/res/values/attrs.xml
new file mode 100644
index 0000000..e0c8465
--- /dev/null
+++ b/android-support-v7-appcompat/res/values/attrs.xml
@@ -0,0 +1,575 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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>
+ <!-- Many app-specific attributes are declared in this file.
+ Unless otherwise specified, they are intended to be set within
+ the context of a theme declaration.
+
+ Each cluster of attributes below states whether it is meant to
+ be set by the app and read by the system, or set by the system and
+ read by the app. -->
+ <eat-comment/>
+
+ <!-- These attributes are meant to be specified and customized by the app.
+ The system will read and apply them as needed. These attributes control
+ properties of the activity window, such as whether an action bar should
+ be present and whether it should overlay content. -->
+ <declare-styleable name="ActionBarWindow">
+ <attr name="windowActionBar" format="boolean"/>
+ <attr name="windowActionBarOverlay" format="boolean"/>
+ <attr name="windowSplitActionBar" format="boolean" />
+
+ <!-- A fixed width for the window along the major axis of the screen,
+ that is, when in landscape. Can be either an absolute dimension
+ or a fraction of the screen size in that dimension. -->
+ <attr name="windowFixedWidthMajor" format="dimension|fraction" />
+ <!-- A fixed height for the window along the minor axis of the screen,
+ that is, when in landscape. Can be either an absolute dimension
+ or a fraction of the screen size in that dimension. -->
+ <attr name="windowFixedHeightMinor" format="dimension|fraction" />
+
+ <!-- A fixed width for the window along the minor axis of the screen,
+ that is, when in portrait. Can be either an absolute dimension
+ or a fraction of the screen size in that dimension. -->
+ <attr name="windowFixedWidthMinor" format="dimension|fraction" />
+ <!-- A fixed height for the window along the major axis of the screen,
+ that is, when in portrait. Can be either an absolute dimension
+ or a fraction of the screen size in that dimension. -->
+ <attr name="windowFixedHeightMajor" format="dimension|fraction" />
+
+ </declare-styleable>
+
+ <!-- ============================================ -->
+
+ <!-- Action bar appearance and styling attributes.
+ These attributes are meant to be specified and customized by the
+ app. The system will read and apply them as needed. -->
+ <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 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="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"/>
+ <!-- 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"/>
+ <!-- Specifies a drawable to use for the 'home as up' indicator. -->
+ <attr name="homeAsUpIndicator" 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"/>
+ <!-- Default action button style. -->
+ <attr name="actionButtonStyle" format="reference"/>
+
+ <!-- ============================================ -->
+
+ <!-- Assorted theme compatibility attributes.
+ These attributes are meant to be set by the system and read by apps
+ for use in layouts or other style declarations. -->
+ <eat-comment/>
+ <!-- A style that may be applied to horizontal LinearLayouts
+ to form a button bar. -->
+ <attr name="buttonBarStyle" format="reference"/>
+ <!-- A style that may be applied to Buttons placed within a
+ LinearLayout with the style buttonBarStyle to form a button bar. -->
+ <attr name="buttonBarButtonStyle" format="reference"/>
+ <!-- A style that may be applied to buttons or other selectable items
+ that should react to pressed and focus states, but that do not
+ have a clear visual border along the edges. -->
+ <attr name="selectableItemBackground" format="reference"/>
+ <!-- A drawable that may be used as a vertical divider between visual elements. -->
+ <attr name="dividerVertical" format="reference"/>
+ <!-- A drawable that may be used as a horizontal divider between visual elements. -->
+ <attr name="dividerHorizontal" format="reference"/>
+
+ <!-- The preferred list item height. -->
+ <attr name="listPreferredItemHeight" format="dimension"/>
+ <!-- A smaller, sleeker list item height. -->
+ <attr name="listPreferredItemHeightSmall" format="dimension"/>
+ <!-- A larger, more robust list item height. -->
+ <attr name="listPreferredItemHeightLarge" 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"/>
+
+ <!-- ListPopupWindow comaptibility -->
+ <attr name="dropDownListViewStyle" format="reference"/>
+ <attr name="listPopupWindowStyle" format="reference"/>
+
+
+ <!-- The preferred TextAppearance for the primary text of list items. -->
+ <attr name="textAppearanceListItem" format="reference"/>
+ <!-- The preferred TextAppearance for the primary text of small list items. -->
+ <attr name="textAppearanceListItemSmall" format="reference"/>
+
+ <attr name="title" format="string"/>
+ <attr name="height" format="dimension"/>
+
+
+ <!-- ============================================ -->
+
+ <!-- Attributes used to style the Action Bar.
+ These should be set on your theme; the default actionBarStyle will
+ propagate them to the correct elements as needed.
+
+ Please Note: when overriding attributes for an ActionBar style
+ you must specify each attribute twice: once with the "android:"
+ namespace prefix and once without. -->
+ <declare-styleable name="ActionBar">
+ <!-- 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"/>
+ <!-- Specifies subtitle text used for navigationMode="normal" -->
+ <attr name="subtitle" format="string"/>
+ <!-- Specifies a style to use for title text. -->
+ <attr name="titleTextStyle" format="reference"/>
+ <!-- Specifies a style to use for subtitle text. -->
+ <attr name="subtitleTextStyle" format="reference"/>
+ <!-- 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" format="reference"/>
+ <!-- Specifies a background drawable for the action bar. -->
+ <attr name="background" format="reference"/>
+ <!-- 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" format="reference|color"/>
+ <!-- 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>
+
+ <!-- Valid LayoutParams for views placed in the action bar as custom views. -->
+ <declare-styleable name="ActionBarLayout">
+ <attr name="android:layout_gravity"/>
+ </declare-styleable>
+
+ <declare-styleable name="ActionMenuItemView">
+ <attr name="android:minWidth"/>
+ </declare-styleable>
+
+ <declare-styleable name="ActionMode">
+ <!-- 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="View">
+ <!-- Sets the padding, in pixels, of the start edge; see {@link android.R.attr#padding}. -->
+ <attr name="paddingStart" format="dimension"/>
+ <!-- Sets the padding, in pixels, of the end edge; see {@link android.R.attr#padding}. -->
+ <attr name="paddingEnd" format="dimension"/>
+
+ <!-- Boolean that controls whether a view can take focus. By default the user can not
+ move focus to a view; by setting this attribute to true the view is
+ allowed to take focus. This value does not impact the behavior of
+ directly calling {@link android.view.View#requestFocus}, which will
+ always request focus regardless of this view. It only impacts where
+ focus navigation will try to move focus. -->
+ <attr name="android:focusable" />
+ </declare-styleable>
+
+ <!-- =================== -->
+ <!-- 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 Cut action button in Contextual Action Bar -->
+ <attr name="actionModeCutDrawable" format="reference"/>
+ <!-- Drawable to use for the Copy action button in Contextual Action Bar -->
+ <attr name="actionModeCopyDrawable" format="reference"/>
+ <!-- Drawable to use for the Paste action button in Contextual Action Bar -->
+ <attr name="actionModePasteDrawable" format="reference"/>
+ <!-- Drawable to use for the Select all action button in Contextual Action Bar -->
+ <attr name="actionModeSelectAllDrawable" format="reference"/>
+ <!-- Drawable to use for the Share action button in WebView selection action modes -->
+ <attr name="actionModeShareDrawable" format="reference"/>
+ <!-- Drawable to use for the Find action button in WebView selection action modes -->
+ <attr name="actionModeFindDrawable" format="reference"/>
+ <!-- Drawable to use for the Web Search action button in WebView selection action modes -->
+ <attr name="actionModeWebSearchDrawable" format="reference"/>
+
+ <!-- PopupWindow style to use for action modes when showing as a window overlay. -->
+ <attr name="actionModePopupWindowStyle" format="reference"/>
+
+ <!-- These are the standard attributes that make up a complete theme. -->
+ <declare-styleable name="Theme">
+ <!-- Default ActionBar dropdown style. -->
+ <attr name="actionDropDownStyle" format="reference"/>
+ <!-- The preferred item height for dropdown lists. -->
+ <attr name="dropdownListPreferredItemHeight" format="dimension"/>
+ <!-- Default PopupMenu style. -->
+ <attr name="popupMenuStyle" format="reference"/>
+
+ <!-- ============ -->
+ <!-- Panel styles -->
+ <!-- ============ -->
+ <eat-comment />
+
+ <!-- Default Panel Menu width. -->
+ <attr name="panelMenuListWidth" format="dimension" />
+
+ <!-- Default Panel Menu style. -->
+ <attr name="panelMenuListTheme" format="reference" />
+
+ <!-- Drawable used as a background for selected list items. -->
+ <attr name="listChoiceBackgroundIndicator" format="reference" />
+
+ </declare-styleable>
+
+ <declare-styleable name="MenuView">
+ <!-- Default appearance of menu item text. -->
+ <attr name="android:itemTextAppearance"/>
+ <!-- Default horizontal divider between rows of menu items. -->
+ <attr name="android:horizontalDivider"/>
+ <!-- Default vertical divider between menu items. -->
+ <attr name="android:verticalDivider"/>
+ <!-- Default background for the menu header. -->
+ <attr name="android:headerBackground"/>
+ <!-- Default background for each menu item. -->
+ <attr name="android:itemBackground"/>
+ <!-- Default animations for the menu. -->
+ <attr name="android:windowAnimationStyle"/>
+ <!-- Default disabled icon alpha for each menu item that shows an icon. -->
+ <attr name="android:itemIconDisabledAlpha"/>
+ <!-- Whether space should be reserved in layout when an icon is missing. -->
+ <attr name="android:preserveIconSpacing"/>
+ </declare-styleable>
+ <declare-styleable name="ActionMenuView">
+ <!-- Size of padding on either end of a divider. -->
+ </declare-styleable>
+
+ <!-- Base attributes that are available to all groups. -->
+ <declare-styleable name="MenuGroup">
+
+ <!-- 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="MenuItem">
+
+ <!-- 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="showAsAction">
+ <!-- Never show this item in an action bar, show it in the overflow menu instead.
+ Mutually exclusive with "ifRoom" and "always". -->
+ <flag name="never" value="0" />
+ <!-- Show this item in an action bar if there is room for it as determined
+ by the system. Favor this option over "always" where possible.
+ Mutually exclusive with "never" and "always". -->
+ <flag name="ifRoom" value="1" />
+ <!-- Always show this item in an actionbar, even if it would override
+ the system's limits of how much stuff to put there. This may make
+ your action bar look bad on some screens. In most cases you should
+ use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never". -->
+ <flag name="always" value="2" />
+ <!-- When this item is shown as an action in the action bar, show a text
+ label with it even if it has an icon representation. -->
+ <flag name="withText" value="4" />
+ <!-- This item's action view collapses to a normal menu
+ item. When expanded, the action view takes over a
+ larger segment of its container. -->
+ <flag name="collapseActionView" value="8" />
+ </attr>
+
+ <!-- An optional layout to be used as an action view.
+ See {@link android.view.MenuItem#setActionView(android.view.View)}
+ for more info. -->
+ <attr name="actionLayout" format="reference" />
+
+ <!-- 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="actionViewClass" format="string" />
+
+ <!-- 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="actionProviderClass" format="string" />
+
+ </declare-styleable>
+
+ <declare-styleable name="Spinner">
+ <!-- The prompt to display when the spinner's dialog is shown. -->
+ <attr name="prompt" format="reference" />
+ <!-- Display mode for spinner options. -->
+ <attr name="spinnerMode" format="enum">
+ <!-- Spinner options will be presented to the user as a dialog window. -->
+ <enum name="dialog" value="0" />
+ <!-- Spinner options will be presented to the user as an inline dropdown
+ anchored to the spinner widget itself. -->
+ <enum name="dropdown" value="1" />
+ </attr>
+ <!-- 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
+ {@code @android:id/text1} to be populated with the prompt text. -->
+ <attr name="popupPromptView" format="reference" />
+ <!-- Gravity setting for positioning the currently selected item. -->
+ <attr name="android:gravity" />
+ <!-- Whether this spinner should mark child views as enabled/disabled when
+ the spinner itself is enabled/disabled. -->
+ <attr name="disableChildrenWhenDisabled" format="boolean" />
+ </declare-styleable>
+
+ <declare-styleable name="LinearLayoutICS">
+ <!-- Drawable to use as a vertical divider between buttons. -->
+ <attr name="divider" />
+ <!-- Setting for which dividers to show. -->
+ <attr name="showDividers">
+ <flag name="none" value="0" />
+ <flag name="beginning" value="1" />
+ <flag name="middle" value="2" />
+ <flag name="end" value="4" />
+ </attr>
+ <!-- Size of padding on either end of a divider. -->
+ <attr name="dividerPadding" format="dimension" />
+ </declare-styleable>
+
+ <!-- Default Spinner style. -->
+ <attr name="spinnerStyle" format="reference" />
+
+ <!-- Default Spinner style. -->
+ <attr name="spinnerDropDownItemStyle" format="reference" />
+
+ <!-- Specifies whether the theme is light, otherwise it is dark. -->
+ <attr name="isLightTheme" format="boolean" />
+
+ <declare-styleable name="SearchView">
+ <!-- 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>
+
+ <!-- ============================ -->
+ <!-- SearchView styles and assets -->
+ <!-- ============================ -->
+ <eat-comment />
+ <!-- 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" />
+ <!-- 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" />
+ <!-- Text color for urls in search suggestions, used by things like global search -->
+ <attr name="textColorSearchUrl" format="reference|color" />
+ <!-- SearchView AutoCompleteTextView style -->
+ <attr name="searchViewAutoCompleteTextView" format="reference" />
+
+ <!-- Attrbitutes for a ActivityChooserView. -->
+ <declare-styleable name="ActivityChooserView">
+ <!-- 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" />
+ </declare-styleable>
+
+ <!-- Default ActivityChooserView style. -->
+ <attr name="activityChooserViewStyle" format="reference" />
+
+ <declare-styleable name="CompatTextView">
+ <!-- Present the text in ALL CAPS. This may use a small-caps form when available. -->
+ <attr name="textAllCaps" format="reference|boolean" />
+ </declare-styleable>
+
+</resources>
diff --git a/android-support-v7-appcompat/res/values/bools.xml b/android-support-v7-appcompat/res/values/bools.xml
new file mode 100644
index 0000000..004d947
--- /dev/null
+++ b/android-support-v7-appcompat/res/values/bools.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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="abc_action_bar_embed_tabs_pre_jb">false</bool>
+ <bool name="abc_action_bar_expanded_action_views_exclusive">true</bool>
+ <bool name="abc_split_action_bar_is_narrow">true</bool>
+
+ <bool name="abc_config_showMenuShortcutsWhenKeyboardPresent">false</bool>
+</resources>
diff --git a/android-support-v7-appcompat/res/values/colors.xml b/android-support-v7-appcompat/res/values/colors.xml
new file mode 100644
index 0000000..884387a
--- /dev/null
+++ b/android-support-v7-appcompat/res/values/colors.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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="abc_search_url_text_normal">#7fa87f</color>
+ <color name="abc_search_url_text_selected">@android:color/black</color>
+ <color name="abc_search_url_text_pressed">@android:color/black</color>
+</resources> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/values/config.xml b/android-support-v7-appcompat/res/values/config.xml
new file mode 100644
index 0000000..8c027d1
--- /dev/null
+++ b/android-support-v7-appcompat/res/values/config.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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>
+ <!-- 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="abc_config_allowActionMenuItemTextWithIcon">false</bool>
+
+ <!-- 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="abc_config_prefDialogWidth">320dp</dimen>
+
+ <!-- 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="abc_config_actionMenuItemAllCaps">true</bool>
+</resources> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/values/dimens.xml b/android-support-v7-appcompat/res/values/dimens.xml
new file mode 100644
index 0000000..c2cf3a3
--- /dev/null
+++ b/android-support-v7-appcompat/res/values/dimens.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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>
+
+ <!-- The maximum number of action buttons that should be permitted within
+ an action bar/action mode. This will be used to determine how many
+ showAsAction="ifRoom" items can fit. "always" items can override this. -->
+ <integer name="abc_max_action_buttons">2</integer>
+
+ <!-- Maximum width for a stacked action bar tab. This prevents
+ action bar tabs from becoming too wide on a wide screen when only
+ a few are present. -->
+ <dimen name="abc_action_bar_stacked_tab_max_width">180dp</dimen>
+
+ <!-- Default height of an action bar. -->
+ <dimen name="abc_action_bar_default_height">48dip</dimen>
+ <!-- Vertical padding around action bar icons. -->
+ <dimen name="abc_action_bar_icon_vertical_padding">8dip</dimen>
+ <!-- Text size for action bar titles -->
+ <dimen name="abc_action_bar_title_text_size">18dp</dimen>
+ <!-- Text size for action bar subtitles -->
+ <dimen name="abc_action_bar_subtitle_text_size">14dp</dimen>
+ <!-- Top margin for action bar subtitles -->
+ <dimen name="abc_action_bar_subtitle_top_margin">-3dp</dimen>
+ <!-- Bottom margin for action bar subtitles -->
+ <dimen name="abc_action_bar_subtitle_bottom_margin">5dip</dimen>
+ <!-- Minimum width for an action button in the menu area of an action bar -->
+ <dimen name="abc_action_button_min_width">56dip</dimen>
+ <!-- Maximum height for a stacked tab bar as part of an action bar -->
+ <dimen name="abc_action_bar_stacked_max_height">48dp</dimen>
+ <!-- Size of the indeterminate Progress Bar -->
+ <dimen name="abc_action_bar_progress_bar_size">40dp</dimen>
+
+ <dimen name="abc_panel_menu_list_width">296dp</dimen>
+
+ <!-- Minimum width of the search view text entry area. -->
+ <dimen name="abc_search_view_text_min_width">160dip</dimen>
+ <!-- Preferred width of the search view. -->
+ <dimen name="abc_search_view_preferred_width">320dip</dimen>
+
+ <!-- Text padding for dropdown items -->
+ <dimen name="abc_dropdownitem_text_padding_left">8dip</dimen>
+ <dimen name="abc_dropdownitem_text_padding_right">8dip</dimen>
+ <!-- Width of the icon in a dropdown list -->
+ <dimen name="abc_dropdownitem_icon_width">32dip</dimen>
+
+
+ <!-- The platform's desired fixed width for a dialog along the major axis
+ (the screen is in landscape). This may be either a fraction or a dimension.-->
+ <item type="dimen" name="dialog_fixed_width_major">320dp</item>
+ <!-- The platform's desired fixed width for a dialog along the minor axis
+ (the screen is in portrait). This may be either a fraction or a dimension.-->
+ <item type="dimen" name="dialog_fixed_width_minor">320dp</item>
+ <!-- The platform's desired fixed height for a dialog along the major axis
+ (the screen is in portrait). This may be either a fraction or a dimension.-->
+ <item type="dimen" name="dialog_fixed_height_major">80%</item>
+ <!-- The platform's desired fixed height for a dialog along the minor axis
+ (the screen is in landscape). This may be either a fraction or a dimension.-->
+ <item type="dimen" name="dialog_fixed_height_minor">100%</item>
+
+</resources>
diff --git a/android-support-v7-appcompat/res/values/ids.xml b/android-support-v7-appcompat/res/values/ids.xml
new file mode 100644
index 0000000..ebeed83
--- /dev/null
+++ b/android-support-v7-appcompat/res/values/ids.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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="home"/>
+ <item type="id" name="action_bar_activity_content"/>
+ <item type="id" name="action_menu_divider"/>
+ <item type="id" name="action_menu_presenter"/>
+ <item type="id" name="progress_circular"/>
+ <item type="id" name="progress_horizontal"/>
+</resources>
diff --git a/android-support-v7-appcompat/res/values/strings.xml b/android-support-v7-appcompat/res/values/strings.xml
new file mode 100644
index 0000000..eceee56
--- /dev/null
+++ b/android-support-v7-appcompat/res/values/strings.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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>
+ <!-- Label for the "Done" button on the far left of action mode toolbars. -->
+ <string name="abc_action_mode_done">Done</string>
+ <!-- Content description for the action bar "home" affordance. [CHAR LIMIT=NONE] -->
+ <string name="abc_action_bar_home_description">Navigate home</string>
+ <!-- Content description for the action bar "up" affordance. [CHAR LIMIT=NONE] -->
+ <string name="abc_action_bar_up_description">Navigate up</string>
+ <!-- Content description for the action menu overflow button. [CHAR LIMIT=NONE] -->
+ <string name="abc_action_menu_overflow_description">More options</string>
+
+ <!-- SearchView accessibility description for search button [CHAR LIMIT=NONE] -->
+ <string name="abc_searchview_description_search">Search</string>
+ <!-- SearchView accessibility description for search text field [CHAR LIMIT=NONE] -->
+ <string name="abc_searchview_description_query">Search query</string>
+ <!-- SearchView accessibility description for clear button [CHAR LIMIT=NONE] -->
+ <string name="abc_searchview_description_clear">Clear query</string>
+ <!-- SearchView accessibility description for submit button [CHAR LIMIT=NONE] -->
+ <string name="abc_searchview_description_submit">Submit query</string>
+ <!-- SearchView accessibility description for voice button [CHAR LIMIT=NONE] -->
+ <string name="abc_searchview_description_voice">Voice search</string>
+
+ <!-- ActivityChooserView - accessibility support -->
+ <!-- Description of the shwoing of a popup window with activities to choose from. [CHAR LIMIT=NONE] -->
+ <string name="abc_activitychooserview_choose_application">Choose an app</string>
+ <!-- Title for a button to expand the list of activities in ActivityChooserView [CHAR LIMIT=25] -->
+ <string name="abc_activity_chooser_view_see_all">See all</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="abc_shareactionprovider_share_with_application">Share with %s</string>
+ <!-- Description of the choose target button in a ShareActionProvider (share UI). [CHAR LIMIT=NONE] -->
+ <string name="abc_shareactionprovider_share_with">Share with</string>
+
+</resources> \ No newline at end of file
diff --git a/android-support-v7-appcompat/res/values/styles.xml b/android-support-v7-appcompat/res/values/styles.xml
new file mode 100644
index 0000000..94d2e88
--- /dev/null
+++ b/android-support-v7-appcompat/res/values/styles.xml
@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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>
+
+ <!-- Styles in here can be extended for customisation in your application. Each utilises
+ one of the Base styles. If Holo themes are available on the current platform version
+ they will be used instead of the compat styles. -->
+
+ <style name="Widget.AppCompat.ActionBar" parent="Widget.AppCompat.Base.ActionBar">
+ </style>
+
+ <style name="Widget.AppCompat.Light.ActionBar" parent="Widget.AppCompat.Light.Base.ActionBar">
+ </style>
+
+ <style name="Widget.AppCompat.ActionBar.Solid"
+ parent="Widget.AppCompat.Base.ActionBar.Solid">
+ </style>
+
+ <style name="Widget.AppCompat.Light.ActionBar.Solid"
+ parent="Widget.AppCompat.Light.Base.ActionBar.Solid">
+ </style>
+
+ <style name="Widget.AppCompat.Light.ActionBar.Solid.Inverse"
+ parent="Widget.AppCompat.Light.Base.ActionBar.Solid.Inverse">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.ActionBar.Title"
+ parent="TextAppearance.AppCompat.Widget.Base.ActionBar.Title">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.ActionBar.Subtitle"
+ parent="TextAppearance.AppCompat.Widget.Base.ActionBar.Subtitle">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.ActionBar.Title.Inverse"
+ parent="TextAppearance.AppCompat.Widget.Base.ActionBar.Title.Inverse">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.ActionBar.Subtitle.Inverse"
+ parent="TextAppearance.AppCompat.Widget.Base.ActionBar.Subtitle.Inverse">
+ </style>
+
+ <style name="Widget.AppCompat.ProgressBar.Horizontal"
+ parent="Widget.AppCompat.Base.ProgressBar.Horizontal">
+ </style>
+
+ <style name="Widget.AppCompat.ProgressBar"
+ parent="Widget.AppCompat.Base.ProgressBar">
+ </style>
+
+ <style name="Widget.AppCompat.ActionButton" parent="Widget.AppCompat.Base.ActionButton">
+ </style>
+
+ <style name="Widget.AppCompat.Light.ActionButton"
+ parent="Widget.AppCompat.Light.Base.ActionButton">
+ </style>
+
+ <style name="Widget.AppCompat.ActionButton.CloseMode"
+ parent="Widget.AppCompat.Base.ActionButton.CloseMode">
+ </style>
+
+ <style name="Widget.AppCompat.Light.ActionButton.CloseMode"
+ parent="Widget.AppCompat.Light.Base.ActionButton.CloseMode">
+ </style>
+
+ <style name="Widget.AppCompat.ActionButton.Overflow"
+ parent="Widget.AppCompat.Base.ActionButton.Overflow">
+ </style>
+
+ <style name="Widget.AppCompat.Light.ActionButton.Overflow"
+ parent="Widget.AppCompat.Light.Base.ActionButton.Overflow">
+ </style>
+
+ <style name="Widget.AppCompat.ActionBar.TabBar" parent="Widget.AppCompat.Base.ActionBar.TabBar">
+ </style>
+
+ <style name="Widget.AppCompat.Light.ActionBar.TabBar"
+ parent="Widget.AppCompat.Light.Base.ActionBar.TabBar">
+ </style>
+
+ <style name="Widget.AppCompat.Light.ActionBar.TabBar.Inverse"
+ parent="Widget.AppCompat.Light.Base.ActionBar.TabBar.Inverse"></style>
+
+ <style name="Widget.AppCompat.ActionBar.TabView"
+ parent="Widget.AppCompat.Base.ActionBar.TabView">
+ </style>
+
+ <style name="Widget.AppCompat.Light.ActionBar.TabView"
+ parent="Widget.AppCompat.Light.Base.ActionBar.TabView">
+ </style>
+
+ <style name="Widget.AppCompat.Light.ActionBar.TabView.Inverse"
+ parent="Widget.AppCompat.Light.Base.ActionBar.TabView.Inverse">
+ </style>
+
+ <style name="Widget.AppCompat.ActionBar.TabText"
+ parent="Widget.AppCompat.Base.ActionBar.TabText">
+ </style>
+
+ <style name="Widget.AppCompat.Light.ActionBar.TabText"
+ parent="Widget.AppCompat.Light.Base.ActionBar.TabText">
+ </style>
+
+ <style name="Widget.AppCompat.Light.ActionBar.TabText.Inverse"
+ parent="Widget.AppCompat.Light.Base.ActionBar.TabText.Inverse">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.ActionBar.Menu"
+ parent="TextAppearance.AppCompat.Widget.Base.ActionBar.Menu">
+ </style>
+
+ <style name="Widget.AppCompat.ActionMode" parent="Widget.AppCompat.Base.ActionMode">
+ </style>
+
+ <style name="Widget.AppCompat.Light.ActionMode.Inverse"
+ parent="Widget.AppCompat.Light.Base.ActionMode.Inverse">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.ActionMode.Title"
+ parent="TextAppearance.AppCompat.Widget.Base.ActionMode.Title">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.ActionMode.Subtitle"
+ parent="TextAppearance.AppCompat.Widget.Base.ActionMode.Subtitle">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.ActionMode.Title.Inverse"
+ parent="TextAppearance.AppCompat.Widget.Base.ActionMode.Title.Inverse">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.ActionMode.Subtitle.Inverse"
+ parent="TextAppearance.AppCompat.Widget.Base.ActionMode.Subtitle.Inverse">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.DropDownItem"
+ parent="TextAppearance.AppCompat.Widget.Base.DropDownItem">
+ </style>
+
+ <style name="Widget.AppCompat.Spinner.DropDown.ActionBar"
+ parent="Widget.AppCompat.Base.Spinner">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Spinner.DropDown.ActionBar"
+ parent="Widget.AppCompat.Light.Base.Spinner">
+ </style>
+
+ <style name="Widget.AppCompat.DropDownItem.Spinner"
+ parent="Widget.AppCompat.Base.DropDownItem.Spinner">
+ </style>
+ <style name="Widget.AppCompat.Light.DropDownItem.Spinner"
+ parent="Widget.AppCompat.Light.Base.DropDownItem.Spinner">
+ </style>
+
+ <style name="Widget.AppCompat.ListView.DropDown"
+ parent="Widget.AppCompat.Base.ListView.DropDown">
+ </style>
+
+ <style name="Widget.AppCompat.Light.ListView.DropDown"
+ parent="Widget.AppCompat.Light.Base.ListView.DropDown">
+ </style>
+
+ <style name="TextAppearance.Widget.AppCompat.ExpandedMenu.Item"
+ parent="TextAppearance.Widget.AppCompat.Base.ExpandedMenu.Item">
+ </style>
+
+ <style name="Widget.AppCompat.ListPopupWindow" parent="Widget.AppCompat.Base.ListPopupWindow">
+ </style>
+
+ <style name="Widget.AppCompat.Light.ListPopupWindow"
+ parent="Widget.AppCompat.Light.Base.ListPopupWindow">
+ </style>
+
+ <style name="Widget.AppCompat.PopupMenu" parent="Widget.AppCompat.Base.PopupMenu">
+ </style>
+
+ <style name="Widget.AppCompat.Light.PopupMenu"
+ parent="Widget.AppCompat.Light.Base.PopupMenu">
+ </style>
+
+ <style name="Widget.AppCompat.ListView.Menu" parent="Widget.AppCompat.Base.ListView.Menu">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.PopupMenu.Large"
+ parent="TextAppearance.AppCompat.Base.Widget.PopupMenu.Large">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.PopupMenu.Small"
+ parent="TextAppearance.AppCompat.Base.Widget.PopupMenu.Small">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Light.Widget.PopupMenu.Large"
+ parent="TextAppearance.AppCompat.Light.Base.Widget.PopupMenu.Large">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Light.Widget.PopupMenu.Small"
+ parent="TextAppearance.AppCompat.Light.Base.Widget.PopupMenu.Small">
+ </style>
+
+ <style name="TextAppearance.AppCompat.SearchResult.Title"
+ parent="TextAppearance.AppCompat.Base.SearchResult.Title">
+ </style>
+
+ <style name="TextAppearance.AppCompat.SearchResult.Subtitle"
+ parent="TextAppearance.AppCompat.Base.SearchResult.Subtitle">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Light.SearchResult.Title"
+ parent="TextAppearance.AppCompat.Light.Base.SearchResult.Title">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Light.SearchResult.Subtitle"
+ parent="TextAppearance.AppCompat.Light.Base.SearchResult.Subtitle">
+ </style>
+
+ <style name="Widget.AppCompat.AutoCompleteTextView"
+ parent="Widget.AppCompat.Base.AutoCompleteTextView">
+ </style>
+
+ <style name="Widget.AppCompat.Light.AutoCompleteTextView"
+ parent="Widget.AppCompat.Light.Base.AutoCompleteTextView">
+ </style>
+
+ <style name="Widget.AppCompat.ActivityChooserView"
+ parent="Widget.AppCompat.Base.ActivityChooserView">
+ </style>
+
+ <style name="Widget.AppCompat.Light.ActivityChooserView"
+ parent="Widget.AppCompat.Light.Base.ActivityChooserView">
+ </style>
+
+</resources>
diff --git a/android-support-v7-appcompat/res/values/styles_base.xml b/android-support-v7-appcompat/res/values/styles_base.xml
new file mode 100644
index 0000000..79dd732
--- /dev/null
+++ b/android-support-v7-appcompat/res/values/styles_base.xml
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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>
+
+ <!-- Like in themes_base.xml, the namespace "*.AppCompat.Base" is used to
+ define base styles for the platform version. The "*.AppCompat"
+ variants are for direct use or use as parent styles by the app. -->
+ <eat-comment/>
+
+ <style name="Widget.AppCompat.Base.ActionBar" parent="">
+ <item name="displayOptions">useLogo|showHome|showTitle</item>
+ <item name="divider">?attr/dividerVertical</item>
+ <item name="height">?attr/actionBarSize</item>
+ <item name="homeLayout">@layout/abc_action_bar_home</item>
+
+ <item name="titleTextStyle">@style/TextAppearance.AppCompat.Widget.ActionBar.Title</item>
+ <item name="subtitleTextStyle">@style/TextAppearance.AppCompat.Widget.ActionBar.Subtitle
+ </item>
+
+ <item name="background">@drawable/abc_ab_transparent_dark_holo</item>
+ <item name="backgroundStacked">@drawable/abc_ab_stacked_transparent_dark_holo</item>
+ <item name="backgroundSplit">@drawable/abc_ab_bottom_transparent_dark_holo</item>
+
+ <item name="actionButtonStyle">@style/Widget.AppCompat.ActionButton</item>
+ <item name="actionOverflowButtonStyle">@style/Widget.AppCompat.ActionButton.Overflow</item>
+
+ <item name="progressBarStyle">@style/Widget.AppCompat.ProgressBar.Horizontal</item>
+ <item name="indeterminateProgressStyle">@style/Widget.AppCompat.ProgressBar</item>
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar" parent="Widget.AppCompat.Base.ActionBar">
+ <item name="background">@drawable/abc_ab_transparent_light_holo</item>
+ <item name="backgroundStacked">@drawable/abc_ab_stacked_transparent_light_holo</item>
+ <item name="backgroundSplit">@drawable/abc_ab_bottom_transparent_light_holo</item>
+
+ <item name="actionButtonStyle">@style/Widget.AppCompat.Light.ActionButton</item>
+ <item name="actionOverflowButtonStyle">@style/Widget.AppCompat.Light.ActionButton.Overflow
+ </item>
+
+ <item name="progressBarStyle">@style/Widget.AppCompat.ProgressBar.Horizontal</item>
+ <item name="indeterminateProgressStyle">@style/Widget.AppCompat.ProgressBar</item>
+ </style>
+
+ <style name="Widget.AppCompat.Base.ActionBar.Solid" parent="Widget.AppCompat.Base.ActionBar">
+ <item name="background">@drawable/abc_ab_solid_dark_holo</item>
+ <item name="backgroundStacked">@drawable/abc_ab_stacked_solid_dark_holo</item>
+ <item name="backgroundSplit">@drawable/abc_ab_bottom_solid_dark_holo</item>
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar.Solid"
+ parent="Widget.AppCompat.Light.Base.ActionBar">
+ <item name="background">@drawable/abc_ab_solid_light_holo</item>
+ <item name="backgroundStacked">@drawable/abc_ab_stacked_solid_light_holo</item>
+ <item name="backgroundSplit">@drawable/abc_ab_bottom_solid_light_holo</item>
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar.Solid.Inverse"
+ parent="Widget.AppCompat.Base.ActionBar.Solid">
+ <item name="titleTextStyle">
+ @style/TextAppearance.AppCompat.Widget.ActionBar.Title.Inverse
+ </item>
+ <item name="subtitleTextStyle">
+ @style/TextAppearance.AppCompat.Widget.ActionBar.Subtitle.Inverse
+ </item>
+ <item name="actionButtonStyle">@style/Widget.AppCompat.ActionButton</item>
+ <item name="actionOverflowButtonStyle">@style/Widget.AppCompat.ActionButton.Overflow
+ </item>
+ </style>
+
+ <style name="Widget.AppCompat.Base.ActionButton" parent="">
+ <item name="android:background">?attr/actionBarItemBackground</item>
+ <item name="android:paddingLeft">12dip</item>
+ <item name="android:paddingRight">12dip</item>
+ <item name="android:minWidth">@dimen/abc_action_button_min_width</item>
+ <item name="android:minHeight">?attr/actionBarSize</item>
+ <item name="android:gravity">center</item>
+ <item name="android:maxLines">2</item>
+ <item name="textAllCaps">@bool/abc_config_actionMenuItemAllCaps</item>
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionButton"
+ parent="Widget.AppCompat.Base.ActionButton">
+ </style>
+
+ <style name="Widget.AppCompat.Base.ActionButton.CloseMode"
+ parent="Widget.AppCompat.Base.ActionButton">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionButton.CloseMode"
+ parent="Widget.AppCompat.Light.Base.ActionButton">
+ </style>
+
+ <style name="Widget.AppCompat.Base.ActionButton.Overflow"
+ parent="Widget.AppCompat.Base.ActionButton">
+ <item name="android:src">@drawable/abc_ic_menu_moreoverflow_normal_holo_dark</item>
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionButton.Overflow"
+ parent="Widget.AppCompat.Light.Base.ActionButton">
+ <item name="android:src">@drawable/abc_ic_menu_moreoverflow_normal_holo_light</item>
+ </style>
+
+ <style name="Widget.AppCompat.Base.ActionBar.TabBar" parent="">
+ <item name="divider">?attr/actionBarDivider</item>
+ <item name="showDividers">middle</item>
+ <item name="dividerPadding">12dip</item>
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar.TabBar"
+ parent="Widget.AppCompat.Base.ActionBar.TabBar">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar.TabBar.Inverse"
+ parent="Widget.AppCompat.Light.Base.ActionBar.TabBar">
+ </style>
+
+ <style name="Widget.AppCompat.Base.ActionBar.TabView" parent="">
+ <item name="android:background">@drawable/abc_tab_indicator_ab_holo</item>
+ <item name="android:gravity">center_horizontal</item>
+ <item name="android:paddingLeft">16dip</item>
+ <item name="android:paddingRight">16dip</item>
+ <item name="android:minWidth">80dip</item>
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar.TabView"
+ parent="Widget.AppCompat.Base.ActionBar.TabView">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar.TabView.Inverse"
+ parent="Widget.AppCompat.Light.Base.ActionBar.TabView">
+ </style>
+
+ <style name="Widget.AppCompat.Base.ActionBar.TabText" parent="">
+ <item name="android:textAppearance">@null</item>
+ <item name="android:textColor">?android:attr/textColorPrimaryDisableOnly</item>
+ <item name="android:textSize">12sp</item>
+ <item name="android:textStyle">bold</item>
+ <item name="android:ellipsize">marquee</item>
+ <item name="android:maxLines">2</item>
+ <item name="textAllCaps">true</item>
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar.TabText"
+ parent="Widget.AppCompat.Base.ActionBar.TabText">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionBar.TabText.Inverse"
+ parent="Widget.AppCompat.Light.Base.ActionBar.TabText">
+ <item name="android:textColor">?android:attr/textColorPrimaryInverseDisableOnly</item>
+ </style>
+
+ <style name="Widget.AppCompat.Base.ActionMode" parent="">
+ <item name="background">?attr/actionModeBackground</item>
+ <item name="backgroundSplit">?attr/actionModeSplitBackground</item>
+ <item name="height">?attr/actionBarSize</item>
+ <item name="titleTextStyle">@style/TextAppearance.AppCompat.Widget.ActionMode.Title</item>
+ <item name="subtitleTextStyle">@style/TextAppearance.AppCompat.Widget.ActionMode.Subtitle
+ </item>
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActionMode.Inverse"
+ parent="Widget.AppCompat.Base.ActionMode">
+ <item name="titleTextStyle">
+ @style/TextAppearance.AppCompat.Widget.ActionMode.Title.Inverse
+ </item>
+ <item name="subtitleTextStyle">
+ @style/TextAppearance.AppCompat.Widget.ActionMode.Subtitle.Inverse
+ </item>
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionMode.Title"
+ parent="android:TextAppearance.Medium">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionMode.Subtitle"
+ parent="android:TextAppearance.Small">
+ <item name="android:textColor">?android:attr/textColorSecondary</item>
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionMode.Title.Inverse"
+ parent="android:TextAppearance.Medium.Inverse">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionMode.Subtitle.Inverse"
+ parent="android:TextAppearance.Small.Inverse">
+ <item name="android:textColor">?android:attr/textColorSecondaryInverse</item>
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionBar.Menu"
+ parent="android:TextAppearance.Small">
+ <item name="android:textSize">12sp</item>
+ <item name="android:textStyle">bold</item>
+ <item name="android:textColor">?attr/actionMenuTextColor</item>
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionBar.Title"
+ parent="android:TextAppearance.Medium">
+ <item name="android:textSize">@dimen/abc_action_bar_title_text_size</item>
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionBar.Subtitle"
+ parent="android:TextAppearance.Small">
+ <item name="android:textSize">@dimen/abc_action_bar_subtitle_text_size</item>
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionBar.Title.Inverse"
+ parent="android:TextAppearance.Medium.Inverse">
+ <item name="android:textSize">@dimen/abc_action_bar_title_text_size</item>
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.ActionBar.Subtitle.Inverse"
+ parent="android:TextAppearance.Small.Inverse">
+ <item name="android:textSize">@dimen/abc_action_bar_subtitle_text_size</item>
+ </style>
+
+ <style name="Widget.AppCompat.Base.ProgressBar.Horizontal"
+ parent="android:Widget.ProgressBar.Horizontal">
+ </style>
+
+ <style name="Widget.AppCompat.Base.ProgressBar" parent="android:Widget.ProgressBar">
+ <item name="android:minWidth">@dimen/abc_action_bar_progress_bar_size</item>
+ <item name="android:maxWidth">@dimen/abc_action_bar_progress_bar_size</item>
+ <item name="android:minHeight">@dimen/abc_action_bar_progress_bar_size</item>
+ <item name="android:maxHeight">@dimen/abc_action_bar_progress_bar_size</item>
+ </style>
+
+ <!-- Action Bar Spinner Widgets -->
+
+ <style name="Widget.AppCompat.Base.Spinner" parent="">
+ <item name="spinnerMode">dropdown</item>
+ <item name="android:popupBackground">@drawable/abc_menu_dropdown_panel_holo_dark</item>
+ <item name="android:dropDownSelector">@drawable/abc_list_selector_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:clickable">true</item>
+ <item name="android:background">@drawable/abc_spinner_ab_holo_dark</item>
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.Spinner" parent="Widget.AppCompat.Base.Spinner">
+ <item name="android:dropDownSelector">@drawable/abc_list_selector_holo_light</item>
+ <item name="android:popupBackground">@drawable/abc_menu_dropdown_panel_holo_light</item>
+ <item name="android:background">@drawable/abc_spinner_ab_holo_light</item>
+ </style>
+
+ <style name="Widget.AppCompat.Base.DropDownItem.Spinner" parent="">
+ <item name="android:textAppearance">@style/TextAppearance.AppCompat.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.AppCompat.Light.Base.DropDownItem.Spinner"
+ parent="Widget.AppCompat.Base.DropDownItem.Spinner">
+ </style>
+
+ <style name="Widget.AppCompat.Base.ListView.DropDown" parent="android:Widget.ListView">
+ <item name="android:listSelector">@drawable/abc_list_selector_holo_dark</item>
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ListView.DropDown"
+ parent="android:Widget.ListView">
+ <item name="android:listSelector">@drawable/abc_list_selector_holo_light</item>
+ </style>
+
+ <style name="TextAppearance.AppCompat.Widget.Base.DropDownItem"
+ parent="android:TextAppearance.Small">
+ <item name="android:textColor">?android:attr/textColorPrimaryDisableOnly</item>
+ </style>
+
+ <style name="TextAppearance.Widget.AppCompat.Base.ExpandedMenu.Item"
+ parent="android:TextAppearance.Medium">
+ <item name="android:textColor">?android:attr/textColorPrimaryDisableOnly</item>
+ </style>
+
+ <!-- Mimic text appearance in select_dialog_item.xml -->
+ <style name="TextAppearance.AppCompat.Base.CompactMenu.Dialog"
+ parent="android:TextAppearance.Medium">
+ <item name="android:textColor">@android:color/primary_text_light</item>
+ </style>
+
+ <style name="Widget.AppCompat.Base.ListView.Menu" parent="android:Widget.ListView.Menu">
+ <item name="android:listSelector">?attr/listChoiceBackgroundIndicator</item>
+ <item name="android:divider">?attr/dividerHorizontal</item>
+ </style>
+
+ <style name="Widget.AppCompat.Base.ListPopupWindow" parent="">
+ <item name="android:dropDownSelector">@drawable/abc_list_selector_holo_dark</item>
+ <item name="android:popupBackground">@drawable/abc_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.AppCompat.Light.Base.ListPopupWindow" parent="">
+ <item name="android:dropDownSelector">@drawable/abc_list_selector_holo_light</item>
+ <item name="android:popupBackground">@drawable/abc_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.AppCompat.Base.PopupMenu"
+ parent="@style/Widget.AppCompat.Base.ListPopupWindow">
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.PopupMenu"
+ parent="@style/Widget.AppCompat.Light.Base.ListPopupWindow">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Base.Widget.PopupMenu.Large"
+ parent="android:TextAppearance.Widget">
+ <item name="android:textColor">?android:attr/textColorPrimaryDisableOnly</item>
+ <item name="android:textSize">18sp</item>
+ </style>
+
+ <style name="TextAppearance.AppCompat.Base.Widget.PopupMenu.Small"
+ parent="android:TextAppearance.Widget">
+ <item name="android:textColor">?android:attr/textColorPrimaryDisableOnly</item>
+ <item name="android:textSize">14sp</item>
+ </style>
+
+ <style name="TextAppearance.AppCompat.Light.Base.Widget.PopupMenu.Large"
+ parent="TextAppearance.AppCompat.Base.Widget.PopupMenu.Large">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Light.Base.Widget.PopupMenu.Small"
+ parent="TextAppearance.AppCompat.Base.Widget.PopupMenu.Small">
+ </style>
+
+ <style name="TextAppearance.AppCompat.Base.SearchResult" parent="">
+ <item name="android:textStyle">normal</item>
+ <item name="android:textColor">?android:textColorPrimary</item>
+ <item name="android:textColorHint">?android:textColorHint</item>
+ </style>
+
+ <style name="TextAppearance.AppCompat.Base.SearchResult.Title">
+ <item name="android:textSize">18sp</item>
+ </style>
+
+ <style name="TextAppearance.AppCompat.Base.SearchResult.Subtitle">
+ <item name="android:textSize">14sp</item>
+ <item name="android:textColor">?android:textColorSecondary</item>
+ </style>
+
+ <style name="TextAppearance.AppCompat.Light.Base.SearchResult"
+ parent="TextAppearance.AppCompat.Base.SearchResult">
+ <item name="android:textColor">?android:textColorPrimary</item>
+ <item name="android:textColorHint">?android:textColorHint</item>
+ </style>
+
+ <style name="TextAppearance.AppCompat.Light.Base.SearchResult.Title">
+ <item name="android:textSize">18sp</item>
+ </style>
+
+ <style name="TextAppearance.AppCompat.Light.Base.SearchResult.Subtitle">
+ <item name="android:textSize">14sp</item>
+ <item name="android:textColor">?android:textColorSecondary</item>
+ </style>
+
+ <style name="Widget.AppCompat.Base.AutoCompleteTextView"
+ parent="android:Widget.AutoCompleteTextView">
+ <item name="android:textColor">?attr/actionMenuTextColor</item>
+ <item name="android:dropDownSelector">@drawable/abc_list_selector_holo_dark</item>
+ <item name="android:popupBackground">@drawable/abc_menu_dropdown_panel_holo_dark</item>
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.AutoCompleteTextView"
+ parent="android:Widget.AutoCompleteTextView">
+ <item name="android:textColor">?attr/actionMenuTextColor</item>
+ <item name="android:dropDownSelector">@drawable/abc_list_selector_holo_light</item>
+ <item name="android:popupBackground">@drawable/abc_menu_dropdown_panel_holo_light</item>
+ </style>
+
+ <style name="Widget.AppCompat.Base.ActivityChooserView" parent="">
+ <item name="android:gravity">center</item>
+ <item name="android:background">@drawable/abc_ab_share_pack_holo_dark</item>
+ <item name="divider">?attr/dividerVertical</item>
+ <item name="showDividers">middle</item>
+ <item name="dividerPadding">6dip</item>
+ </style>
+
+ <style name="Widget.AppCompat.Light.Base.ActivityChooserView"
+ parent="Widget.AppCompat.Base.ActivityChooserView">
+ <item name="android:background">@drawable/abc_ab_share_pack_holo_light</item>
+ </style>
+
+</resources>
diff --git a/android-support-v7-appcompat/res/values/themes.xml b/android-support-v7-appcompat/res/values/themes.xml
new file mode 100644
index 0000000..f761155
--- /dev/null
+++ b/android-support-v7-appcompat/res/values/themes.xml
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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>
+
+ <!-- Themes in the "Theme.AppCompat" family will contain an action bar by default.
+ If Holo themes are available on the current platform version they will be used.
+ A limited Holo-styled action bar will be provided on platform versions older
+ than 3.0. (API 11)
+
+ These theme declarations contain any version-independent specification. Items
+ that need to vary based on platform version should be defined in the corresponding
+ "Theme.Base" theme. -->
+
+ <!-- Platform-independent theme providing an action bar in a dark-themed activity. -->
+ <style name="Theme.AppCompat" parent="Theme.Base.AppCompat">
+ <item name="isLightTheme">false</item>
+
+ <!-- Required for use of support_simple_spinner_dropdown_item.xml -->
+ <item name="spinnerDropDownItemStyle">
+ @style/Widget.AppCompat.DropDownItem.Spinner
+ </item>
+ <item name="dropdownListPreferredItemHeight">?attr/listPreferredItemHeightSmall</item>
+ <item name="searchResultListItemHeight">58dip</item>
+
+ <!-- Popup Menu styles -->
+ <item name="popupMenuStyle">@style/Widget.AppCompat.PopupMenu</item>
+ <item name="textAppearanceLargePopupMenu">
+ @style/TextAppearance.AppCompat.Widget.PopupMenu.Large
+ </item>
+ <item name="textAppearanceSmallPopupMenu">
+ @style/TextAppearance.AppCompat.Widget.PopupMenu.Small
+ </item>
+
+ <item name="listPopupWindowStyle">@style/Widget.AppCompat.ListPopupWindow</item>
+ <item name="dropDownListViewStyle">@style/Widget.AppCompat.ListView.DropDown</item>
+
+ <!-- SearchView attributes -->
+ <item name="searchDropdownBackground">@drawable/abc_search_dropdown_dark</item>
+ <item name="searchViewTextField">@drawable/abc_textfield_searchview_holo_dark</item>
+ <item name="searchViewTextFieldRight">@drawable/abc_textfield_searchview_right_holo_dark
+ </item>
+ <item name="searchViewCloseIcon">@drawable/abc_ic_clear</item>
+ <item name="searchViewSearchIcon">@drawable/abc_ic_search</item>
+ <item name="searchViewGoIcon">@drawable/abc_ic_go</item>
+ <item name="searchViewVoiceIcon">@drawable/abc_ic_voice_search</item>
+ <item name="searchViewEditQuery">@drawable/abc_ic_commit_search_api_holo_dark</item>
+ <item name="searchViewEditQueryBackground">?attr/selectableItemBackground</item>
+ <item name="searchViewAutoCompleteTextView">
+ @style/Widget.AppCompat.AutoCompleteTextView</item>
+ <item name="textColorSearchUrl">@color/abc_search_url_text_holo</item>
+ <item name="textAppearanceSearchResultTitle">
+ @style/TextAppearance.AppCompat.SearchResult.Title
+ </item>
+ <item name="textAppearanceSearchResultSubtitle">
+ @style/TextAppearance.AppCompat.SearchResult.Subtitle
+ </item>
+
+ <item name="actionModeShareDrawable">@drawable/abc_ic_menu_share_holo_dark</item>
+
+ <!-- ShareActionProvider attributes -->
+ <item name="activityChooserViewStyle">@style/Widget.AppCompat.ActivityChooserView</item>
+
+ </style>
+
+ <!-- Platform-independent theme providing an action bar in a light-themed activity. -->
+ <style name="Theme.AppCompat.Light" parent="Theme.Base.AppCompat.Light">
+ <item name="isLightTheme">true</item>
+
+ <!-- Required for use of support_simple_spinner_dropdown_item.xml -->
+ <item name="spinnerDropDownItemStyle">
+ @style/Widget.AppCompat.Light.DropDownItem.Spinner
+ </item>
+ <item name="dropdownListPreferredItemHeight">?attr/listPreferredItemHeightSmall</item>
+ <item name="searchResultListItemHeight">58dip</item>
+
+ <!-- Popup Menu styles -->
+ <item name="popupMenuStyle">@style/Widget.AppCompat.Light.PopupMenu</item>
+ <item name="textAppearanceLargePopupMenu">
+ @style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Large
+ </item>
+ <item name="textAppearanceSmallPopupMenu">
+ @style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Small
+ </item>
+
+ <item name="listPopupWindowStyle">@style/Widget.AppCompat.Light.ListPopupWindow</item>
+ <item name="dropDownListViewStyle">@style/Widget.AppCompat.Light.ListView.DropDown</item>
+
+ <!-- SearchView attributes -->
+ <item name="searchDropdownBackground">@drawable/abc_search_dropdown_light</item>
+ <item name="searchViewTextField">@drawable/abc_textfield_searchview_holo_light</item>
+ <item name="searchViewTextFieldRight">@drawable/abc_textfield_searchview_right_holo_light
+ </item>
+ <item name="searchViewCloseIcon">@drawable/abc_ic_clear_holo_light</item>
+ <item name="searchViewSearchIcon">@drawable/abc_ic_search_api_holo_light</item>
+ <item name="searchViewGoIcon">@drawable/abc_ic_go_search_api_holo_light</item>
+ <item name="searchViewVoiceIcon">@drawable/abc_ic_voice_search_api_holo_light</item>
+ <item name="searchViewEditQuery">@drawable/abc_ic_commit_search_api_holo_light</item>
+ <item name="searchViewEditQueryBackground">?attr/selectableItemBackground</item>
+ <item name="searchViewAutoCompleteTextView">
+ @style/Widget.AppCompat.Light.AutoCompleteTextView</item>
+ <item name="textColorSearchUrl">@color/abc_search_url_text_holo</item>
+ <item name="textAppearanceSearchResultTitle">
+ @style/TextAppearance.AppCompat.Light.SearchResult.Title
+ </item>
+ <item name="textAppearanceSearchResultSubtitle">
+ @style/TextAppearance.AppCompat.Light.SearchResult.Subtitle
+ </item>
+
+ <item name="actionModeShareDrawable">@drawable/abc_ic_menu_share_holo_light</item>
+
+ <!-- ShareActionProvider attributes -->
+ <item name="activityChooserViewStyle">@style/Widget.AppCompat.Light.ActivityChooserView
+ </item>
+
+ </style>
+
+ <!-- Platform-independent theme providing an action bar in a dark-themed activity. -->
+ <style name="Theme.AppCompat.Light.DarkActionBar"
+ parent="Theme.Base.AppCompat.Light.DarkActionBar">
+ <item name="isLightTheme">true</item>
+
+ <!-- Required for use of support_simple_spinner_dropdown_item.xml -->
+ <item name="spinnerDropDownItemStyle">
+ @style/Widget.AppCompat.Light.DropDownItem.Spinner
+ </item>
+ <item name="dropdownListPreferredItemHeight">?attr/listPreferredItemHeightSmall</item>
+ <item name="searchResultListItemHeight">58dip</item>
+
+ <!-- Popup Menu styles -->
+ <item name="popupMenuStyle">@style/Widget.AppCompat.Light.PopupMenu</item>
+ <item name="textAppearanceLargePopupMenu">
+ @style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Large
+ </item>
+ <item name="textAppearanceSmallPopupMenu">
+ @style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Small
+ </item>
+
+ <item name="listPopupWindowStyle">@style/Widget.AppCompat.ListPopupWindow</item>
+ <item name="dropDownListViewStyle">@style/Widget.AppCompat.ListView.DropDown</item>
+
+ <!-- SearchView attributes -->
+ <item name="searchDropdownBackground">@drawable/abc_search_dropdown_dark</item>
+ <item name="searchViewTextField">@drawable/abc_textfield_searchview_holo_dark</item>
+ <item name="searchViewTextFieldRight">@drawable/abc_textfield_searchview_right_holo_dark
+ </item>
+ <item name="searchViewCloseIcon">@drawable/abc_ic_clear</item>
+ <item name="searchViewSearchIcon">@drawable/abc_ic_search</item>
+ <item name="searchViewGoIcon">@drawable/abc_ic_go</item>
+ <item name="searchViewVoiceIcon">@drawable/abc_ic_voice_search</item>
+ <item name="searchViewEditQuery">@drawable/abc_ic_commit_search_api_holo_dark</item>
+ <item name="searchViewEditQueryBackground">?attr/selectableItemBackground</item>
+ <item name="searchViewAutoCompleteTextView">
+ @style/Widget.AppCompat.AutoCompleteTextView</item>
+ <item name="textColorSearchUrl">@color/abc_search_url_text_holo</item>
+ <item name="textAppearanceSearchResultTitle">
+ @style/TextAppearance.AppCompat.SearchResult.Title
+ </item>
+ <item name="textAppearanceSearchResultSubtitle">
+ @style/TextAppearance.AppCompat.SearchResult.Subtitle
+ </item>
+
+ <item name="actionModeShareDrawable">@drawable/abc_ic_menu_share_holo_dark</item>
+
+ <!-- ShareActionProvider attributes -->
+ <item name="activityChooserViewStyle">@style/Widget.AppCompat.ActivityChooserView
+ </item>
+
+ </style>
+
+ <style name="Theme.AppCompat.DialogWhenLarge"
+ parent="Theme.Base.AppCompat.DialogWhenLarge">
+ </style>
+
+ <style name="Theme.AppCompat.Light.DialogWhenLarge"
+ parent="Theme.Base.AppCompat.Light.DialogWhenLarge">
+ </style>
+
+ <!-- Menu/item attributes -->
+ <style name="Theme.AppCompat.CompactMenu" parent="Theme.AppCompat.Base.CompactMenu">
+ </style>
+
+ <style name="Theme.AppCompat.CompactMenu.Dialog"
+ parent="Theme.AppCompat.Base.CompactMenu.Dialog">
+ </style>
+
+</resources>
diff --git a/android-support-v7-appcompat/res/values/themes_base.xml b/android-support-v7-appcompat/res/values/themes_base.xml
new file mode 100644
index 0000000..b9b13f1
--- /dev/null
+++ b/android-support-v7-appcompat/res/values/themes_base.xml
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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>
+
+ <!-- Themes in the "Theme.Base" family vary based on the current platform
+ version to provide the correct basis on each device. You probably don't
+ want to use them directly in your apps.
+
+ Themes in the "Theme.AppCompat" family are meant to be extended or used
+ directly by apps. -->
+ <eat-comment/>
+
+ <style name="Theme.Base" parent="android:Theme">
+ </style>
+
+ <style name="Theme.Base.Light" parent="android:Theme.Light">
+ </style>
+
+ <!-- Base platform-dependent theme providing an action bar in a dark-themed activity. -->
+ <style name="Theme.Base.AppCompat" parent="Theme.Base">
+ <item name="windowActionBar">true</item>
+ <!-- Remove system title bars; we will add the action bar ourselves. -->
+ <item name="android:windowNoTitle">true</item>
+
+ <item name="buttonBarStyle">@android:style/ButtonBar</item>
+ <item name="buttonBarButtonStyle">@android:style/Widget.Button</item>
+ <item name="selectableItemBackground">@drawable/abc_item_background_holo_dark</item>
+ <item name="homeAsUpIndicator">@drawable/abc_ic_ab_back_holo_dark</item>
+
+ <item name="dividerVertical">@drawable/abc_list_divider_holo_dark</item>
+ <item name="dividerHorizontal">@drawable/abc_list_divider_holo_dark</item>
+
+ <item name="listPreferredItemHeight">?android:attr/listPreferredItemHeight</item>
+ <item name="listPreferredItemHeightSmall">48dp</item>
+ <item name="listPreferredItemHeightLarge">80dp</item>
+ <item name="listPreferredItemPaddingLeft">8dip</item>
+ <item name="listPreferredItemPaddingRight">8dip</item>
+
+ <item name="textAppearanceListItem">?android:attr/textAppearanceMedium</item>
+ <item name="textAppearanceListItemSmall">?android:attr/textAppearanceMedium</item>
+
+ <item name="actionBarTabStyle">@style/Widget.AppCompat.ActionBar.TabView</item>
+ <item name="actionBarTabBarStyle">@style/Widget.AppCompat.ActionBar.TabBar</item>
+ <item name="actionBarTabTextStyle">@style/Widget.AppCompat.ActionBar.TabText</item>
+ <item name="actionButtonStyle">@style/Widget.AppCompat.ActionButton</item>
+ <item name="actionOverflowButtonStyle">@style/Widget.AppCompat.ActionButton.Overflow</item>
+ <item name="actionBarStyle">@style/Widget.AppCompat.ActionBar</item>
+ <item name="actionBarSplitStyle">?attr/actionBarStyle</item>
+ <item name="actionBarWidgetTheme">@null</item>
+ <item name="actionBarSize">@dimen/abc_action_bar_default_height</item>
+ <item name="actionBarDivider">?attr/dividerVertical</item>
+ <item name="actionBarItemBackground">?attr/selectableItemBackground</item>
+ <item name="actionMenuTextAppearance">
+ @style/TextAppearance.AppCompat.Widget.ActionBar.Menu
+ </item>
+ <item name="actionMenuTextColor">?android:attr/textColorPrimaryDisableOnly</item>
+
+ <!-- Dropdown Spinner Attributes -->
+ <item name="actionDropDownStyle">@style/Widget.AppCompat.Spinner.DropDown.ActionBar</item>
+
+ <!-- Action Mode -->
+ <item name="actionModeStyle">@style/Widget.AppCompat.ActionMode</item>
+ <item name="actionModeBackground">@drawable/abc_cab_background_top_holo_dark</item>
+ <item name="actionModeSplitBackground">@drawable/abc_cab_background_bottom_holo_dark</item>
+ <item name="actionModeCloseDrawable">@drawable/abc_ic_cab_done_holo_dark</item>
+ <item name="actionModeCloseButtonStyle">@style/Widget.AppCompat.ActionButton.CloseMode
+ </item>
+
+ <!-- Panel attributes -->
+ <item name="panelMenuListWidth">@dimen/abc_panel_menu_list_width</item>
+ <item name="panelMenuListTheme">@style/Theme.AppCompat.CompactMenu</item>
+ <item name="android:panelBackground">@drawable/abc_menu_hardkey_panel_holo_dark</item>
+ <item name="listChoiceBackgroundIndicator">@drawable/abc_list_selector_holo_dark</item>
+
+ </style>
+
+ <!-- Base platform-dependent theme providing an action bar in a light-themed activity. -->
+ <style name="Theme.Base.AppCompat.Light" parent="Theme.Base.Light">
+ <item name="windowActionBar">true</item>
+ <!-- Remove system title bars; we will add the action bar ourselves. -->
+ <item name="android:windowNoTitle">true</item>
+
+ <item name="buttonBarStyle">@android:style/ButtonBar</item>
+ <item name="buttonBarButtonStyle">@android:style/Widget.Button</item>
+ <item name="selectableItemBackground">@drawable/abc_item_background_holo_light</item>
+ <item name="homeAsUpIndicator">@drawable/abc_ic_ab_back_holo_light</item>
+
+ <item name="dividerVertical">@drawable/abc_list_divider_holo_light</item>
+ <item name="dividerHorizontal">@drawable/abc_list_divider_holo_light</item>
+
+ <item name="listPreferredItemHeight">?android:attr/listPreferredItemHeight</item>
+ <item name="listPreferredItemHeightSmall">48dp</item>
+ <item name="listPreferredItemHeightLarge">80dp</item>
+ <item name="listPreferredItemPaddingLeft">8dip</item>
+ <item name="listPreferredItemPaddingRight">8dip</item>
+
+ <item name="textAppearanceListItem">?android:attr/textAppearanceMedium</item>
+ <item name="textAppearanceListItemSmall">?android:attr/textAppearanceMedium</item>
+
+ <!-- Action Bar Styles -->
+ <item name="actionBarTabStyle">@style/Widget.AppCompat.Light.ActionBar.TabView</item>
+ <item name="actionBarTabBarStyle">@style/Widget.AppCompat.Light.ActionBar.TabBar</item>
+ <item name="actionBarTabTextStyle">@style/Widget.AppCompat.Light.ActionBar.TabText</item>
+ <item name="actionButtonStyle">@style/Widget.AppCompat.Light.ActionButton</item>
+ <item name="actionOverflowButtonStyle">
+ @style/Widget.AppCompat.Light.ActionButton.Overflow
+ </item>
+ <item name="actionBarStyle">@style/Widget.AppCompat.Light.ActionBar</item>
+ <item name="actionBarSplitStyle">?attr/actionBarStyle</item>
+ <item name="actionBarWidgetTheme">@null</item>
+ <item name="actionBarSize">@dimen/abc_action_bar_default_height</item>
+ <item name="actionBarDivider">?attr/dividerVertical</item>
+ <item name="actionBarItemBackground">?attr/selectableItemBackground</item>
+ <item name="actionMenuTextAppearance">
+ @style/TextAppearance.AppCompat.Widget.ActionBar.Menu
+ </item>
+ <item name="actionMenuTextColor">?android:attr/textColorPrimaryDisableOnly</item>
+
+ <!-- Action Mode -->
+ <item name="actionModeStyle">@style/Widget.AppCompat.ActionMode</item>
+ <item name="actionModeBackground">@drawable/abc_cab_background_top_holo_light</item>
+ <item name="actionModeSplitBackground">@drawable/abc_cab_background_bottom_holo_light</item>
+ <item name="actionModeCloseDrawable">@drawable/abc_ic_cab_done_holo_light</item>
+ <item name="actionModeCloseButtonStyle">@style/Widget.AppCompat.Light.ActionButton.CloseMode
+ </item>
+
+ <!-- Dropdown Spinner Attributes -->
+ <item name="actionDropDownStyle">
+ @style/Widget.AppCompat.Light.Spinner.DropDown.ActionBar
+ </item>
+
+ <!-- Panel attributes -->
+ <item name="panelMenuListWidth">@dimen/abc_panel_menu_list_width</item>
+ <item name="panelMenuListTheme">@style/Theme.AppCompat.CompactMenu</item>
+ <item name="android:panelBackground">@drawable/abc_menu_hardkey_panel_holo_light</item>
+ <item name="listChoiceBackgroundIndicator">@drawable/abc_list_selector_holo_light</item>
+
+ </style>
+
+ <!-- Base platform-dependent theme providing a dark action bar in a light-themed activity. -->
+ <style name="Theme.Base.AppCompat.Light.DarkActionBar" parent="Theme.Base.AppCompat.Light">
+ <item name="homeAsUpIndicator">@drawable/abc_ic_ab_back_holo_dark</item>
+
+ <item name="actionOverflowButtonStyle">@style/Widget.AppCompat.ActionButton.Overflow</item>
+ <item name="actionBarStyle">@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse</item>
+ <item name="actionBarWidgetTheme">@style/Theme.AppCompat</item>
+ <item name="actionBarDivider">@drawable/abc_list_divider_holo_dark</item>
+ <item name="actionBarItemBackground">@drawable/abc_item_background_holo_dark</item>
+ <item name="actionBarTabStyle">@style/Widget.AppCompat.Light.ActionBar.TabView.Inverse
+ </item>
+ <item name="actionBarTabBarStyle">@style/Widget.AppCompat.Light.ActionBar.TabBar.Inverse
+ </item>
+ <item name="actionBarTabTextStyle">@style/Widget.AppCompat.Light.ActionBar.TabText.Inverse
+ </item>
+ <item name="actionMenuTextColor">?android:attr/textColorPrimaryInverseDisableOnly</item>
+
+ <!-- Action Mode -->
+ <item name="actionModeStyle">@style/Widget.AppCompat.Light.ActionMode.Inverse</item>
+ <item name="actionModeBackground">@drawable/abc_cab_background_top_holo_dark</item>
+ <item name="actionModeSplitBackground">@drawable/abc_cab_background_bottom_holo_dark</item>
+ <item name="actionModeCloseDrawable">@drawable/abc_ic_cab_done_holo_dark</item>
+ <item name="actionModeCloseButtonStyle">@style/Widget.AppCompat.ActionButton.CloseMode
+ </item>
+
+ <!-- Dropdown Spinner Attributes -->
+ <item name="actionDropDownStyle">@style/Widget.AppCompat.Spinner.DropDown.ActionBar</item>
+
+ <!-- Panel attributes -->
+ <item name="android:panelBackground">@drawable/abc_menu_hardkey_panel_holo_dark</item>
+ <item name="listChoiceBackgroundIndicator">@drawable/abc_list_selector_holo_dark</item>
+
+ </style>
+
+ <!-- Menu/item attributes -->
+ <style name="Theme.AppCompat.Base.CompactMenu" parent="">
+ <item name="android:itemTextAppearance">
+ @style/TextAppearance.Widget.AppCompat.ExpandedMenu.Item</item>
+ <item name="android:listViewStyle">@style/Widget.AppCompat.ListView.Menu</item>
+ </style>
+
+ <style name="Theme.AppCompat.Base.CompactMenu.Dialog" parent="">
+ <item name="android:itemTextAppearance">
+ @style/TextAppearance.AppCompat.Base.CompactMenu.Dialog</item>
+ <item name="android:listViewStyle">@android:style/Widget.ListView.Menu</item>
+ </style>
+
+ <style name="Theme.Base.AppCompat.DialogWhenLarge"
+ parent="Theme.Base.AppCompat">
+ </style>
+
+ <style name="Theme.Base.AppCompat.Light.DialogWhenLarge"
+ parent="Theme.Base.AppCompat.Light">
+ </style>
+
+ <style name="Theme.Base.AppCompat.Dialog.FixedSize" parent="android:Theme.Dialog">
+ <item name="windowFixedWidthMajor">@dimen/dialog_fixed_width_major</item>
+ <item name="windowFixedWidthMinor">@dimen/dialog_fixed_width_minor</item>
+ <item name="windowFixedHeightMajor">@dimen/dialog_fixed_height_major</item>
+ <item name="windowFixedHeightMinor">@dimen/dialog_fixed_height_minor</item>
+
+ <item name="windowActionBar">true</item>
+ <!-- Remove system title bars; we will add the action bar ourselves. -->
+ <item name="android:windowNoTitle">true</item>
+
+ <item name="buttonBarStyle">@android:style/ButtonBar</item>
+ <item name="buttonBarButtonStyle">@android:style/Widget.Button</item>
+ <item name="selectableItemBackground">@drawable/abc_item_background_holo_dark</item>
+
+ <item name="dividerVertical">@drawable/abc_list_divider_holo_dark</item>
+ <item name="dividerHorizontal">@drawable/abc_list_divider_holo_dark</item>
+
+ <item name="listPreferredItemHeight">?android:attr/listPreferredItemHeight</item>
+ <item name="listPreferredItemHeightSmall">48dp</item>
+ <item name="listPreferredItemHeightLarge">80dp</item>
+ <item name="listPreferredItemPaddingLeft">8dip</item>
+ <item name="listPreferredItemPaddingRight">8dip</item>
+
+ <item name="textAppearanceListItem">?android:attr/textAppearanceMedium</item>
+ <item name="textAppearanceListItemSmall">?android:attr/textAppearanceMedium</item>
+
+ <!-- Action Mode -->
+ <item name="actionModeStyle">@style/Widget.AppCompat.ActionMode</item>
+ <item name="actionModeBackground">@drawable/abc_cab_background_top_holo_dark</item>
+ <item name="actionModeSplitBackground">@drawable/abc_cab_background_bottom_holo_dark</item>
+ <item name="actionModeCloseDrawable">@drawable/abc_ic_cab_done_holo_dark</item>
+ <item name="actionModeCloseButtonStyle">@style/Widget.AppCompat.ActionButton.CloseMode
+ </item>
+
+ <!-- Panel attributes -->
+ <item name="panelMenuListWidth">@dimen/abc_panel_menu_list_width</item>
+ <item name="panelMenuListTheme">@style/Theme.AppCompat.CompactMenu</item>
+ <item name="android:panelBackground">@drawable/abc_menu_hardkey_panel_holo_dark</item>
+ <item name="listChoiceBackgroundIndicator">@drawable/abc_list_selector_holo_dark</item>
+ </style>
+
+ <style name="Theme.Base.AppCompat.Dialog.Light.FixedSize"
+ parent="Theme.Base.AppCompat.Dialog.FixedSize" />
+
+</resources>
diff --git a/android-support-v7-appcompat/src/.readme b/android-support-v7-appcompat/src/.readme
new file mode 100644
index 0000000..4bcebad
--- /dev/null
+++ b/android-support-v7-appcompat/src/.readme
@@ -0,0 +1,2 @@
+This hidden file is there to ensure there is an src folder.
+Once we support binary library this will go away. \ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..f6afa47
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,27 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ repositories {
+ mavenCentral()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:0.12.+'
+ // the latest version of the android-apt plugin
+ classpath 'com.neenbedankt.gradle.plugins:android-apt:1.1'
+ //gradle-properties
+ // classpath 'net.saliman:gradle-properties-plugin:1.2.0'
+ }
+}
+
+allprojects {
+ //apply plugin: 'properties'
+
+ repositories {
+ mavenCentral()
+ }
+ //ant.properties : java.compilerargs=-Xlint
+ tasks.withType(JavaCompile) {
+ options.compilerArgs << "-Xlint"
+ }
+}
+
diff --git a/cgeo-calendar/.settings/org.eclipse.jdt.core.prefs b/cgeo-calendar/.settings/org.eclipse.jdt.core.prefs
index 4295a0b..6ae8f9e 100644
--- a/cgeo-calendar/.settings/org.eclipse.jdt.core.prefs
+++ b/cgeo-calendar/.settings/org.eclipse.jdt.core.prefs
@@ -6,9 +6,10 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -96,7 +97,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/cgeo-calendar/build.gradle b/cgeo-calendar/build.gradle
new file mode 100644
index 0000000..6b36270
--- /dev/null
+++ b/cgeo-calendar/build.gradle
@@ -0,0 +1,29 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 19
+ buildToolsVersion "19.1.0"
+
+
+
+ defaultConfig {
+ minSdkVersion 9
+ targetSdkVersion 19
+ versionName "1.2"
+ versionCode 3
+ }
+
+ sourceSets {
+ main {
+ manifest.srcFile 'AndroidManifest.xml'
+ java.srcDirs = ['src']
+ res.srcDirs = ['res']
+ assets.srcDirs = ['assets']
+ }
+ }
+}
+
+dependencies {
+ // The dependency to the ICalnder interface from the main project is missing
+ // compile project(":main") is not working
+} \ No newline at end of file
diff --git a/cgeo-calendar/project.properties b/cgeo-calendar/project.properties
index 5330a89..d8d5434 100644
--- a/cgeo-calendar/project.properties
+++ b/cgeo-calendar/project.properties
@@ -12,3 +12,5 @@ proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.
# Project target.
target=android-19
+java.source=1.7
+java.target=1.7 \ No newline at end of file
diff --git a/cgeo-calendar/src/cgeo/calendar/CalendarActivity.java b/cgeo-calendar/src/cgeo/calendar/CalendarActivity.java
index ad54bab..2fbfd05 100644
--- a/cgeo-calendar/src/cgeo/calendar/CalendarActivity.java
+++ b/cgeo-calendar/src/cgeo/calendar/CalendarActivity.java
@@ -43,7 +43,7 @@ public final class CalendarActivity extends Activity {
/**
* Adds the cache to the Android-calendar if it is an event.
- *
+ *
* @param entry
*/
private void selectCalendarForAdding(final CalendarEntry entry) {
@@ -58,7 +58,7 @@ public final class CalendarActivity extends Activity {
return;
}
- final SparseArray<String> calendars = new SparseArray<String>();
+ final SparseArray<String> calendars = new SparseArray<>();
cursor.moveToFirst();
final int indexId = cursor.getColumnIndex("_id");
diff --git a/cgeo-contacts/.settings/org.eclipse.jdt.core.prefs b/cgeo-contacts/.settings/org.eclipse.jdt.core.prefs
index e08a777..90a6f5b 100644
--- a/cgeo-contacts/.settings/org.eclipse.jdt.core.prefs
+++ b/cgeo-contacts/.settings/org.eclipse.jdt.core.prefs
@@ -6,9 +6,10 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -96,7 +97,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/cgeo-contacts/build.gradle b/cgeo-contacts/build.gradle
new file mode 100644
index 0000000..e35cff8
--- /dev/null
+++ b/cgeo-contacts/build.gradle
@@ -0,0 +1,31 @@
+apply plugin: 'com.android.application'
+
+android {
+ compileSdkVersion 19
+ buildToolsVersion "19.1.0"
+
+
+
+ defaultConfig {
+ minSdkVersion 9
+ targetSdkVersion 19
+ versionName "1.1"
+ versionCode 2
+ }
+
+ sourceSets {
+ main {
+ manifest.srcFile 'AndroidManifest.xml'
+ java.srcDirs = ['src']
+ res.srcDirs = ['res']
+ assets.srcDirs = ['assets']
+ }
+ }
+}
+
+dependencies {
+ compile 'org.apache.commons:commons-lang3:3.3.2'
+ compile files('../main/compile-libs/org.eclipse.jdt.annotation_1.1.0.v20130513-1648.jar')
+ // The depency to the ICalnder interface from the main project is missing
+ // compile(:main) is not right
+} \ No newline at end of file
diff --git a/cgeo-contacts/cgeo-contacts.iml b/cgeo-contacts/cgeo-contacts.iml
index 107cc3a..c045b7e 100644
--- a/cgeo-contacts/cgeo-contacts.iml
+++ b/cgeo-contacts/cgeo-contacts.iml
@@ -19,7 +19,6 @@
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
- <output url="file://$MODULE_DIR$/bin/classes" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
diff --git a/cgeo-contacts/project.properties b/cgeo-contacts/project.properties
index 5330a89..d8d5434 100644
--- a/cgeo-contacts/project.properties
+++ b/cgeo-contacts/project.properties
@@ -12,3 +12,5 @@ proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.
# Project target.
target=android-19
+java.source=1.7
+java.target=1.7 \ No newline at end of file
diff --git a/cgeo-contacts/res/values-nb/strings.xml b/cgeo-contacts/res/values-nb/strings.xml
index ada4e1d..dcd8f02 100644
--- a/cgeo-contacts/res/values-nb/strings.xml
+++ b/cgeo-contacts/res/values-nb/strings.xml
@@ -3,4 +3,5 @@
<resources>
<string name="app_name">c:geo - kontakter (tillegg)</string>
<string name="contact_not_found">Kontakten med aliaset/kallenavnet %s ble ikke funnet. Legg den til i Kontakter på enheten din først.</string>
+ <string name="multiple_matches">Flere treff</string>
</resources>
diff --git a/cgeo-contacts/src/cgeo/contacts/ContactsActivity.java b/cgeo-contacts/src/cgeo/contacts/ContactsActivity.java
index c9f7656..bbda493 100644
--- a/cgeo-contacts/src/cgeo/contacts/ContactsActivity.java
+++ b/cgeo-contacts/src/cgeo/contacts/ContactsActivity.java
@@ -67,13 +67,13 @@ public final class ContactsActivity extends Activity {
selectContact(contacts);
}
else {
- int contactId = contacts.get(0).first.intValue();
+ int contactId = contacts.get(0).first;
openContactAndFinish(contactId);
}
}
private void selectContact(final List<Pair<Integer, String>> contacts) {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
for (Pair<Integer, String> p : contacts) {
list.add(p.second);
}
@@ -83,7 +83,7 @@ public final class ContactsActivity extends Activity {
.setItems(items, new OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
- int contactId = contacts.get(which).first.intValue();
+ int contactId = contacts.get(which).first;
dialog.dismiss();
openContactAndFinish(contactId);
}
@@ -105,13 +105,13 @@ public final class ContactsActivity extends Activity {
final String[] selectionArgs = new String[] { like ? "%" + searchName + "%" : searchName };
Cursor cursor = null;
- List<Pair<Integer, String>> result = new ArrayList<Pair<Integer, String>>();
+ List<Pair<Integer, String>> result = new ArrayList<>();
try {
cursor = getContentResolver().query(uri, projection, selection, selectionArgs, null);
while (cursor != null && cursor.moveToNext()) {
int foundId = cursor.getInt(0);
String foundName = cursor.getString(1);
- result.add(new Pair<Integer, String>(Integer.valueOf(foundId), foundName));
+ result.add(new Pair<>(foundId, foundName));
}
} catch (Exception e) {
Log.e(LOG_TAG, "ContactsActivity.getContactId", e);
diff --git a/cgeo.iml b/cgeo.iml
new file mode 100644
index 0000000..e723902
--- /dev/null
+++ b/cgeo.iml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <excludeFolder url="file://$MODULE_DIR$/.gradle" />
+ <excludeFolder url="file://$MODULE_DIR$/build" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..f4d6b16
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,2 @@
+#Speed build
+org.gradle.daemon=true \ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..8c0fb64
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..68320f5
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Mon Jun 09 21:59:47 CEST 2014
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
diff --git a/gradlew b/gradlew
new file mode 100644
index 0000000..91a7e26
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..8a0b282
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/main/.factorypath b/main/.factorypath
index 0ba9bff..1440abd 100644
--- a/main/.factorypath
+++ b/main/.factorypath
@@ -1,4 +1,4 @@
<factorypath>
- <factorypathentry kind="WKSPJAR" id="/cgeo/libs/butterknife-5.0.0.jar" enabled="true" runInBatchMode="false"/>
+ <factorypathentry kind="WKSPJAR" id="/cgeo/libs/butterknife-5.1.1.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="WKSPJAR" id="/cgeo/compile-libs/androidannotations-3.0.1.jar" enabled="true" runInBatchMode="false"/>
</factorypath>
diff --git a/main/.settings/org.eclipse.jdt.core.prefs b/main/.settings/org.eclipse.jdt.core.prefs
index 35806f7..0de28b5 100644
--- a/main/.settings/org.eclipse.jdt.core.prefs
+++ b/main/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,14 @@
eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
@@ -6,9 +16,10 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -16,7 +27,7 @@ org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
@@ -27,7 +38,7 @@ org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
@@ -59,7 +70,7 @@ org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
@@ -69,7 +80,7 @@ org.eclipse.jdt.core.compiler.problem.nullSpecViolation=warning
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=ignore
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
@@ -86,7 +97,7 @@ org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
@@ -96,7 +107,7 @@ org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
@@ -107,11 +118,11 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.processAnnotations=enabled
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
@@ -129,12 +140,14 @@ org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
@@ -154,6 +167,7 @@ org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
@@ -199,6 +213,7 @@ org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
@@ -246,6 +261,7 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=inser
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
@@ -264,12 +280,14 @@ org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invoca
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
@@ -293,6 +311,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invoc
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
@@ -320,6 +339,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do n
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
@@ -348,6 +368,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invoc
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
@@ -357,6 +378,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=inser
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
@@ -383,4 +405,5 @@ org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_on_off_tags=false
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/main/.settings/org.eclipse.jdt.ui.prefs b/main/.settings/org.eclipse.jdt.ui.prefs
index a80d8c1..4d4a905 100644
--- a/main/.settings/org.eclipse.jdt.ui.prefs
+++ b/main/.settings/org.eclipse.jdt.ui.prefs
@@ -23,15 +23,17 @@ sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
sp_cleanup.convert_to_enhanced_for_loop=false
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=true
sp_cleanup.format_source_code_changes_only=true
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=true
+sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.make_variable_declarations_final=true
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=true
@@ -42,6 +44,7 @@ sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=false
sp_cleanup.remove_trailing_whitespaces=true
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
@@ -55,10 +58,13 @@ sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
sp_cleanup.use_blocks=true
sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=false
sp_cleanup.use_parentheses_in_expressions=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+sp_cleanup.use_type_arguments=false
diff --git a/main/AndroidManifest.xml b/main/AndroidManifest.xml
index 7836d07..de91a06 100644
--- a/main/AndroidManifest.xml
+++ b/main/AndroidManifest.xml
@@ -7,13 +7,14 @@
<uses-sdk
android:minSdkVersion="9"
- android:targetSdkVersion="9" />
+ android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
+ <uses-permission android:name="android.permission.NFC" />
<uses-feature
android:name="android.hardware.camera"
@@ -21,6 +22,9 @@
<uses-feature
android:name="android.hardware.screen.portrait"
android:required="false" />
+ <uses-feature
+ android:name="android.hardware.nfc"
+ android:required="false" />
<supports-screens
android:anyDensity="true"
@@ -40,20 +44,6 @@
android:name="com.google.android.maps"
android:required="false" />
- <!-- Samsung Multi-Window support -->
- <uses-library
- android:name="com.sec.android.app.multiwindow"
- android:required="false" />
-
- <meta-data
- android:name="com.sec.android.support.multiwindow"
- android:value="true" />
- <meta-data
- android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W"
- android:resource="@dimen/app_defaultsize_w" />
- <meta-data
- android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H"
- android:resource="@dimen/app_defaultsize_h" />
<meta-data
android:name="android.app.default_searchable"
android:value=".SearchActivity" />
@@ -79,12 +69,16 @@
android:configChanges="keyboardHidden|orientation"
android:label="@string/app_name"
android:launchMode="singleTop"
+ android:parentActivityName="cgeo.geocaching.MainActivity"
android:windowSoftInputMode="stateHidden" >
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data
+ android:name="android.support.PARENT_ACTIVITY"
+ android:value="cgeo.geocaching.MainActivity" />
+ <meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable" />
</activity>
@@ -99,13 +93,21 @@
android:name=".AboutActivity"
android:configChanges="keyboardHidden|orientation"
android:label="@string/about"
+ android:parentActivityName="cgeo.geocaching.MainActivity"
android:windowSoftInputMode="stateHidden" >
+ <meta-data
+ android:name="android.support.PARENT_ACTIVITY"
+ android:value="cgeo.geocaching.MainActivity" />
</activity>
<activity
android:name=".UsefulAppsActivity"
android:configChanges="keyboardHidden|orientation"
android:label="@string/helpers"
+ android:parentActivityName="cgeo.geocaching.MainActivity"
android:windowSoftInputMode="stateHidden" >
+ <meta-data
+ android:name="android.support.PARENT_ACTIVITY"
+ android:value="cgeo.geocaching.MainActivity" />
</activity>
<activity
android:name=".twitter.TwitterAuthorizationActivity"
@@ -134,24 +136,40 @@
android:name=".NavigateAnyPointActivity"
android:configChanges="keyboardHidden|orientation"
android:label="@string/search_destination"
+ android:parentActivityName="cgeo.geocaching.MainActivity"
android:windowSoftInputMode="stateHidden" >
+ <meta-data
+ android:name="android.support.PARENT_ACTIVITY"
+ android:value="cgeo.geocaching.MainActivity" />
</activity>
<activity
android:name=".AddressListActivity"
android:configChanges="keyboardHidden|orientation"
android:label="@string/search_address_result"
+ android:parentActivityName="cgeo.geocaching.SearchActivity"
android:windowSoftInputMode="stateHidden" >
+ <meta-data
+ android:name="android.support.PARENT_ACTIVITY"
+ android:value="cgeo.geocaching.SearchActivity" />
</activity>
<activity
android:name=".settings.SettingsActivity"
android:configChanges="keyboardHidden|orientation"
android:label="@string/settings_titlebar"
+ android:parentActivityName="cgeo.geocaching.MainActivity"
android:theme="@style/settings" >
+ <meta-data
+ android:name="android.support.PARENT_ACTIVITY"
+ android:value="cgeo.geocaching.MainActivity" />
</activity>
<activity
android:name=".CacheListActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
- android:label="@string/app_name" >
+ android:label="@string/app_name"
+ android:parentActivityName="cgeo.geocaching.MainActivity" >
+ <meta-data
+ android:name="android.support.PARENT_ACTIVITY"
+ android:value="cgeo.geocaching.MainActivity" />
<!-- intent filter for local gpx files -->
<intent-filter>
@@ -188,7 +206,7 @@
</intent-filter>
</activity>
<activity
- android:name=".maps.google.GoogleMapActivity"
+ android:name=".maps.google.v1.GoogleMapActivity"
android:label="@string/map_map" >
</activity>
<activity
@@ -420,9 +438,12 @@
<activity
android:name=".SelectMapfileActivity"
android:configChanges="keyboardHidden|orientation"
- android:label="@string/map_file_select_title" >
+ android:label="@string/map_file_select_title"
+ android:parentActivityName="cgeo.geocaching.settings.SettingsActivity" >
+ <meta-data
+ android:name="android.support.PARENT_ACTIVITY"
+ android:value="cgeo.geocaching.settings.SettingsActivity" />
</activity>
-
<activity
android:name="WaypointPopup"
android:configChanges="keyboardHidden|orientation"
@@ -464,7 +485,8 @@
</activity>
<activity
android:name=".CreateShortcutActivity"
- android:label="@string/cgeo_shortcut" >
+ android:label="@string/cgeo_shortcut"
+ android:parentActivityName="cgeo.geocaching.MainActivity" >
<intent-filter>
<action android:name="android.intent.action.CREATE_SHORTCUT" />
@@ -472,6 +494,12 @@
</intent-filter>
</activity>
+ <activity android:name=".activity.SimpleWebviewActivity"
+ android:label="c:geo internal browser"
+ android:icon="@drawable/ic_launcher_browser">
+
+ </activity>
+
<!-- provide enhanced meta data for caches (and waypoints) when invoking Locus from c:geo -->
<provider
android:name=".apps.LocusDataStorageProvider"
diff --git a/main/build.gradle b/main/build.gradle
new file mode 100644
index 0000000..e4f60fe
--- /dev/null
+++ b/main/build.gradle
@@ -0,0 +1,360 @@
+apply plugin: 'com.android.application'
+apply plugin: 'android-apt'
+apply plugin: 'findbugs'
+
+/*
+Before use unit test :
+Replace all custom namepace with xmlns:cgeo="http://schemas.android.com/apk/res-auto"
+
+
+Usage :
+
+check dependencies :
+gradle dependencies main:dependencies
+
+build & test:
+gradle clean assembleDebug connectedAndroidTest
+
+debug:
+gradle connectedAndroidTest --debug --stacktrace
+
+for CI? :
+gradle deviceCheck
+gradle connectedCheck
+
+ */
+//Testing guide : http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Testing
+//https://github.com/stephanenicolas/Quality-Tools-for-Android
+
+def AAVersion = '3.0.1'
+def RXVersion = '0.19.6'
+group = 'cgeo.geocaching'
+version = '0.0.1'
+
+android {
+ compileSdkVersion "Google Inc.:Google APIs:19"
+ //compileSdkVersion 19
+ buildToolsVersion "19.1.0"
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_7
+ targetCompatibility JavaVersion.VERSION_1_7
+ }
+
+ def Properties versionProps = new Properties()
+ versionProps.load(new FileInputStream(file('version.properties')))
+
+ packagingOptions {
+ exclude 'META-INF/DEPENDENCIES'
+ exclude 'META-INF/NOTICE'
+ exclude 'META-INF/LICENSE'
+ exclude 'META-INF/LICENSE.txt'
+ exclude 'META-INF/NOTICE.txt'
+ }
+
+ defaultConfig {
+ minSdkVersion 9
+ targetSdkVersion 19
+ versionName versionProps['name']
+ versionCode versionProps['code'].toInteger()
+
+ // NOTE: must match the package in the test directory and must be different from the app package
+ testApplicationId "cgeo.geocaching.test"
+
+ // standard android test runner
+ //testInstrumentationRunner "android.test.InstrumentationTestRunner"
+ testInstrumentationRunner "com.zutubi.android.junitreport.JUnitReportTestRunner"
+
+ //testHandlingProfiling true
+ testFunctionalTest true
+ }
+
+ //Conditional signing
+ //Uncomment and set the 4 key properties (#key.store, ...) in gradle.properties
+ signingConfigs {
+ release
+ }
+
+
+ buildTypes {
+ debug {
+ //packageNameSuffix ".debug"
+ //zipAlign = true
+ debuggable true
+ runProguard false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), '../tests/proguard.cfg'
+ versionNameSuffix " Debug " + versionProps['betaNumber']
+ }
+ release {
+ debuggable true
+ runProguard true
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
+ signingConfig signingConfigs.release
+ }
+ }
+
+ testBuildType "debug" //the default BuildType
+
+ sourceSets {
+ main {
+ manifest.srcFile 'AndroidManifest.xml'
+ //java.srcDirs = ['src', 'thirdparty', 'annotation_gen']
+ java.srcDirs = ['src', 'thirdparty']
+ res.srcDirs = ['res']
+ assets.srcDirs = ['assets']
+ }
+ //new instrumentTest name
+ androidTest.setRoot('../tests')
+ androidTest{
+ manifest.srcFile '../tests/AndroidManifest.xml'
+ java.srcDirs = ['../tests/java']
+ res.srcDirs = ['../tests/res', 'res']
+ resources.srcDirs = ['../tests/res', 'res']
+ }
+ }
+ testOptions {
+ resultsDir = "$project.buildDir/build/test-results"
+ }
+
+ lintOptions {
+ //checkReleaseBuilds false
+ // Or, if you prefer, you can continue to check for errors in release builds,
+ // but continue the build even when errors are found:
+ abortOnError false
+ }
+
+}
+
+if (project.hasProperty('key.store') &&
+ project.hasProperty('key.store.password') &&
+ project.hasProperty('key.alias.password')) {
+ android.signingConfigs.release.storeFile = file(project.property('key.store'))
+ android.signingConfigs.release.storePassword = property('key.store.password')
+ android.signingConfigs.release.keyPassword = property('key.alias.password')
+ android.signingConfigs.release.keyAlias = property('key.alias')
+} else {
+ android.buildTypes.release.signingConfig = null
+}
+
+dependencies {
+ apt( "org.androidannotations:androidannotations:$AAVersion"){
+ exclude module:'androidannotations-api'
+ }
+ compile "org.androidannotations:androidannotations-api:$AAVersion"
+
+ compile project(":mapswithme-api")
+
+ compile files('libs/httpclientandroidlib-1.1.2.jar')
+ compile files('libs/locus-api-4.0.jar')
+ //https://mapsforge.googlecode.com/files/mapsforge-map-0.2.4.jar
+ compile files('libs/mapsforge-map-0.2.4.jar')
+ compile files('libs/mapsforge-map-0.3.0-jar-with-dependencies.jar')
+
+ compile 'com.android.support:appcompat-v7:19.1.0'
+
+ compile 'com.jakewharton:butterknife:5.1.1'
+ compile 'org.apache.commons:commons-collections4:4.0'
+ compile 'org.apache.commons:commons-lang3:3.3.2'
+ compile 'commons-io:commons-io:2.4'
+ compile 'com.google.code.findbugs:annotations:2.0.3'
+
+ compile "com.netflix.rxjava:rxjava-core:$RXVersion"
+ compile "com.netflix.rxjava:rxjava-android:$RXVersion"
+ compile "com.netflix.rxjava:rxjava-async-util:$RXVersion"
+
+ //TEST
+ //compile files('compile-libs/androidannotations-3.0.1.jar')
+ //compile files('compile-libs/findbugs-ant.jar')
+ //compile files('compile-libs/findbugs-jsr305.jar') //CheckForNull conflict with com.google.code.findbugs:annotations
+ compile files('compile-libs/org.eclipse.jdt.annotation_1.1.0.v20130513-1648.jar')
+
+ //Robotium / Robolectric??
+ androidTestCompile files('../tests/libs/android-junit-report-1.5.8.jar')
+ androidTestCompile files('../tests/libs/robotium-solo-3.6.jar')
+ //androidTestCompile 'com.jayway.android.robotium:robotium-solo:5.0.1'
+}
+
+/*
+ ANDROID ANNOTATIONS
+ */
+
+apt {
+ arguments {
+ androidManifestFile variant.processResources.manifestFile
+ resourcePackageName 'cgeo.geocaching'
+
+ // If you're using Android NBS flavors you should use the following line instead of hard-coded packageName
+ // resourcePackageName android.defaultConfig.packageName
+
+ // You can set optional annotation processing options here, like these commented options:
+ // logLevel 'INFO'
+ // logFile '/var/log/aa.log'
+ }
+}
+
+/*
+ FINDBUGS
+
+ Usage : gradle check
+
+ */
+
+//http://www.gradle.org/docs/current/dsl/org.gradle.api.plugins.quality.FindBugsExtension.html
+findbugs {
+ toolVersion = "2.0.1"
+ //sourceSets = [sourceSets.main]
+ ignoreFailures = true
+ reportsDir = file("$project.buildDir/reports")
+ effort = "max"
+ reportLevel = "high"
+ //visitors = ["FindSqlInjection", "SwitchFallthrough"]
+ //omitVisitors = ["FindNonShortCircuit"]
+ //includeFilter = file("$rootProject.projectDir/project/findbugs/inclusions.xml")
+ excludeFilter = file("$rootProject.projectDir/project/findbugs/exclusions.xml")
+
+}
+
+/*
+*
+*
+* END of useful build
+* Following task are for samples
+*
+ */
+
+task logInfo {
+ logging.captureStandardOutput LogLevel.INFO
+ doFirst {
+ println 'A task message which is logged at INFO level'
+ }
+}
+
+/*
+ UNIT TEST
+ */
+/*
+sourceSets {
+ unitTest {
+ java.srcDir file('../tests/src')
+ //java.srcDirs = ['src', 'thirdparty', 'annotation_gen', '../tests']
+ resources.srcDir file('../tests/res')
+ //manifest.srcFile '../tests/AndroidManifest.xml'
+ }
+}
+dependencies {
+ //unitTestCompile files("$project.buildDir/classes/release")
+ unitTestCompile files("$project.buildDir/classes/debug")
+ unitTestCompile 'junit:junit:4.8.2'
+ unitTestCompile 'com.google.android:android-test:4.1.1.4'
+
+ unitTestCompile 'com.googlecode.androidannotations:androidannotations-api:$AAVersion'
+ unitTestCompile 'com.jakewharton:butterknife:5.1.1'
+ unitTestCompile 'org.apache.commons:commons-collections4:4.0'
+ unitTestCompile 'commons-io:commons-io:2.4'
+ unitTestCompile 'org.apache.commons:commons-lang3:3.3.2'
+ unitTestCompile 'com.google.code.findbugs:annotations:2.0.3'
+ unitTestCompile 'com.netflix.rxjava:rxjava-core:$RXVersion'
+ unitTestCompile 'com.netflix.rxjava:rxjava-android:$RXVersion'
+}
+
+// extend the runtime
+configurations {
+ unitTestCompile.extendsFrom runtime
+ unitTestRuntime.extendsFrom unitTestCompile
+}
+
+// add the unitTest task
+//task unitTest(type:Test, dependsOn: assemble) {
+task unitTest(type:Test, dependsOn: assembleDebug) {
+ description = "run unit tests"
+ testClassesDir = project.sourceSets.unitTest.output.classesDir
+ classpath = project.sourceSets.unitTest.runtimeClasspath
+}
+// bind to check
+check.dependsOn unitTest
+//build.dependsOn unitTest
+*/
+
+//run gradle compileTest
+
+/*
+ PLACEHOLDER
+ */
+
+//Not working...copy templates/keys.xml in res/values for the moment
+task prep() {
+ /*
+ requiredProperties "maps.api.key", "maps.api.key.market", "ocde.okapi.consumer.key", "ocde.okapi.consumer.secret", "ocpl.okapi.consumer.key", "ocpl.okapi.consumer.secret"
+ doFirst {
+ logger.info("prep... ")
+
+ copy {
+ from "templates"
+ include "*.xml"
+ into "res/values"
+ filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: project.ext.filterTokens)
+ }
+ }
+ */
+}
+task prep2() {
+/*
+ //http://goo.gl/bqnwjJ
+ copy{
+ from("${buildDir}/manifests"){
+ include "${variant.dirName}/AndroidManifest.xml"
+ }
+ into("${buildDir}/manifests/$variant.name")
+
+ // define a variable for your key:
+ def gmaps_key = "<your-key>"
+
+ filter{
+ String line -> line.replaceAll("<meta-data android:name=\"com.google.android.maps.v2.API_KEY\" android:value=\"\"/>",
+ "<meta-data android:name=\"com.google.android.maps.v2.API_KEY\" android:value=\"" + gmaps_key + "\"/>")
+ }
+
+ // set the path to the modified Manifest:
+ variant.processResources.manifestFile = file("${buildDir}/manifests/${variant.name}/${variant.dirName}/AndroidManifest.xml")
+ }
+
+
+ */
+}
+
+android.applicationVariants.all{ variant ->
+ variant.mergeResources.doLast{
+ logger.info("rootProject.projectDir="+rootProject.projectDir)
+ prep{}
+ }
+}
+
+//http://blog.futurice.com/android_unit_testing_in_ides_and_ci_environments
+task addTest {
+ def src = ['tests/java']
+ def file = file("app.iml")
+
+ doLast {
+ try {
+ def parsedXml = (new XmlParser()).parse(file)
+ def node = parsedXml.component[1].content[0]
+ src.each {
+ def path = 'file://$MODULE_DIR$/' + "${it}"
+ def set = node.find { it.@url == path }
+ if (set == null) {
+ new Node(node, 'sourceFolder', ['url': 'file://$MODULE_DIR$/' + "${it}", 'isTestSource': "true"])
+ def writer = new StringWriter()
+ new XmlNodePrinter(new PrintWriter(writer)).print(parsedXml)
+ file.text = writer.toString()
+ }
+ }
+ } catch (FileNotFoundException e) {
+ // nop, iml not found
+ }
+ }
+}
+/*
+// always do the addtest on prebuild
+gradle.projectsEvaluated {
+ preBuild.dependsOn(addTest)
+}*/ \ No newline at end of file
diff --git a/main/build.xml b/main/build.xml
index f3afb9e..43c37b2 100644
--- a/main/build.xml
+++ b/main/build.xml
@@ -119,6 +119,8 @@
<filter token="ocnl.okapi.consumer.secret" value="${ocnl.okapi.consumer.secret}"/>
<filter token="ocro.okapi.consumer.key" value="${ocro.okapi.consumer.key}"/>
<filter token="ocro.okapi.consumer.secret" value="${ocro.okapi.consumer.secret}"/>
+ <filter token="ocuk.okapi.consumer.key" value="${ocuk.okapi.consumer.key}"/>
+ <filter token="ocuk.okapi.consumer.secret" value="${ocuk.okapi.consumer.secret}"/>
</filterset>
</copy>
</target>
diff --git a/main/cgeo.iml b/main/cgeo.iml
index 5781d97..c662ceb 100644
--- a/main/cgeo.iml
+++ b/main/cgeo.iml
@@ -55,6 +55,7 @@
</library>
</orderEntry>
<orderEntry type="module" module-name="mapswithme-api" exported="" />
+ <orderEntry type="module" module-name="android-support-v7-appcompat" exported="" />
</component>
</module>
diff --git a/main/compile-libs/findbugs-ant.jar b/main/compile-libs/findbugs-ant.jar
index 269f1a5..e143099 100644
--- a/main/compile-libs/findbugs-ant.jar
+++ b/main/compile-libs/findbugs-ant.jar
Binary files differ
diff --git a/main/libs/android-support-v4.jar b/main/libs/android-support-v4.jar
deleted file mode 100644
index 96644ed..0000000
--- a/main/libs/android-support-v4.jar
+++ /dev/null
Binary files differ
diff --git a/main/libs/butterknife-5.0.0.jar b/main/libs/butterknife-5.0.0.jar
deleted file mode 100644
index a08482d..0000000
--- a/main/libs/butterknife-5.0.0.jar
+++ /dev/null
Binary files differ
diff --git a/main/libs/butterknife-5.1.1.jar b/main/libs/butterknife-5.1.1.jar
new file mode 100644
index 0000000..45ab11f
--- /dev/null
+++ b/main/libs/butterknife-5.1.1.jar
Binary files differ
diff --git a/main/libs/rxjava-android-0.17.6.jar b/main/libs/rxjava-android-0.19.6.jar
index b840d42..ccc8b6a 100644
--- a/main/libs/rxjava-android-0.17.6.jar
+++ b/main/libs/rxjava-android-0.19.6.jar
Binary files differ
diff --git a/main/libs/rxjava-android-0.19.6.jar.properties b/main/libs/rxjava-android-0.19.6.jar.properties
new file mode 100644
index 0000000..7414a89
--- /dev/null
+++ b/main/libs/rxjava-android-0.19.6.jar.properties
@@ -0,0 +1,2 @@
+src=src/rxjava-android-0.19.6-sources.jar
+doc=src/rxjava-android-0.19.6-javadoc.jar
diff --git a/main/libs/rxjava-async-util-0.17.6.jar b/main/libs/rxjava-async-util-0.17.6.jar
deleted file mode 100644
index 2947fe3..0000000
--- a/main/libs/rxjava-async-util-0.17.6.jar
+++ /dev/null
Binary files differ
diff --git a/main/libs/rxjava-async-util-0.19.6.jar b/main/libs/rxjava-async-util-0.19.6.jar
new file mode 100644
index 0000000..93c1a9b
--- /dev/null
+++ b/main/libs/rxjava-async-util-0.19.6.jar
Binary files differ
diff --git a/main/libs/rxjava-async-util-0.19.6.jar.properties b/main/libs/rxjava-async-util-0.19.6.jar.properties
new file mode 100644
index 0000000..0396d9a
--- /dev/null
+++ b/main/libs/rxjava-async-util-0.19.6.jar.properties
@@ -0,0 +1,2 @@
+src=src/rxjava-async-util-0.19.6-sources.jar
+doc=src/rxjava-async-util-0.19.6-javadoc.jar
diff --git a/main/libs/rxjava-core-0.17.6.jar b/main/libs/rxjava-core-0.17.6.jar
deleted file mode 100644
index 33d8801..0000000
--- a/main/libs/rxjava-core-0.17.6.jar
+++ /dev/null
Binary files differ
diff --git a/main/libs/rxjava-core-0.19.6.jar b/main/libs/rxjava-core-0.19.6.jar
new file mode 100644
index 0000000..9b6cbfa
--- /dev/null
+++ b/main/libs/rxjava-core-0.19.6.jar
Binary files differ
diff --git a/main/libs/rxjava-core-0.19.6.jar.properties b/main/libs/rxjava-core-0.19.6.jar.properties
new file mode 100644
index 0000000..41b8394
--- /dev/null
+++ b/main/libs/rxjava-core-0.19.6.jar.properties
@@ -0,0 +1,2 @@
+src=src/rxjava-core-0.19.6-sources.jar
+doc=src/rxjava-core-0.19.6-javadoc.jar
diff --git a/main/libs/src/rxjava-android-0.19.6-javadoc.jar b/main/libs/src/rxjava-android-0.19.6-javadoc.jar
new file mode 100644
index 0000000..a92ab4f
--- /dev/null
+++ b/main/libs/src/rxjava-android-0.19.6-javadoc.jar
Binary files differ
diff --git a/main/libs/src/rxjava-android-0.19.6-sources.jar b/main/libs/src/rxjava-android-0.19.6-sources.jar
new file mode 100644
index 0000000..ea4eba0
--- /dev/null
+++ b/main/libs/src/rxjava-android-0.19.6-sources.jar
Binary files differ
diff --git a/main/libs/src/rxjava-async-util-0.19.6-javadoc.jar b/main/libs/src/rxjava-async-util-0.19.6-javadoc.jar
new file mode 100644
index 0000000..f943e5f
--- /dev/null
+++ b/main/libs/src/rxjava-async-util-0.19.6-javadoc.jar
Binary files differ
diff --git a/main/libs/src/rxjava-async-util-0.19.6-sources.jar b/main/libs/src/rxjava-async-util-0.19.6-sources.jar
new file mode 100644
index 0000000..82ca499
--- /dev/null
+++ b/main/libs/src/rxjava-async-util-0.19.6-sources.jar
Binary files differ
diff --git a/main/libs/src/rxjava-core-0.19.6-javadoc.jar b/main/libs/src/rxjava-core-0.19.6-javadoc.jar
new file mode 100644
index 0000000..5523ee0
--- /dev/null
+++ b/main/libs/src/rxjava-core-0.19.6-javadoc.jar
Binary files differ
diff --git a/main/libs/src/rxjava-core-0.19.6-sources.jar b/main/libs/src/rxjava-core-0.19.6-sources.jar
new file mode 100644
index 0000000..0c2aa68
--- /dev/null
+++ b/main/libs/src/rxjava-core-0.19.6-sources.jar
Binary files differ
diff --git a/main/lint.xml b/main/lint.xml
index a8e2ddf..905b9a4 100644
--- a/main/lint.xml
+++ b/main/lint.xml
@@ -1,15 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
+ <issue id="AppCompatResource" severity="ignore" />
+ <issue id="Assert" severity="ignore" />
<issue id="ContentDescription" severity="ignore" />
<issue id="DuplicateIds" severity="error" />
<issue id="DuplicateIncludedIds" severity="error" />
<issue id="ExportedContentProvider" severity="ignore" />
<issue id="InvalidPackage" severity="ignore" />
- <issue id="MissingTranslation" severity="ignore" />
<issue id="MissingQuantity">
<ignore path="res/values-pl/strings.xml" />
</issue>
+ <issue id="MissingTranslation" severity="ignore" />
<issue id="Registered" severity="ignore" />
+ <issue id="UnusedAttribute" severity="ignore" />
<issue id="UnusedResources">
<ignore path="res/drawable-mdpi/attribute_maintenance.png" />
<ignore path="res/values/vpi__colors.xml" />
diff --git a/main/proguard-project.txt b/main/proguard-project.txt
index 5b606f5..74b8aa2 100644
--- a/main/proguard-project.txt
+++ b/main/proguard-project.txt
@@ -18,6 +18,9 @@
-dontwarn org.junit.**
-dontwarn org.robolectric.**
+# rxjava internal references sun.misc.Unsafe
+-dontwarn sun.misc.Unsafe
+
#-dontnote org.apache.commons.logging.**
-keep public class cgeo.geocaching.*
@@ -55,3 +58,6 @@
# Null analysis annotations of Eclipse JDT are just used by the Eclipse compiler, so ignore them here
-dontwarn org.eclipse.jdt.annotation.**
+
+# the sort action provider is only referenced from XML
+-keep public class cgeo.geocaching.sorting.SortActionProvider { *; }
diff --git a/main/project.properties b/main/project.properties
index a761287..f0fa845 100644
--- a/main/project.properties
+++ b/main/project.properties
@@ -13,3 +13,6 @@ proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.
# Project target.
target=Google Inc.:Google APIs:19
android.library.reference.1=../mapswithme-api
+android.library.reference.2=../android-support-v7-appcompat
+java.source=1.7
+java.target=1.7 \ No newline at end of file
diff --git a/main/project/libraries/update-libs.sh b/main/project/libraries/update-libs.sh
new file mode 100755
index 0000000..f2e9ced
--- /dev/null
+++ b/main/project/libraries/update-libs.sh
@@ -0,0 +1,33 @@
+#! /bin/sh
+#
+
+RXJAVA=0.19.6
+
+cd $(git rev-parse --show-toplevel)/main/libs
+
+updatelib () {
+ vendor="$1"
+ name="$2"
+ version="$3"
+ rm -f $name*.jar src/$name*.jar $name*.jar.properties
+ l=$name-$version.jar
+ wget -O $l "http://search.maven.org/remotecontent?filepath=$vendor/$name/$version/$l"
+ s=$name-$version-sources.jar
+ wget -O src/$s "http://search.maven.org/remotecontent?filepath=$vendor/$name/$version/$s"
+ d=$name-$version-javadoc.jar
+ wget -O src/$d "http://search.maven.org/remotecontent?filepath=$vendor/$name/$version/$d"
+ echo "src=src/$s" > $l.properties
+ echo "doc=src/$d" >> $l.properties
+ git add $l src/$s src/$d $l.properties
+}
+
+fixgradle() {
+ var="$1"
+ version="$2"
+ sed -i "/def $var =/s/.*/def $var = '$version'/" ../build.gradle
+}
+
+updatelib com/netflix/rxjava rxjava-core $RXJAVA
+updatelib com/netflix/rxjava rxjava-android $RXJAVA
+updatelib com/netflix/rxjava rxjava-async-util $RXJAVA
+fixgradle RXVersion $RXJAVA
diff --git a/main/res/drawable-hdpi/actionbar_dark_bg_main.9.png b/main/res/drawable-hdpi/actionbar_dark_bg_main.9.png
new file mode 100644
index 0000000..0ea8768
--- /dev/null
+++ b/main/res/drawable-hdpi/actionbar_dark_bg_main.9.png
Binary files differ
diff --git a/main/res/drawable-hdpi/actionbar_home.png b/main/res/drawable-hdpi/actionbar_home.png
deleted file mode 100644
index a5a1a8c..0000000
--- a/main/res/drawable-hdpi/actionbar_home.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-hdpi/actionbar_map.png b/main/res/drawable-hdpi/actionbar_map.png
deleted file mode 100644
index 0daa215..0000000
--- a/main/res/drawable-hdpi/actionbar_map.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-hdpi/actionbar_mylocation_off.png b/main/res/drawable-hdpi/actionbar_mylocation_off.png
deleted file mode 100644
index 17d61db..0000000
--- a/main/res/drawable-hdpi/actionbar_mylocation_off.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-hdpi/actionbar_mylocation_on.png b/main/res/drawable-hdpi/actionbar_mylocation_on.png
deleted file mode 100644
index 1f21901..0000000
--- a/main/res/drawable-hdpi/actionbar_mylocation_on.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-hdpi/actionbar_search.png b/main/res/drawable-hdpi/actionbar_search.png
deleted file mode 100644
index 59de344..0000000
--- a/main/res/drawable-hdpi/actionbar_search.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_account_list.png b/main/res/drawable-hdpi/ic_menu_account_list.png
index f858d2c..0f17170 100644
--- a/main/res/drawable-hdpi/ic_menu_account_list.png
+++ b/main/res/drawable-hdpi/ic_menu_account_list.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_add.png b/main/res/drawable-hdpi/ic_menu_add.png
index 65cc01e..444e8a5 100644
--- a/main/res/drawable-hdpi/ic_menu_add.png
+++ b/main/res/drawable-hdpi/ic_menu_add.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_agenda.png b/main/res/drawable-hdpi/ic_menu_agenda.png
index 6bb5cc8..9e08c29 100644
--- a/main/res/drawable-hdpi/ic_menu_agenda.png
+++ b/main/res/drawable-hdpi/ic_menu_agenda.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_clear_playlist.png b/main/res/drawable-hdpi/ic_menu_clear_playlist.png
index 0c3e06d..84a4a5b 100644
--- a/main/res/drawable-hdpi/ic_menu_clear_playlist.png
+++ b/main/res/drawable-hdpi/ic_menu_clear_playlist.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_compass.png b/main/res/drawable-hdpi/ic_menu_compass.png
index 104270f..39760f8 100644
--- a/main/res/drawable-hdpi/ic_menu_compass.png
+++ b/main/res/drawable-hdpi/ic_menu_compass.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_delete.png b/main/res/drawable-hdpi/ic_menu_delete.png
index 2aed26a..24d8f6a 100644
--- a/main/res/drawable-hdpi/ic_menu_delete.png
+++ b/main/res/drawable-hdpi/ic_menu_delete.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_edit.png b/main/res/drawable-hdpi/ic_menu_edit.png
index 602dd10..9bdba1b 100644
--- a/main/res/drawable-hdpi/ic_menu_edit.png
+++ b/main/res/drawable-hdpi/ic_menu_edit.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_emoticons.png b/main/res/drawable-hdpi/ic_menu_emoticons.png
index 4a1f744..16ec4e4 100644
--- a/main/res/drawable-hdpi/ic_menu_emoticons.png
+++ b/main/res/drawable-hdpi/ic_menu_emoticons.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_info_details.png b/main/res/drawable-hdpi/ic_menu_info_details.png
index 7696ceb..6a7a1e9 100644
--- a/main/res/drawable-hdpi/ic_menu_info_details.png
+++ b/main/res/drawable-hdpi/ic_menu_info_details.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_mapmode.png b/main/res/drawable-hdpi/ic_menu_mapmode.png
index c895ccb..5ac4a02 100644
--- a/main/res/drawable-hdpi/ic_menu_mapmode.png
+++ b/main/res/drawable-hdpi/ic_menu_mapmode.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_mark.png b/main/res/drawable-hdpi/ic_menu_mark.png
index 724d787..95a3217 100644
--- a/main/res/drawable-hdpi/ic_menu_mark.png
+++ b/main/res/drawable-hdpi/ic_menu_mark.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_mylocation.png b/main/res/drawable-hdpi/ic_menu_mylocation.png
new file mode 100644
index 0000000..ba82ee0
--- /dev/null
+++ b/main/res/drawable-hdpi/ic_menu_mylocation.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_myplaces.png b/main/res/drawable-hdpi/ic_menu_myplaces.png
index 5f726d8..ade7532 100644
--- a/main/res/drawable-hdpi/ic_menu_myplaces.png
+++ b/main/res/drawable-hdpi/ic_menu_myplaces.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_preferences.png b/main/res/drawable-hdpi/ic_menu_preferences.png
index 81bca4a..5321f82 100644
--- a/main/res/drawable-hdpi/ic_menu_preferences.png
+++ b/main/res/drawable-hdpi/ic_menu_preferences.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_recent_history.png b/main/res/drawable-hdpi/ic_menu_recent_history.png
index 0dd1627..4101434 100644
--- a/main/res/drawable-hdpi/ic_menu_recent_history.png
+++ b/main/res/drawable-hdpi/ic_menu_recent_history.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_refresh.png b/main/res/drawable-hdpi/ic_menu_refresh.png
index 53cacca..e13315f 100644
--- a/main/res/drawable-hdpi/ic_menu_refresh.png
+++ b/main/res/drawable-hdpi/ic_menu_refresh.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_rotate.png b/main/res/drawable-hdpi/ic_menu_rotate.png
index 85115af..09efba4 100644
--- a/main/res/drawable-hdpi/ic_menu_rotate.png
+++ b/main/res/drawable-hdpi/ic_menu_rotate.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_save.png b/main/res/drawable-hdpi/ic_menu_save.png
index fc26c5d..36fc7f4 100644
--- a/main/res/drawable-hdpi/ic_menu_save.png
+++ b/main/res/drawable-hdpi/ic_menu_save.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_set_as.png b/main/res/drawable-hdpi/ic_menu_set_as.png
index 7e79c15..41f931b 100644
--- a/main/res/drawable-hdpi/ic_menu_set_as.png
+++ b/main/res/drawable-hdpi/ic_menu_set_as.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_share.png b/main/res/drawable-hdpi/ic_menu_share.png
index b41b348..2837615 100644
--- a/main/res/drawable-hdpi/ic_menu_share.png
+++ b/main/res/drawable-hdpi/ic_menu_share.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_sort_alphabetically.png b/main/res/drawable-hdpi/ic_menu_sort_alphabetically.png
index 5d68998..74e6b83 100644
--- a/main/res/drawable-hdpi/ic_menu_sort_alphabetically.png
+++ b/main/res/drawable-hdpi/ic_menu_sort_alphabetically.png
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_sort_by_size.png b/main/res/drawable-hdpi/ic_menu_sort_by_size.png
deleted file mode 100644
index c9388fd..0000000
--- a/main/res/drawable-hdpi/ic_menu_sort_by_size.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-hdpi/ic_menu_start_conversation.png b/main/res/drawable-hdpi/ic_menu_start_conversation.png
index d63d3a7..395a5ec 100644
--- a/main/res/drawable-hdpi/ic_menu_start_conversation.png
+++ b/main/res/drawable-hdpi/ic_menu_start_conversation.png
Binary files differ
diff --git a/main/res/drawable-ldpi/actionbar_home.png b/main/res/drawable-ldpi/actionbar_home.png
deleted file mode 100644
index 2334d7d..0000000
--- a/main/res/drawable-ldpi/actionbar_home.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-ldpi/actionbar_map.png b/main/res/drawable-ldpi/actionbar_map.png
deleted file mode 100644
index afc108c..0000000
--- a/main/res/drawable-ldpi/actionbar_map.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-ldpi/actionbar_mylocation_off.png b/main/res/drawable-ldpi/actionbar_mylocation_off.png
deleted file mode 100644
index be0c923..0000000
--- a/main/res/drawable-ldpi/actionbar_mylocation_off.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-ldpi/actionbar_mylocation_on.png b/main/res/drawable-ldpi/actionbar_mylocation_on.png
deleted file mode 100644
index f137305..0000000
--- a/main/res/drawable-ldpi/actionbar_mylocation_on.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-ldpi/actionbar_search.png b/main/res/drawable-ldpi/actionbar_search.png
deleted file mode 100644
index f3ce1d9..0000000
--- a/main/res/drawable-ldpi/actionbar_search.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-ldpi/ic_menu_account_list.png b/main/res/drawable-ldpi/ic_menu_account_list.png
deleted file mode 100644
index 04ededd..0000000
--- a/main/res/drawable-ldpi/ic_menu_account_list.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-ldpi/ic_menu_clear_playlist.png b/main/res/drawable-ldpi/ic_menu_clear_playlist.png
deleted file mode 100644
index f3e6b51..0000000
--- a/main/res/drawable-ldpi/ic_menu_clear_playlist.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-ldpi/ic_menu_mark.png b/main/res/drawable-ldpi/ic_menu_mark.png
deleted file mode 100644
index 19bcd03..0000000
--- a/main/res/drawable-ldpi/ic_menu_mark.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-ldpi/ic_menu_more.png b/main/res/drawable-ldpi/ic_menu_more.png
deleted file mode 100644
index 62983c6..0000000
--- a/main/res/drawable-ldpi/ic_menu_more.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-ldpi/ic_menu_start_conversation.png b/main/res/drawable-ldpi/ic_menu_start_conversation.png
deleted file mode 100644
index 1e39928..0000000
--- a/main/res/drawable-ldpi/ic_menu_start_conversation.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-mdpi/actionbar_dark_bg_main.9.png b/main/res/drawable-mdpi/actionbar_dark_bg_main.9.png
new file mode 100644
index 0000000..e66d2a7
--- /dev/null
+++ b/main/res/drawable-mdpi/actionbar_dark_bg_main.9.png
Binary files differ
diff --git a/main/res/drawable-mdpi/actionbar_home.png b/main/res/drawable-mdpi/actionbar_home.png
deleted file mode 100644
index e109f0a..0000000
--- a/main/res/drawable-mdpi/actionbar_home.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-mdpi/actionbar_map.png b/main/res/drawable-mdpi/actionbar_map.png
deleted file mode 100644
index 80287d7..0000000
--- a/main/res/drawable-mdpi/actionbar_map.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-mdpi/actionbar_mylocation_off.png b/main/res/drawable-mdpi/actionbar_mylocation_off.png
deleted file mode 100644
index 1cdeeba..0000000
--- a/main/res/drawable-mdpi/actionbar_mylocation_off.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-mdpi/actionbar_mylocation_on.png b/main/res/drawable-mdpi/actionbar_mylocation_on.png
deleted file mode 100644
index 1d1b625..0000000
--- a/main/res/drawable-mdpi/actionbar_mylocation_on.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-mdpi/actionbar_search.png b/main/res/drawable-mdpi/actionbar_search.png
deleted file mode 100644
index cce7789..0000000
--- a/main/res/drawable-mdpi/actionbar_search.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_launcher_browser.png b/main/res/drawable-mdpi/ic_launcher_browser.png
new file mode 100644
index 0000000..9bc6817
--- /dev/null
+++ b/main/res/drawable-mdpi/ic_launcher_browser.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_account_list.png b/main/res/drawable-mdpi/ic_menu_account_list.png
index f0945b2..e4e717e 100644
--- a/main/res/drawable-mdpi/ic_menu_account_list.png
+++ b/main/res/drawable-mdpi/ic_menu_account_list.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_add.png b/main/res/drawable-mdpi/ic_menu_add.png
index 6752bfd..361c7c4 100644
--- a/main/res/drawable-mdpi/ic_menu_add.png
+++ b/main/res/drawable-mdpi/ic_menu_add.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_agenda.png b/main/res/drawable-mdpi/ic_menu_agenda.png
index 9f2c1dc..c63a12b 100644
--- a/main/res/drawable-mdpi/ic_menu_agenda.png
+++ b/main/res/drawable-mdpi/ic_menu_agenda.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_attachment.png b/main/res/drawable-mdpi/ic_menu_attachment.png
new file mode 100644
index 0000000..d3d4812
--- /dev/null
+++ b/main/res/drawable-mdpi/ic_menu_attachment.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_clear_playlist.png b/main/res/drawable-mdpi/ic_menu_clear_playlist.png
index 750db62..9100a69 100644
--- a/main/res/drawable-mdpi/ic_menu_clear_playlist.png
+++ b/main/res/drawable-mdpi/ic_menu_clear_playlist.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_compass.png b/main/res/drawable-mdpi/ic_menu_compass.png
index 7717dde..25235cc 100644
--- a/main/res/drawable-mdpi/ic_menu_compass.png
+++ b/main/res/drawable-mdpi/ic_menu_compass.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_copy.png b/main/res/drawable-mdpi/ic_menu_copy.png
new file mode 100644
index 0000000..eee5540
--- /dev/null
+++ b/main/res/drawable-mdpi/ic_menu_copy.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_delete.png b/main/res/drawable-mdpi/ic_menu_delete.png
index 7d95494..e2c8700 100644
--- a/main/res/drawable-mdpi/ic_menu_delete.png
+++ b/main/res/drawable-mdpi/ic_menu_delete.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_edit.png b/main/res/drawable-mdpi/ic_menu_edit.png
index 41a9c2e..d0314e9 100644
--- a/main/res/drawable-mdpi/ic_menu_edit.png
+++ b/main/res/drawable-mdpi/ic_menu_edit.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_emoticons.png b/main/res/drawable-mdpi/ic_menu_emoticons.png
index 765000b..8d1780f 100644
--- a/main/res/drawable-mdpi/ic_menu_emoticons.png
+++ b/main/res/drawable-mdpi/ic_menu_emoticons.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_info_details.png b/main/res/drawable-mdpi/ic_menu_info_details.png
index 1786d1e..18b15b5 100644
--- a/main/res/drawable-mdpi/ic_menu_info_details.png
+++ b/main/res/drawable-mdpi/ic_menu_info_details.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_mapmode.png b/main/res/drawable-mdpi/ic_menu_mapmode.png
index d85cab5..1b50b5a 100644
--- a/main/res/drawable-mdpi/ic_menu_mapmode.png
+++ b/main/res/drawable-mdpi/ic_menu_mapmode.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_mark.png b/main/res/drawable-mdpi/ic_menu_mark.png
index 5e95da7..0c55506 100644
--- a/main/res/drawable-mdpi/ic_menu_mark.png
+++ b/main/res/drawable-mdpi/ic_menu_mark.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_my_calendar.png b/main/res/drawable-mdpi/ic_menu_my_calendar.png
new file mode 100644
index 0000000..991dfb0
--- /dev/null
+++ b/main/res/drawable-mdpi/ic_menu_my_calendar.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_mylocation.png b/main/res/drawable-mdpi/ic_menu_mylocation.png
new file mode 100644
index 0000000..2a61a97
--- /dev/null
+++ b/main/res/drawable-mdpi/ic_menu_mylocation.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_mylocation_off.png b/main/res/drawable-mdpi/ic_menu_mylocation_off.png
new file mode 100644
index 0000000..00185b9
--- /dev/null
+++ b/main/res/drawable-mdpi/ic_menu_mylocation_off.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_myplaces.png b/main/res/drawable-mdpi/ic_menu_myplaces.png
index 06f11ba..75f2c9b 100644
--- a/main/res/drawable-mdpi/ic_menu_myplaces.png
+++ b/main/res/drawable-mdpi/ic_menu_myplaces.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_preferences.png b/main/res/drawable-mdpi/ic_menu_preferences.png
index 60dbff6..ccc50e6 100644
--- a/main/res/drawable-mdpi/ic_menu_preferences.png
+++ b/main/res/drawable-mdpi/ic_menu_preferences.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_recent_history.png b/main/res/drawable-mdpi/ic_menu_recent_history.png
index 4ccae5d..e5f8e2d 100644
--- a/main/res/drawable-mdpi/ic_menu_recent_history.png
+++ b/main/res/drawable-mdpi/ic_menu_recent_history.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_refresh.png b/main/res/drawable-mdpi/ic_menu_refresh.png
index 77d70dd..30b660f 100644
--- a/main/res/drawable-mdpi/ic_menu_refresh.png
+++ b/main/res/drawable-mdpi/ic_menu_refresh.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_rotate.png b/main/res/drawable-mdpi/ic_menu_rotate.png
index 27368b2..35fa56d 100644
--- a/main/res/drawable-mdpi/ic_menu_rotate.png
+++ b/main/res/drawable-mdpi/ic_menu_rotate.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_save.png b/main/res/drawable-mdpi/ic_menu_save.png
index 36d50b3..5f66864 100644
--- a/main/res/drawable-mdpi/ic_menu_save.png
+++ b/main/res/drawable-mdpi/ic_menu_save.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_send.png b/main/res/drawable-mdpi/ic_menu_send.png
new file mode 100644
index 0000000..06b4717
--- /dev/null
+++ b/main/res/drawable-mdpi/ic_menu_send.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_set_as.png b/main/res/drawable-mdpi/ic_menu_set_as.png
index cb9dc49..98cc305 100644
--- a/main/res/drawable-mdpi/ic_menu_set_as.png
+++ b/main/res/drawable-mdpi/ic_menu_set_as.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_share.png b/main/res/drawable-mdpi/ic_menu_share.png
index 44db9b1..d89ca5f 100644
--- a/main/res/drawable-mdpi/ic_menu_share.png
+++ b/main/res/drawable-mdpi/ic_menu_share.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_sort_alphabetically.png b/main/res/drawable-mdpi/ic_menu_sort_alphabetically.png
index 2583eb8..0c5ffad 100644
--- a/main/res/drawable-mdpi/ic_menu_sort_alphabetically.png
+++ b/main/res/drawable-mdpi/ic_menu_sort_alphabetically.png
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_sort_by_size.png b/main/res/drawable-mdpi/ic_menu_sort_by_size.png
deleted file mode 100644
index 65e2786..0000000
--- a/main/res/drawable-mdpi/ic_menu_sort_by_size.png
+++ /dev/null
Binary files differ
diff --git a/main/res/drawable-mdpi/ic_menu_start_conversation.png b/main/res/drawable-mdpi/ic_menu_start_conversation.png
index aadcc2f..24b6540 100644
--- a/main/res/drawable-mdpi/ic_menu_start_conversation.png
+++ b/main/res/drawable-mdpi/ic_menu_start_conversation.png
Binary files differ
diff --git a/main/res/drawable-mdpi/image_no_placement.png b/main/res/drawable-mdpi/image_no_placement.png
index d73f7c7..78ea971 100644
--- a/main/res/drawable-mdpi/image_no_placement.png
+++ b/main/res/drawable-mdpi/image_no_placement.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/actionbar_dark_bg_main.9.png b/main/res/drawable-xhdpi/actionbar_dark_bg_main.9.png
new file mode 100644
index 0000000..4fb69c9
--- /dev/null
+++ b/main/res/drawable-xhdpi/actionbar_dark_bg_main.9.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_launcher_browser.png b/main/res/drawable-xhdpi/ic_launcher_browser.png
new file mode 100644
index 0000000..9412fbe
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_launcher_browser.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_account_list.png b/main/res/drawable-xhdpi/ic_menu_account_list.png
new file mode 100644
index 0000000..ebe29b9
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_account_list.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_add.png b/main/res/drawable-xhdpi/ic_menu_add.png
new file mode 100644
index 0000000..7d498a9
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_add.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_agenda.png b/main/res/drawable-xhdpi/ic_menu_agenda.png
new file mode 100644
index 0000000..25e9f11
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_agenda.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_clear_playlist.png b/main/res/drawable-xhdpi/ic_menu_clear_playlist.png
new file mode 100644
index 0000000..8981d6f
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_clear_playlist.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_compass.png b/main/res/drawable-xhdpi/ic_menu_compass.png
new file mode 100644
index 0000000..1c2ad89
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_compass.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_delete.png b/main/res/drawable-xhdpi/ic_menu_delete.png
new file mode 100644
index 0000000..65b9cae
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_delete.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_edit.png b/main/res/drawable-xhdpi/ic_menu_edit.png
new file mode 100644
index 0000000..fcdd71e
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_edit.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_emoticons.png b/main/res/drawable-xhdpi/ic_menu_emoticons.png
new file mode 100644
index 0000000..af730fa
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_emoticons.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_info_details.png b/main/res/drawable-xhdpi/ic_menu_info_details.png
new file mode 100644
index 0000000..24ea543
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_info_details.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_mapmode.png b/main/res/drawable-xhdpi/ic_menu_mapmode.png
new file mode 100644
index 0000000..0b62d08
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_mapmode.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_mark.png b/main/res/drawable-xhdpi/ic_menu_mark.png
new file mode 100644
index 0000000..a5de6fb
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_mark.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_mylocation.png b/main/res/drawable-xhdpi/ic_menu_mylocation.png
new file mode 100644
index 0000000..b0a76a2
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_mylocation.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_mylocation_off.png b/main/res/drawable-xhdpi/ic_menu_mylocation_off.png
new file mode 100644
index 0000000..6e45c52
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_mylocation_off.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_myplaces.png b/main/res/drawable-xhdpi/ic_menu_myplaces.png
new file mode 100644
index 0000000..205848e
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_myplaces.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_preferences.png b/main/res/drawable-xhdpi/ic_menu_preferences.png
new file mode 100644
index 0000000..02cfbad
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_preferences.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_recent_history.png b/main/res/drawable-xhdpi/ic_menu_recent_history.png
new file mode 100644
index 0000000..fc5e1fc
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_recent_history.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_refresh.png b/main/res/drawable-xhdpi/ic_menu_refresh.png
new file mode 100644
index 0000000..9e9f10e
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_refresh.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_rotate.png b/main/res/drawable-xhdpi/ic_menu_rotate.png
new file mode 100644
index 0000000..98e19fe
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_rotate.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_save.png b/main/res/drawable-xhdpi/ic_menu_save.png
new file mode 100644
index 0000000..62a66d8
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_save.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_set_as.png b/main/res/drawable-xhdpi/ic_menu_set_as.png
new file mode 100644
index 0000000..8689766
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_set_as.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_share.png b/main/res/drawable-xhdpi/ic_menu_share.png
new file mode 100644
index 0000000..fce1d35
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_share.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_sort_alphabetically.png b/main/res/drawable-xhdpi/ic_menu_sort_alphabetically.png
new file mode 100644
index 0000000..5736ff8
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_sort_alphabetically.png
Binary files differ
diff --git a/main/res/drawable-xhdpi/ic_menu_start_conversation.png b/main/res/drawable-xhdpi/ic_menu_start_conversation.png
new file mode 100644
index 0000000..d71ed17
--- /dev/null
+++ b/main/res/drawable-xhdpi/ic_menu_start_conversation.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/actionbar_dark_bg_main.9.png b/main/res/drawable-xxhdpi/actionbar_dark_bg_main.9.png
new file mode 100644
index 0000000..38b7fce
--- /dev/null
+++ b/main/res/drawable-xxhdpi/actionbar_dark_bg_main.9.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_launcher_browser.png b/main/res/drawable-xxhdpi/ic_launcher_browser.png
new file mode 100644
index 0000000..bd8c447
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_launcher_browser.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_account_list.png b/main/res/drawable-xxhdpi/ic_menu_account_list.png
new file mode 100644
index 0000000..e072523
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_account_list.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_add.png b/main/res/drawable-xxhdpi/ic_menu_add.png
new file mode 100644
index 0000000..18a83a1
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_add.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_agenda.png b/main/res/drawable-xxhdpi/ic_menu_agenda.png
new file mode 100644
index 0000000..20f350b
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_agenda.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_clear_playlist.png b/main/res/drawable-xxhdpi/ic_menu_clear_playlist.png
new file mode 100644
index 0000000..819e839
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_clear_playlist.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_compass.png b/main/res/drawable-xxhdpi/ic_menu_compass.png
new file mode 100644
index 0000000..068678d
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_compass.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_delete.png b/main/res/drawable-xxhdpi/ic_menu_delete.png
new file mode 100644
index 0000000..8e9e78d
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_delete.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_edit.png b/main/res/drawable-xxhdpi/ic_menu_edit.png
new file mode 100644
index 0000000..2b6e967
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_edit.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_emoticons.png b/main/res/drawable-xxhdpi/ic_menu_emoticons.png
new file mode 100644
index 0000000..eae564f
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_emoticons.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_info_details.png b/main/res/drawable-xxhdpi/ic_menu_info_details.png
new file mode 100644
index 0000000..4414bea
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_info_details.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_mapmode.png b/main/res/drawable-xxhdpi/ic_menu_mapmode.png
new file mode 100644
index 0000000..4d8c185
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_mapmode.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_mark.png b/main/res/drawable-xxhdpi/ic_menu_mark.png
new file mode 100644
index 0000000..768aeb3
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_mark.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_mylocation.png b/main/res/drawable-xxhdpi/ic_menu_mylocation.png
new file mode 100644
index 0000000..8ea61e1
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_mylocation.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_mylocation_off.png b/main/res/drawable-xxhdpi/ic_menu_mylocation_off.png
new file mode 100644
index 0000000..8435579
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_mylocation_off.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_myplaces.png b/main/res/drawable-xxhdpi/ic_menu_myplaces.png
new file mode 100644
index 0000000..85b3f20
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_myplaces.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_preferences.png b/main/res/drawable-xxhdpi/ic_menu_preferences.png
new file mode 100644
index 0000000..b039537
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_preferences.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_recent_history.png b/main/res/drawable-xxhdpi/ic_menu_recent_history.png
new file mode 100644
index 0000000..a3640a6
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_recent_history.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_refresh.png b/main/res/drawable-xxhdpi/ic_menu_refresh.png
new file mode 100644
index 0000000..580f4cf
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_refresh.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_rotate.png b/main/res/drawable-xxhdpi/ic_menu_rotate.png
new file mode 100644
index 0000000..fd6781f
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_rotate.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_save.png b/main/res/drawable-xxhdpi/ic_menu_save.png
new file mode 100644
index 0000000..800da9a
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_save.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_set_as.png b/main/res/drawable-xxhdpi/ic_menu_set_as.png
new file mode 100644
index 0000000..667d723
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_set_as.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_share.png b/main/res/drawable-xxhdpi/ic_menu_share.png
new file mode 100644
index 0000000..7b90639
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_share.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_sort_alphabetically.png b/main/res/drawable-xxhdpi/ic_menu_sort_alphabetically.png
new file mode 100644
index 0000000..bb925f2
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_sort_alphabetically.png
Binary files differ
diff --git a/main/res/drawable-xxhdpi/ic_menu_start_conversation.png b/main/res/drawable-xxhdpi/ic_menu_start_conversation.png
new file mode 100644
index 0000000..bb26e49
--- /dev/null
+++ b/main/res/drawable-xxhdpi/ic_menu_start_conversation.png
Binary files differ
diff --git a/main/res/drawable/favorite_background_dark.xml b/main/res/drawable/favorite_background_dark.xml
index 5e3a32f..38b1a00 100644
--- a/main/res/drawable/favorite_background_dark.xml
+++ b/main/res/drawable/favorite_background_dark.xml
@@ -3,11 +3,9 @@
android:shape="rectangle" >
<stroke
- android:width="2px"
+ android:width="1dp"
android:color="#99FFFFFF" />
<solid android:color="#99FFFFFF" />
- <corners android:bottomLeftRadius="5dip" />
-
</shape> \ No newline at end of file
diff --git a/main/res/drawable/favorite_background_green_dark.xml b/main/res/drawable/favorite_background_green_dark.xml
index fd463bf..707301b 100644
--- a/main/res/drawable/favorite_background_green_dark.xml
+++ b/main/res/drawable/favorite_background_green_dark.xml
@@ -3,11 +3,9 @@
android:shape="rectangle" >
<stroke
- android:width="2px"
+ android:width="1dp"
android:color="#99FFFFFF" />
<solid android:color="#9900FF00" />
- <corners android:bottomLeftRadius="5dip" />
-
</shape> \ No newline at end of file
diff --git a/main/res/drawable/favorite_background_green_light.xml b/main/res/drawable/favorite_background_green_light.xml
index d3505cd..d564f9c 100644
--- a/main/res/drawable/favorite_background_green_light.xml
+++ b/main/res/drawable/favorite_background_green_light.xml
@@ -3,11 +3,9 @@
android:shape="rectangle" >
<stroke
- android:width="2px"
+ android:width="1dp"
android:color="#99000000" />
<solid android:color="#9900FF00" />
- <corners android:bottomLeftRadius="5dip" />
-
</shape> \ No newline at end of file
diff --git a/main/res/drawable/favorite_background_light.xml b/main/res/drawable/favorite_background_light.xml
index 9f9741a..08bef23 100644
--- a/main/res/drawable/favorite_background_light.xml
+++ b/main/res/drawable/favorite_background_light.xml
@@ -3,11 +3,9 @@
android:shape="rectangle" >
<stroke
- android:width="2px"
+ android:width="1dp"
android:color="#99000000" />
<solid android:color="#99000000" />
- <corners android:bottomLeftRadius="5dip" />
-
</shape> \ No newline at end of file
diff --git a/main/res/drawable/favorite_background_orange_dark.xml b/main/res/drawable/favorite_background_orange_dark.xml
index 9a06540..bf6feb9 100644
--- a/main/res/drawable/favorite_background_orange_dark.xml
+++ b/main/res/drawable/favorite_background_orange_dark.xml
@@ -3,11 +3,9 @@
android:shape="rectangle" >
<stroke
- android:width="2px"
+ android:width="1dp"
android:color="#99FFFFFF" />
<solid android:color="#99FFAA00" />
- <corners android:bottomLeftRadius="5dip" />
-
</shape> \ No newline at end of file
diff --git a/main/res/drawable/favorite_background_orange_light.xml b/main/res/drawable/favorite_background_orange_light.xml
index 982ff7d..fe465df 100644
--- a/main/res/drawable/favorite_background_orange_light.xml
+++ b/main/res/drawable/favorite_background_orange_light.xml
@@ -3,11 +3,9 @@
android:shape="rectangle" >
<stroke
- android:width="2px"
+ android:width="1dp"
android:color="#99000000" />
<solid android:color="#99FFAA00" />
- <corners android:bottomLeftRadius="5dip" />
-
</shape> \ No newline at end of file
diff --git a/main/res/drawable/favorite_background_red_dark.xml b/main/res/drawable/favorite_background_red_dark.xml
index 4fd6a57..d4b6e21 100644
--- a/main/res/drawable/favorite_background_red_dark.xml
+++ b/main/res/drawable/favorite_background_red_dark.xml
@@ -3,11 +3,9 @@
android:shape="rectangle" >
<stroke
- android:width="2px"
+ android:width="1dp"
android:color="#99FFFFFF" />
<solid android:color="#99FF0000" />
- <corners android:bottomLeftRadius="5dip" />
-
</shape> \ No newline at end of file
diff --git a/main/res/drawable/favorite_background_red_light.xml b/main/res/drawable/favorite_background_red_light.xml
index a8d6e14..e53c0df 100644
--- a/main/res/drawable/favorite_background_red_light.xml
+++ b/main/res/drawable/favorite_background_red_light.xml
@@ -3,11 +3,9 @@
android:shape="rectangle" >
<stroke
- android:width="2px"
+ android:width="1dp"
android:color="#99000000" />
<solid android:color="#99FF0000" />
- <corners android:bottomLeftRadius="5dip" />
-
</shape> \ No newline at end of file
diff --git a/main/res/drawable/ic_menu_myposition.xml b/main/res/drawable/ic_menu_myposition.xml
new file mode 100644
index 0000000..b50eb1e
--- /dev/null
+++ b/main/res/drawable/ic_menu_myposition.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/ic_menu_mylocation" android:state_checked="true"/>
+ <item android:drawable="@drawable/ic_menu_mylocation_off" android:state_checked="false" />
+</selector> \ No newline at end of file
diff --git a/main/res/drawable/inventory_background_dark.xml b/main/res/drawable/inventory_background_dark.xml
index e618e47..d30872b 100644
--- a/main/res/drawable/inventory_background_dark.xml
+++ b/main/res/drawable/inventory_background_dark.xml
@@ -3,11 +3,9 @@
android:shape="rectangle" >
<stroke
- android:width="2px"
+ android:width="1dp"
android:color="#99FFFFFF" />
<solid android:color="#AA000000" />
- <corners android:topLeftRadius="5dip" />
-
</shape> \ No newline at end of file
diff --git a/main/res/drawable/inventory_background_light.xml b/main/res/drawable/inventory_background_light.xml
index 631f1e6..181069e 100644
--- a/main/res/drawable/inventory_background_light.xml
+++ b/main/res/drawable/inventory_background_light.xml
@@ -3,11 +3,9 @@
android:shape="rectangle" >
<stroke
- android:width="2px"
+ android:width="1dp"
android:color="#99000000" />
<solid android:color="#AAFFFFFF" />
- <corners android:topLeftRadius="5dip" />
-
</shape> \ No newline at end of file
diff --git a/main/res/layout-land/compass_activity.xml b/main/res/layout-land/compass_activity.xml
index 00e12bf..738f02e 100644
--- a/main/res/layout-land/compass_activity.xml
+++ b/main/res/layout-land/compass_activity.xml
@@ -3,121 +3,113 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="?background_color"
- android:orientation="vertical" >
+ android:orientation="horizontal" >
- <include layout="@layout/actionbar" />
-
- <LinearLayout
+ <RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:orientation="horizontal" >
+ android:layout_weight="1"
+ android:orientation="vertical" >
- <RelativeLayout
+ <TextView
+ android:id="@+id/destination"
android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_weight="1"
- android:orientation="vertical" >
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="false"
+ android:layout_alignParentTop="true"
+ android:layout_centerHorizontal="true"
+ android:layout_gravity="center"
+ android:gravity="center_horizontal"
+ android:textColor="?text_color"
+ android:textSize="14sp" />
- <TextView
- android:id="@+id/destination"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="false"
- android:layout_alignParentTop="true"
- android:layout_centerHorizontal="true"
- android:layout_gravity="center"
- android:gravity="center_horizontal"
- android:textColor="?text_color"
- android:textSize="14sp" />
-
- <TextView
- android:id="@+id/cacheinfo"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="false"
- android:layout_alignParentTop="false"
- android:layout_below="@+id/destination"
- android:layout_centerHorizontal="true"
- android:layout_gravity="center"
- android:gravity="center_horizontal"
- android:textColor="?text_color"
- android:textSize="14sp" />
+ <TextView
+ android:id="@+id/cacheinfo"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="false"
+ android:layout_alignParentTop="false"
+ android:layout_below="@+id/destination"
+ android:layout_centerHorizontal="true"
+ android:layout_gravity="center"
+ android:gravity="center_horizontal"
+ android:textColor="?text_color"
+ android:textSize="14sp" />
- <TextView
- android:id="@+id/heading"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- android:layout_gravity="left"
- android:layout_marginLeft="3dip"
- android:text="@null"
- android:textColor="?text_color"
- android:textSize="26sp" />
+ <TextView
+ android:id="@+id/heading"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentLeft="true"
+ android:layout_centerVertical="true"
+ android:layout_gravity="left"
+ android:layout_marginLeft="3dip"
+ android:text="@null"
+ android:textColor="?text_color"
+ android:textSize="26sp" />
- <TextView
- android:id="@+id/distance"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:layout_gravity="right"
- android:layout_marginRight="3dip"
- android:text="@null"
- android:textColor="?text_color"
- android:textSize="26sp" />
+ <TextView
+ android:id="@+id/distance"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_centerVertical="true"
+ android:layout_gravity="right"
+ android:layout_marginRight="3dip"
+ android:text="@null"
+ android:textColor="?text_color"
+ android:textSize="26sp" />
- <TextView
- android:id="@+id/nav_location"
- style="@style/location_current"
- android:layout_above="@+id/status"
- android:layout_alignParentBottom="false"
- android:layout_alignParentLeft="false"
- android:layout_alignParentTop="false"
- android:layout_marginLeft="0dp"
- android:layout_marginTop="95dp"
- android:text="@string/loc_trying" />
+ <TextView
+ android:id="@+id/nav_location"
+ style="@style/location_current"
+ android:layout_above="@+id/status"
+ android:layout_alignParentBottom="false"
+ android:layout_alignParentLeft="false"
+ android:layout_alignParentTop="false"
+ android:layout_marginLeft="0dp"
+ android:layout_marginTop="95dp"
+ android:text="@string/loc_trying" />
- <RelativeLayout
- android:id="@+id/status"
- android:layout_width="fill_parent"
- android:layout_height="16dip"
- android:layout_alignParentBottom="true"
- android:layout_alignParentLeft="false"
- android:layout_alignParentTop="false"
- android:longClickable="true" >
+ <RelativeLayout
+ android:id="@+id/status"
+ android:layout_width="fill_parent"
+ android:layout_height="16dip"
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentLeft="false"
+ android:layout_alignParentTop="false"
+ android:longClickable="true" >
- <TextView
- android:id="@+id/nav_type"
- style="@style/location_current_type"
- android:textColor="?text_color_grey" />
+ <TextView
+ android:id="@+id/nav_type"
+ style="@style/location_current_type"
+ android:textColor="?text_color_grey" />
- <TextView
- android:id="@+id/nav_accuracy"
- style="@style/location_current_accuracy"
- android:textColor="?text_color_grey" />
+ <TextView
+ android:id="@+id/nav_accuracy"
+ style="@style/location_current_accuracy"
+ android:textColor="?text_color_grey" />
- <TextView
- android:id="@+id/nav_satellites"
- style="@style/location_current_satellites"
- android:textColor="?text_color_grey" />
- </RelativeLayout>
+ <TextView
+ android:id="@+id/nav_satellites"
+ style="@style/location_current_satellites"
+ android:textColor="?text_color_grey" />
</RelativeLayout>
+ </RelativeLayout>
- <view
- android:id="@+id/rose"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_gravity="center_vertical"
- android:layout_marginBottom="1dip"
- android:layout_marginLeft="1dip"
- android:layout_marginRight="1dip"
- android:layout_marginTop="6dip"
- android:layout_weight="1"
- class="cgeo.geocaching.ui.CompassView"
- android:gravity="center"
- android:keepScreenOn="true"
- android:padding="4dip" />
- </LinearLayout>
+ <view
+ android:id="@+id/rose"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_gravity="center_vertical"
+ android:layout_marginBottom="1dip"
+ android:layout_marginLeft="1dip"
+ android:layout_marginRight="1dip"
+ android:layout_marginTop="6dip"
+ android:layout_weight="1"
+ class="cgeo.geocaching.ui.CompassView"
+ android:gravity="center"
+ android:keepScreenOn="true"
+ android:padding="4dip" />
-</LinearLayout>
+</LinearLayout> \ No newline at end of file
diff --git a/main/res/layout-land/coordinatesinput_dialog.xml b/main/res/layout-land/coordinatesinput_dialog.xml
index 88e5e76..202f1d3 100644
--- a/main/res/layout-land/coordinatesinput_dialog.xml
+++ b/main/res/layout-land/coordinatesinput_dialog.xml
@@ -1,183 +1,169 @@
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/linearLayout1"
+ android:id="@+id/scroller"
android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
+ android:layout_height="fill_parent"
+ android:fillViewport="true" >
- <LinearLayout style="@style/action_bar" >
+ <LinearLayout
+ android:id="@+id/scroller_child"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
- <TextView
- style="@style/action_bar_title"
- android:text="@string/cache_coordinates" />
- </LinearLayout>
+ <Spinner
+ android:id="@+id/spinnerCoordinateFormats"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content" />
- <ScrollView
- android:id="@+id/scroller"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:fillViewport="true" >
+ <TableLayout
+ android:id="@+id/coordTable"
+ android:layout_width="fill_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:stretchColumns="0,1,3,5,7" >
- <LinearLayout
- android:id="@+id/scroller_child"
+ <TableRow android:id="@+id/tableRow1" >
+
+ <Button
+ android:id="@+id/ButtonLat"
+ style="@style/button_full" />
+
+ <EditText
+ android:id="@+id/EditTextLatDeg"
+ style="@style/edittext_full"
+ android:gravity="right"
+ android:inputType="number"
+ android:selectAllOnFocus="true" />
+
+ <TextView
+ android:id="@+id/LatSeparator1"
+ android:text="°"
+ tools:ignore="HardcodedText" />
+
+ <EditText
+ android:id="@+id/EditTextLatMin"
+ style="@style/edittext_full"
+ android:gravity="right"
+ android:inputType="number"
+ android:selectAllOnFocus="true" />
+
+ <TextView
+ android:id="@+id/LatSeparator2"
+ android:text=","
+ tools:ignore="HardcodedText" />
+
+ <EditText
+ android:id="@+id/EditTextLatSec"
+ style="@style/edittext_full"
+ android:gravity="right"
+ android:inputType="number"
+ android:selectAllOnFocus="true" />
+
+ <TextView
+ android:id="@+id/LatSeparator3"
+ android:text=","
+ tools:ignore="HardcodedText" />
+
+ <EditText
+ android:id="@+id/EditTextLatSecFrac"
+ style="@style/edittext_full"
+ android:inputType="number"
+ android:selectAllOnFocus="true" />
+ </TableRow>
+
+ <TableRow android:id="@+id/tableRow2" >
+
+ <Button
+ android:id="@+id/ButtonLon"
+ style="@style/button_full" />
+
+ <EditText
+ android:id="@+id/EditTextLonDeg"
+ style="@style/edittext_full"
+ android:gravity="right"
+ android:inputType="number"
+ android:selectAllOnFocus="true" />
+
+ <TextView
+ android:id="@+id/LonSeparator1"
+ android:text="°"
+ tools:ignore="HardcodedText" />
+
+ <EditText
+ android:id="@+id/EditTextLonMin"
+ style="@style/edittext_full"
+ android:gravity="right"
+ android:inputType="number"
+ android:selectAllOnFocus="true" />
+
+ <TextView
+ android:id="@+id/LonSeparator2"
+ android:text=","
+ tools:ignore="HardcodedText" />
+
+ <EditText
+ android:id="@+id/EditTextLonSec"
+ style="@style/edittext_full"
+ android:gravity="right"
+ android:inputType="number"
+ android:selectAllOnFocus="true" />
+
+ <TextView
+ android:id="@+id/LonSeparator3"
+ android:text=","
+ tools:ignore="HardcodedText" />
+
+ <EditText
+ android:id="@+id/EditTextLonSecFrac"
+ style="@style/edittext_full"
+ android:inputType="number"
+ android:selectAllOnFocus="true" />
+ </TableRow>
+ </TableLayout>
+
+ <EditText
+ android:id="@+id/latitude"
+ style="@style/edittext_full"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:orientation="vertical" >
+ android:hint="@string/latitude" />
- <Spinner
- android:id="@+id/spinnerCoordinateFormats"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content" />
+ <EditText
+ android:id="@+id/longitude"
+ style="@style/edittext_full"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/longitude" />
- <TableLayout
- android:id="@+id/coordTable"
- android:layout_width="fill_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- android:stretchColumns="0,1,3,5,7" >
-
- <TableRow android:id="@+id/tableRow1" >
-
- <Button
- android:id="@+id/ButtonLat"
- style="@style/button_full" />
-
- <EditText
- android:id="@+id/EditTextLatDeg"
- style="@style/edittext_full"
- android:gravity="right"
- android:inputType="number"
- android:selectAllOnFocus="true" />
-
- <TextView
- android:id="@+id/LatSeparator1"
- android:text="°"
- tools:ignore="HardcodedText" />
-
- <EditText
- android:id="@+id/EditTextLatMin"
- style="@style/edittext_full"
- android:gravity="right"
- android:inputType="number"
- android:selectAllOnFocus="true" />
-
- <TextView
- android:id="@+id/LatSeparator2"
- android:text=","
- tools:ignore="HardcodedText" />
-
- <EditText
- android:id="@+id/EditTextLatSec"
- style="@style/edittext_full"
- android:gravity="right"
- android:inputType="number"
- android:selectAllOnFocus="true" />
-
- <TextView
- android:id="@+id/LatSeparator3"
- android:text=","
- tools:ignore="HardcodedText" />
-
- <EditText
- android:id="@+id/EditTextLatSecFrac"
- style="@style/edittext_full"
- android:inputType="number"
- android:selectAllOnFocus="true" />
- </TableRow>
-
- <TableRow android:id="@+id/tableRow2" >
-
- <Button
- android:id="@+id/ButtonLon"
- style="@style/button_full" />
-
- <EditText
- android:id="@+id/EditTextLonDeg"
- style="@style/edittext_full"
- android:gravity="right"
- android:inputType="number"
- android:selectAllOnFocus="true" />
-
- <TextView
- android:id="@+id/LonSeparator1"
- android:text="°"
- tools:ignore="HardcodedText" />
-
- <EditText
- android:id="@+id/EditTextLonMin"
- style="@style/edittext_full"
- android:gravity="right"
- android:inputType="number"
- android:selectAllOnFocus="true" />
-
- <TextView
- android:id="@+id/LonSeparator2"
- android:text=","
- tools:ignore="HardcodedText" />
-
- <EditText
- android:id="@+id/EditTextLonSec"
- style="@style/edittext_full"
- android:gravity="right"
- android:inputType="number"
- android:selectAllOnFocus="true" />
-
- <TextView
- android:id="@+id/LonSeparator3"
- android:text=","
- tools:ignore="HardcodedText" />
-
- <EditText
- android:id="@+id/EditTextLonSecFrac"
- style="@style/edittext_full"
- android:inputType="number"
- android:selectAllOnFocus="true" />
- </TableRow>
- </TableLayout>
-
- <EditText
- android:id="@+id/latitude"
- style="@style/edittext_full"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:hint="@string/latitude" />
+ <LinearLayout
+ android:id="@+id/linearLayout2"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content" >
- <EditText
- android:id="@+id/longitude"
- style="@style/edittext_full"
+ <Button
+ android:id="@+id/current"
+ style="@style/button_full"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:hint="@string/longitude" />
-
- <LinearLayout
- android:id="@+id/linearLayout2"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content" >
-
- <Button
- android:id="@+id/current"
- style="@style/button_full"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:text="@string/waypoint_my_coordinates" />
-
- <Button
- android:id="@+id/cache"
- style="@style/button_full"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:text="@string/waypoint_cache_coordinates" />
- </LinearLayout>
+ android:layout_weight="1"
+ android:text="@string/waypoint_my_coordinates" />
<Button
- android:id="@+id/done"
+ android:id="@+id/cache"
style="@style/button_full"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:text="@string/waypoint_done" />
+ android:layout_weight="1"
+ android:text="@string/waypoint_cache_coordinates" />
</LinearLayout>
- </ScrollView>
-</LinearLayout> \ No newline at end of file
+ <Button
+ android:id="@+id/done"
+ style="@style/button_full"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/waypoint_done" />
+ </LinearLayout>
+
+</ScrollView> \ No newline at end of file
diff --git a/main/res/layout-v11/actionbar_maps.xml b/main/res/layout-v11/actionbar_maps.xml
new file mode 100644
index 0000000..3e72717
--- /dev/null
+++ b/main/res/layout-v11/actionbar_maps.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+ <!-- Empty layout, on 11+ we have a real action bar -->
+<merge xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent" android:layout_height="match_parent">
+
+</merge> \ No newline at end of file
diff --git a/main/res/layout/about_help_page.xml b/main/res/layout/about_help_page.xml
index 8444094..0439e22 100644
--- a/main/res/layout/about_help_page.xml
+++ b/main/res/layout/about_help_page.xml
@@ -27,22 +27,6 @@
android:textSize="14sp" />
<TextView
- android:id="@+id/nutshellmanual"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:clickable="true"
- android:focusable="true"
- android:linksClickable="false"
- android:text="@string/nutshellmanual"
- android:textColor="?text_color"
- android:textColorLink="?text_color_link"
- android:textSize="14sp" />
-
- <TextView
android:id="@+id/website"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/main/res/layout/actionbar.xml b/main/res/layout/actionbar.xml
deleted file mode 100644
index 098120c..0000000
--- a/main/res/layout/actionbar.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- style="@style/action_bar" >
-
- <include layout="@layout/actionbar_title" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/main/res/layout/actionbar_button_compass.xml b/main/res/layout/actionbar_button_compass.xml
deleted file mode 100644
index 932444b..0000000
--- a/main/res/layout/actionbar_button_compass.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<merge xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
-
- <View style="@style/action_bar_separator" />
-
- <ImageView
- android:id="@+id/defaultNavigation"
- style="@style/action_bar_action"
- android:longClickable="true"
- android:onClick="goDefaultNavigation"
- android:src="@drawable/actionbar_compass_dark" />
-
-</merge> \ No newline at end of file
diff --git a/main/res/layout/actionbar_button_map.xml b/main/res/layout/actionbar_button_map.xml
deleted file mode 100644
index 9b2138a..0000000
--- a/main/res/layout/actionbar_button_map.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<merge xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
-
- <View style="@style/action_bar_separator" />
-
- <ImageView
- style="@style/action_bar_action"
- android:onClick="goMap"
- android:src="@drawable/actionbar_map" />
-
-</merge> \ No newline at end of file
diff --git a/main/res/layout/actionbar_button_myposition.xml b/main/res/layout/actionbar_button_myposition.xml
deleted file mode 100644
index 1e91419..0000000
--- a/main/res/layout/actionbar_button_myposition.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<merge xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
-
- <View style="@style/action_bar_separator" />
-
- <ImageSwitcher
- android:id="@+id/my_position"
- style="@style/action_bar_action" />
-
-</merge> \ No newline at end of file
diff --git a/main/res/layout/actionbar_button_search.xml b/main/res/layout/actionbar_button_search.xml
deleted file mode 100644
index 2aa1a50..0000000
--- a/main/res/layout/actionbar_button_search.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<merge xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
-
- <View style="@style/action_bar_separator" />
-
- <ImageView
- style="@style/action_bar_action"
- android:onClick="goSearch"
- android:src="@drawable/actionbar_search" />
-
-</merge> \ No newline at end of file
diff --git a/main/res/layout/actionbar_maps.xml b/main/res/layout/actionbar_maps.xml
new file mode 100644
index 0000000..0e3dc0e
--- /dev/null
+++ b/main/res/layout/actionbar_maps.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ style="@style/action_bar" >
+
+ <!-- Add the up chevron to the icon -->
+
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:src="@drawable/abc_ic_ab_back_holo_dark" />
+
+ <ImageView
+ style="@style/action_bar_action"
+ android:layout_marginLeft="-13dp"
+ android:onClick="navigateUp" />
+
+ <View style="@style/action_bar_separator" />
+
+ <TextView
+ android:id="@+id/actionbar_title"
+ style="@style/action_bar_title"
+ tools:ignore="InconsistentLayout" />
+
+ <ProgressBar
+ android:id="@+id/actionbar_progress"
+ style="@style/action_bar_progress"
+ android:visibility="gone"
+ tools:ignore="InconsistentLayout" />
+
+ <View style="@style/action_bar_separator" />
+
+ <FrameLayout style="@style/action_bar_action" >
+
+ <CheckBox
+ android:id="@+id/my_position"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="right"
+ android:button="@drawable/ic_menu_myposition"
+ android:checked="false"
+ tools:ignore="InconsistentLayout" />
+ </FrameLayout>
+
+ <!--
+ No overflow (...) button here since this menu is only shown on Gingerbread, which never
+ features an overflow menu
+ -->
+
+</LinearLayout> \ No newline at end of file
diff --git a/main/res/layout/actionbar_popup.xml b/main/res/layout/actionbar_popup.xml
new file mode 100644
index 0000000..0cab165
--- /dev/null
+++ b/main/res/layout/actionbar_popup.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ style="@style/action_bar">
+
+ <TextView
+ android:id="@+id/actionbar_title"
+ style="@style/action_bar_title" />
+
+ <ProgressBar
+ android:id="@+id/actionbar_progress"
+ style="@style/action_bar_progress"
+ android:visibility="gone" />
+
+ <View style="@style/action_bar_separator" />
+
+
+ <ImageView
+ android:id="@+id/defaultNavigation"
+ style="@style/action_bar_action"
+ android:longClickable="true"
+ android:src="@drawable/actionbar_compass_dark" />
+
+ <View style="@style/action_bar_separator" />
+
+ <ImageView
+ android:id="@+id/overflowActionBar"
+ style="@style/action_bar_action"
+ android:longClickable="true"
+ android:src="@drawable/abc_ic_menu_moreoverflow_normal_holo_dark" />
+
+
+</LinearLayout> \ No newline at end of file
diff --git a/main/res/layout/actionbar_progress.xml b/main/res/layout/actionbar_progress.xml
deleted file mode 100644
index 54b5875..0000000
--- a/main/res/layout/actionbar_progress.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ProgressBar xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/actionbar_progress"
- style="@style/action_bar_progress"
- android:visibility="gone" />
diff --git a/main/res/layout/actionbar_title.xml b/main/res/layout/actionbar_title.xml
deleted file mode 100644
index 4fa5348..0000000
--- a/main/res/layout/actionbar_title.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<merge xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
-
- <ImageView
- style="@style/action_bar_action"
- android:onClick="goHome" />
-
- <View style="@style/action_bar_separator" />
-
- <TextView
- android:id="@+id/actionbar_title"
- style="@style/action_bar_title" />
-
-</merge> \ No newline at end of file
diff --git a/main/res/layout/actionbar_title_no_home.xml b/main/res/layout/actionbar_title_no_home.xml
deleted file mode 100644
index 6295bdc..0000000
--- a/main/res/layout/actionbar_title_no_home.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<merge xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent" >
-
- <TextView
- android:id="@+id/actionbar_title"
- style="@style/action_bar_title" />
-
-</merge> \ No newline at end of file
diff --git a/main/res/layout/addresslist_activity.xml b/main/res/layout/addresslist_activity.xml
index c48c28f..4fbe53c 100644
--- a/main/res/layout/addresslist_activity.xml
+++ b/main/res/layout/addresslist_activity.xml
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
- <include layout="@layout/actionbar" />
-
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
@@ -13,7 +12,10 @@
android:layout_margin="0dip"
android:background="?background_color"
android:cacheColorHint="?background_color"
+ android:clipToPadding="false"
android:dividerHeight="1dip"
- android:padding="0dip" />
+ android:padding="0dip"
+ android:scrollbarStyle="outsideOverlay"
+ tools:listitem="@layout/addresslist_item" />
</LinearLayout> \ No newline at end of file
diff --git a/main/res/layout/authorization_activity.xml b/main/res/layout/authorization_activity.xml
index 28c1987..2907286 100644
--- a/main/res/layout/authorization_activity.xml
+++ b/main/res/layout/authorization_activity.xml
@@ -1,55 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
- android:visibility="visible" >
+ android:padding="4dip" >
- <include layout="@layout/actionbar" />
-
- <ScrollView
+ <LinearLayout
android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical"
- android:padding="4dip" >
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
- <LinearLayout
+ <TextView
+ android:id="@+id/auth_1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:orientation="vertical" >
-
- <TextView
- android:id="@+id/auth_1"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="left|center_vertical"
- android:layout_marginBottom="20dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:drawableLeft="@drawable/cgeo"
- android:drawablePadding="15dip"
- android:gravity="left|center_vertical"
- android:textColor="?text_color"
- android:textSize="14sp" />
-
- <TextView
- android:id="@+id/auth_2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left|center_vertical"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:gravity="left|center_vertical"
- android:textColor="?text_color"
- android:textSize="14sp" />
-
- <Button
- android:id="@+id/start"
- style="@style/button_full"
- android:layout_margin="7dip" />
-
- </LinearLayout>
- </ScrollView>
-
-</LinearLayout> \ No newline at end of file
+ android:layout_gravity="left|center_vertical"
+ android:layout_marginBottom="20dip"
+ android:layout_marginLeft="10dip"
+ android:layout_marginRight="10dip"
+ android:drawableLeft="@drawable/cgeo"
+ android:drawablePadding="15dip"
+ android:gravity="left|center_vertical"
+ android:textColor="?text_color"
+ android:textSize="14sp" />
+
+ <TextView
+ android:id="@+id/auth_2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left|center_vertical"
+ android:layout_marginBottom="5dip"
+ android:layout_marginLeft="10dip"
+ android:layout_marginRight="10dip"
+ android:gravity="left|center_vertical"
+ android:textColor="?text_color"
+ android:textSize="14sp" />
+
+ <Button
+ android:id="@+id/start"
+ style="@style/button_full"
+ android:layout_margin="7dip" />
+ </LinearLayout>
+
+</ScrollView> \ No newline at end of file
diff --git a/main/res/layout/cachedetail_activity.xml b/main/res/layout/cachedetail_activity.xml
index 3afe5f6..d197bcd 100644
--- a/main/res/layout/cachedetail_activity.xml
+++ b/main/res/layout/cachedetail_activity.xml
@@ -1,18 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res/cgeo.geocaching"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="?background_color"
android:orientation="vertical" >
- <LinearLayout style="@style/action_bar" >
-
- <include layout="@layout/actionbar_title" />
-
- <include layout="@layout/actionbar_button_compass" />
- </LinearLayout>
-
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="fill_parent"
diff --git a/main/res/layout/cachedetail_inventory_page.xml b/main/res/layout/cachedetail_inventory_page.xml
index 9acbba4..a15cedd 100644
--- a/main/res/layout/cachedetail_inventory_page.xml
+++ b/main/res/layout/cachedetail_inventory_page.xml
@@ -2,6 +2,8 @@
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:cacheColorHint="?background_color" >
+ android:cacheColorHint="?background_color"
+ android:clipToPadding="false"
+ android:scrollbarStyle="outsideOverlay" >
</ListView> \ No newline at end of file
diff --git a/main/res/layout/cachedetail_waypoints_page.xml b/main/res/layout/cachedetail_waypoints_page.xml
index a3e43df..8111210 100644
--- a/main/res/layout/cachedetail_waypoints_page.xml
+++ b/main/res/layout/cachedetail_waypoints_page.xml
@@ -3,12 +3,14 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:cacheColorHint="?background_color"
+ android:clickable="true"
+ android:clipToPadding="false"
android:divider="?background_color"
android:fastScrollEnabled="true"
android:focusable="false"
android:footerDividersEnabled="false"
android:headerDividersEnabled="false"
- android:clickable="true"
- android:listSelector="?background_color" >
+ android:listSelector="?background_color"
+ android:scrollbarStyle="outsideOverlay" >
</ListView> \ No newline at end of file
diff --git a/main/res/layout/cachelist_spinneritem.xml b/main/res/layout/cachelist_spinneritem.xml
new file mode 100644
index 0000000..58e070e
--- /dev/null
+++ b/main/res/layout/cachelist_spinneritem.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:orientation="vertical" android:layout_width="match_parent"
+ android:layout_height="?attr/dropdownListPreferredItemHeight"
+ android:minHeight="?attr/dropdownListPreferredItemHeight"
+ android:layout_gravity="left|center_vertical"
+ style="?attr/spinnerDropDownItemStyle"
+ >
+
+
+ <TextView
+ android:id="@android:id/text1"
+ tools:text="This is the title"
+ android:singleLine="true"
+ android:ellipsize="marquee"
+ android:layout_width="match_parent"
+ style="?attr/titleTextStyle"
+ android:layout_height="wrap_content" />
+
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:ellipsize="marquee"
+ style="?attr/subtitleTextStyle"
+ tools:text="This is the subtitle"
+ android:id="@android:id/text2" />
+
+</LinearLayout> \ No newline at end of file
diff --git a/main/res/layout/cacheslist_activity.xml b/main/res/layout/cacheslist_activity.xml
index c267f60..561baa2 100644
--- a/main/res/layout/cacheslist_activity.xml
+++ b/main/res/layout/cacheslist_activity.xml
@@ -4,15 +4,6 @@
android:layout_height="fill_parent"
android:orientation="vertical" >
- <LinearLayout style="@style/action_bar" >
-
- <include layout="@layout/actionbar_title" />
-
- <include layout="@layout/actionbar_progress" />
-
- <include layout="@layout/actionbar_button_map" />
- </LinearLayout>
-
<include layout="@layout/filter_bar" />
<RelativeLayout
@@ -37,9 +28,11 @@
android:layout_margin="0dip"
android:background="?background_color"
android:cacheColorHint="?background_color"
+ android:clipToPadding="false"
android:dividerHeight="1dip"
+ android:fastScrollEnabled="true"
android:padding="0dip"
- android:visibility="gone"
- android:fastScrollEnabled="true" />
+ android:scrollbarStyle="outsideOverlay"
+ android:visibility="gone" />
</LinearLayout> \ No newline at end of file
diff --git a/main/res/layout/cacheslist_item.xml b/main/res/layout/cacheslist_item.xml
index 744ca30..260b0d0 100644
--- a/main/res/layout/cacheslist_item.xml
+++ b/main/res/layout/cacheslist_item.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:cc="http://schemas.android.com/apk/res/cgeo.geocaching"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/one_cache"
android:layout_width="fill_parent"
@@ -111,7 +111,7 @@
android:minHeight="28px"
android:minWidth="28px"
android:visibility="gone"
- cc:skin="?compass"
+ app:skin="?compass"
tools:ignore="PxUsage" />
<ImageView
diff --git a/main/res/layout/compass_activity.xml b/main/res/layout/compass_activity.xml
index f0ab5ef..ca61cc3 100644
--- a/main/res/layout/compass_activity.xml
+++ b/main/res/layout/compass_activity.xml
@@ -1,124 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="?background_color"
android:orientation="vertical" >
- <include layout="@layout/actionbar" />
-
- <RelativeLayout
+ <LinearLayout
+ android:id="@+id/info1"
android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_height="wrap_content"
android:orientation="vertical" >
-
- <LinearLayout
- android:id="@+id/info1"
- android:layout_width="fill_parent"
+
+ <TextView
+ android:id="@+id/destination"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:textColor="?text_color"
+ android:textSize="14sp" />
+
+ <TextView
+ android:id="@+id/cacheinfo"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:orientation="vertical" >
-
+ android:layout_gravity="center"
+ android:textColor="?text_color"
+ android:textSize="14sp" />
+
+ <RelativeLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content" >
+
<TextView
- android:id="@+id/destination"
+ android:id="@+id/heading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
+ android:layout_alignParentLeft="true"
+ android:layout_gravity="left"
+ android:layout_marginLeft="3dip"
+ android:text="@null"
android:textColor="?text_color"
- android:textSize="14sp" />
-
+ android:textSize="26sp" />
+
<TextView
- android:id="@+id/cacheinfo"
+ android:id="@+id/distance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
+ android:layout_alignParentRight="true"
+ android:layout_gravity="right"
+ android:layout_marginRight="3dip"
+ android:text="@null"
android:textColor="?text_color"
- android:textSize="14sp" />
-
- <RelativeLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content" >
-
- <TextView
- android:id="@+id/heading"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_gravity="left"
- android:layout_marginLeft="3dip"
- android:text="@null"
- android:textColor="?text_color"
- android:textSize="26sp" />
-
- <TextView
- android:id="@+id/distance"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_gravity="right"
- android:layout_marginRight="3dip"
- android:text="@null"
- android:textColor="?text_color"
- android:textSize="26sp" />
- </RelativeLayout>
- </LinearLayout>
-
- <LinearLayout
- android:id="@+id/info2"
+ android:textSize="26sp" />
+ </RelativeLayout>
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/info2"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_marginLeft="6dip"
+ android:layout_marginRight="6dip"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@+id/nav_location"
+ style="@style/location_current"
+ android:text="@string/loc_trying" />
+
+ <RelativeLayout
android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_marginLeft="6dip"
- android:layout_marginRight="6dip"
- android:orientation="vertical" >
-
+ android:layout_height="16dip" >
+
<TextView
- android:id="@+id/nav_location"
- style="@style/location_current"
- android:text="@string/loc_trying" />
-
- <RelativeLayout
- android:layout_width="fill_parent"
- android:layout_height="16dip" >
-
- <TextView
- android:id="@+id/nav_type"
- style="@style/location_current_type"
- android:textColor="?text_color_grey"
- android:textIsSelectable="false" />
-
- <TextView
- android:id="@+id/nav_accuracy"
- style="@style/location_current_accuracy"
- android:textColor="?text_color_grey"
- android:textIsSelectable="false" />
-
- <TextView
- android:id="@+id/nav_satellites"
- style="@style/location_current_satellites"
- android:textColor="?text_color_grey"
- android:textIsSelectable="false" />
- </RelativeLayout>
- </LinearLayout>
-
- <view
- android:id="@+id/rose"
- android:layout_width="fill_parent"
- android:layout_height="295dip"
- android:layout_above="@id/info2"
- android:layout_below="@id/info1"
- android:layout_centerInParent="true"
- android:layout_gravity="center_horizontal"
- android:layout_marginBottom="1dip"
- android:layout_marginLeft="1dip"
- android:layout_marginRight="1dip"
- android:layout_marginTop="6dip"
- class="cgeo.geocaching.ui.CompassView"
- android:gravity="center"
- android:keepScreenOn="true"
- android:minHeight="289dip"
- android:minWidth="289dip"
- android:padding="4dip" />
-
- </RelativeLayout>
+ android:id="@+id/nav_type"
+ style="@style/location_current_type"
+ android:textColor="?text_color_grey"
+ android:textIsSelectable="false" />
+
+ <TextView
+ android:id="@+id/nav_accuracy"
+ style="@style/location_current_accuracy"
+ android:textColor="?text_color_grey"
+ android:textIsSelectable="false" />
+
+ <TextView
+ android:id="@+id/nav_satellites"
+ style="@style/location_current_satellites"
+ android:textColor="?text_color_grey"
+ android:textIsSelectable="false" />
+ </RelativeLayout>
+ </LinearLayout>
+
+ <view
+ android:id="@+id/rose"
+ android:layout_width="fill_parent"
+ android:layout_height="295dip"
+ android:layout_above="@id/info2"
+ android:layout_below="@id/info1"
+ android:layout_centerInParent="true"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginBottom="1dip"
+ android:layout_marginLeft="1dip"
+ android:layout_marginRight="1dip"
+ android:layout_marginTop="6dip"
+ class="cgeo.geocaching.ui.CompassView"
+ android:gravity="center"
+ android:keepScreenOn="true"
+ android:minHeight="289dip"
+ android:minWidth="289dip"
+ android:padding="4dip" />
-</LinearLayout>
+</RelativeLayout> \ No newline at end of file
diff --git a/main/res/layout/coordinatesinput_dialog.xml b/main/res/layout/coordinatesinput_dialog.xml
index 4603360..9b5cb8d 100644
--- a/main/res/layout/coordinatesinput_dialog.xml
+++ b/main/res/layout/coordinatesinput_dialog.xml
@@ -1,175 +1,161 @@
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
- android:id="@+id/linearLayout1"
+ android:id="@+id/scroller"
android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
+ android:layout_height="fill_parent"
+ android:fillViewport="true" >
- <LinearLayout style="@style/action_bar" >
+ <LinearLayout
+ android:id="@+id/scroller_child"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
- <TextView
- style="@style/action_bar_title"
- android:text="@string/cache_coordinates" />
- </LinearLayout>
+ <Spinner
+ android:id="@+id/spinnerCoordinateFormats"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content" />
- <ScrollView
- android:id="@+id/scroller"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:fillViewport="true" >
+ <TableLayout
+ android:id="@+id/coordTable"
+ android:layout_width="fill_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:stretchColumns="0,1,3,5,7" >
+
+ <TableRow android:id="@+id/tableRow1" >
+
+ <Button
+ android:id="@+id/ButtonLat"
+ style="@style/button_full" />
+
+ <EditText
+ android:id="@+id/EditTextLatDeg"
+ style="@style/edittext_full"
+ android:gravity="right"
+ android:inputType="number"
+ android:selectAllOnFocus="true" />
+
+ <TextView
+ android:id="@+id/LatSeparator1"
+ android:text="°"
+ tools:ignore="HardcodedText" />
+
+ <EditText
+ android:id="@+id/EditTextLatMin"
+ style="@style/edittext_full"
+ android:gravity="right"
+ android:inputType="number"
+ android:selectAllOnFocus="true" />
+
+ <TextView
+ android:id="@+id/LatSeparator2"
+ android:text=","
+ tools:ignore="HardcodedText" />
+
+ <EditText
+ android:id="@+id/EditTextLatSec"
+ style="@style/edittext_full"
+ android:gravity="right"
+ android:inputType="number"
+ android:selectAllOnFocus="true" />
+
+ <TextView
+ android:id="@+id/LatSeparator3"
+ android:text=","
+ tools:ignore="HardcodedText" />
+
+ <EditText
+ android:id="@+id/EditTextLatSecFrac"
+ style="@style/edittext_full"
+ android:inputType="number"
+ android:selectAllOnFocus="true" />
+ </TableRow>
+
+ <TableRow android:id="@+id/tableRow2" >
+
+ <Button
+ android:id="@+id/ButtonLon"
+ style="@style/button_full" />
+
+ <EditText
+ android:id="@+id/EditTextLonDeg"
+ style="@style/edittext_full"
+ android:gravity="right"
+ android:inputType="number"
+ android:selectAllOnFocus="true" />
+
+ <TextView
+ android:id="@+id/LonSeparator1"
+ android:text="°"
+ tools:ignore="HardcodedText" />
+
+ <EditText
+ android:id="@+id/EditTextLonMin"
+ style="@style/edittext_full"
+ android:gravity="right"
+ android:inputType="number"
+ android:selectAllOnFocus="true" />
+
+ <TextView
+ android:id="@+id/LonSeparator2"
+ android:text=","
+ tools:ignore="HardcodedText" />
+
+ <EditText
+ android:id="@+id/EditTextLonSec"
+ style="@style/edittext_full"
+ android:gravity="right"
+ android:inputType="number"
+ android:selectAllOnFocus="true" />
+
+ <TextView
+ android:id="@+id/LonSeparator3"
+ android:text=","
+ tools:ignore="HardcodedText" />
+
+ <EditText
+ android:id="@+id/EditTextLonSecFrac"
+ style="@style/edittext_full"
+ android:inputType="number"
+ android:selectAllOnFocus="true" />
+ </TableRow>
+ </TableLayout>
+
+ <EditText
+ android:id="@+id/latitude"
+ style="@style/edittext_full"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/latitude" />
+
+ <EditText
+ android:id="@+id/longitude"
+ style="@style/edittext_full"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:hint="@string/longitude" />
- <LinearLayout
- android:id="@+id/scroller_child"
+ <Button
+ android:id="@+id/current"
+ style="@style/button_full"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:orientation="vertical" >
-
- <Spinner
- android:id="@+id/spinnerCoordinateFormats"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content" />
-
- <TableLayout
- android:id="@+id/coordTable"
- android:layout_width="fill_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- android:stretchColumns="0,1,3,5,7" >
-
- <TableRow android:id="@+id/tableRow1" >
-
- <Button
- android:id="@+id/ButtonLat"
- style="@style/button_full" />
-
- <EditText
- android:id="@+id/EditTextLatDeg"
- style="@style/edittext_full"
- android:gravity="right"
- android:inputType="number"
- android:selectAllOnFocus="true" />
-
- <TextView
- android:id="@+id/LatSeparator1"
- android:text="°"
- tools:ignore="HardcodedText" />
-
- <EditText
- android:id="@+id/EditTextLatMin"
- style="@style/edittext_full"
- android:gravity="right"
- android:inputType="number"
- android:selectAllOnFocus="true" />
-
- <TextView
- android:id="@+id/LatSeparator2"
- android:text=","
- tools:ignore="HardcodedText" />
-
- <EditText
- android:id="@+id/EditTextLatSec"
- style="@style/edittext_full"
- android:gravity="right"
- android:inputType="number"
- android:selectAllOnFocus="true" />
-
- <TextView
- android:id="@+id/LatSeparator3"
- android:text=","
- tools:ignore="HardcodedText" />
-
- <EditText
- android:id="@+id/EditTextLatSecFrac"
- style="@style/edittext_full"
- android:inputType="number"
- android:selectAllOnFocus="true" />
- </TableRow>
-
- <TableRow android:id="@+id/tableRow2" >
-
- <Button
- android:id="@+id/ButtonLon"
- style="@style/button_full" />
-
- <EditText
- android:id="@+id/EditTextLonDeg"
- style="@style/edittext_full"
- android:gravity="right"
- android:inputType="number"
- android:selectAllOnFocus="true" />
-
- <TextView
- android:id="@+id/LonSeparator1"
- android:text="°"
- tools:ignore="HardcodedText" />
-
- <EditText
- android:id="@+id/EditTextLonMin"
- style="@style/edittext_full"
- android:gravity="right"
- android:inputType="number"
- android:selectAllOnFocus="true" />
-
- <TextView
- android:id="@+id/LonSeparator2"
- android:text=","
- tools:ignore="HardcodedText" />
-
- <EditText
- android:id="@+id/EditTextLonSec"
- style="@style/edittext_full"
- android:gravity="right"
- android:inputType="number"
- android:selectAllOnFocus="true" />
-
- <TextView
- android:id="@+id/LonSeparator3"
- android:text=","
- tools:ignore="HardcodedText" />
-
- <EditText
- android:id="@+id/EditTextLonSecFrac"
- style="@style/edittext_full"
- android:inputType="number"
- android:selectAllOnFocus="true" />
- </TableRow>
- </TableLayout>
-
- <EditText
- android:id="@+id/latitude"
- style="@style/edittext_full"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:hint="@string/latitude" />
-
- <EditText
- android:id="@+id/longitude"
- style="@style/edittext_full"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:hint="@string/longitude" />
-
- <Button
- android:id="@+id/current"
- style="@style/button_full"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="@string/waypoint_my_coordinates" />
-
- <Button
- android:id="@+id/cache"
- style="@style/button_full"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="@string/waypoint_cache_coordinates" />
-
- <Button
- android:id="@+id/done"
- style="@style/button_full"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="@string/waypoint_done" />
- </LinearLayout>
- </ScrollView>
-
-</LinearLayout> \ No newline at end of file
+ android:text="@string/waypoint_my_coordinates" />
+
+ <Button
+ android:id="@+id/cache"
+ style="@style/button_full"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/waypoint_cache_coordinates" />
+
+ <Button
+ android:id="@+id/done"
+ style="@style/button_full"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/waypoint_done" />
+ </LinearLayout>
+
+</ScrollView> \ No newline at end of file
diff --git a/main/res/layout/editwaypoint_activity.xml b/main/res/layout/editwaypoint_activity.xml
index cd0b46c..c21e25d 100644
--- a/main/res/layout/editwaypoint_activity.xml
+++ b/main/res/layout/editwaypoint_activity.xml
@@ -1,115 +1,107 @@
<?xml version="1.0" encoding="UTF-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="?background_color"
- android:orientation="vertical" >
+ android:orientation="vertical"
+ android:padding="4dip" >
- <include layout="@layout/actionbar" />
-
- <ScrollView
+ <LinearLayout
android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical"
- android:padding="4dip" >
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
+
+ <Button
+ android:id="@+id/buttonLatitude"
+ style="@style/button_full"
+ android:freezesText="true"
+ android:hint="@string/latitude" />
+
+ <Button
+ android:id="@+id/buttonLongitude"
+ style="@style/button_full"
+ android:freezesText="true"
+ android:hint="@string/longitude" />
+
+ <EditText
+ android:id="@+id/bearing"
+ style="@style/edittext_full"
+ android:hint="@string/waypoint_bearing"
+ android:inputType="numberDecimal" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:orientation="vertical" >
-
- <Button
- android:id="@+id/buttonLatitude"
- style="@style/button_full"
- android:hint="@string/latitude"
- android:freezesText="true" />
-
- <Button
- android:id="@+id/buttonLongitude"
- style="@style/button_full"
- android:hint="@string/longitude"
- android:freezesText="true" />
+ android:orientation="horizontal" >
<EditText
- android:id="@+id/bearing"
+ android:id="@+id/distance"
style="@style/edittext_full"
- android:hint="@string/waypoint_bearing"
+ android:layout_width="0dip"
+ android:layout_weight="1"
+ android:hint="@string/waypoint_distance"
android:inputType="numberDecimal" />
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal" >
-
- <EditText
- android:id="@+id/distance"
- style="@style/edittext_full"
- android:layout_width="0dip"
- android:layout_weight="1"
- android:hint="@string/waypoint_distance"
- android:inputType="numberDecimal" />
-
- <Spinner
- android:id="@+id/distanceUnit"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:entries="@array/distance_units" />
- </LinearLayout>
-
- <AutoCompleteTextView
- android:id="@+id/name"
- style="@style/edittext_full"
- android:hint="@string/waypoint_name" />
-
<Spinner
- android:id="@+id/type"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:visibility="gone" />
-
- <EditText
- android:id="@+id/note"
- style="@style/edittext_full"
- android:layout_height="wrap_content"
- android:hint="@string/waypoint_note"
- android:inputType="textMultiLine|textCapSentences"
- android:minLines="5"
- android:singleLine="false" />
-
- <CheckBox
- android:id="@+id/wpt_visited_checkbox"
- style="@style/checkbox_full"
- android:text="@string/waypoint_visited" />
-
- <RadioGroup
- android:id="@+id/modify_cache_coordinates_group"
+ android:id="@+id/distanceUnit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:visibility="gone" >
-
- <RadioButton
- android:id="@+id/modify_cache_coordinates_nothing"
- style="@style/radiobutton_wrap"
- android:checked="true"
- android:text="@string/waypoint_do_not_touch_cache_coordinates" />
-
- <RadioButton
- android:id="@+id/modify_cache_coordinates_local"
- style="@style/radiobutton_wrap"
- android:text="@string/waypoint_set_as_cache_coords" />
-
- <RadioButton
- android:id="@+id/modify_cache_coordinates_local_and_remote"
- style="@style/radiobutton_wrap"
- android:text="@string/waypoint_save_and_modify_on_website"
- android:visibility="gone" />
- </RadioGroup>
-
- <Button
- android:id="@+id/add_waypoint"
- style="@style/button_full"
- android:text="@string/waypoint_save" />
+ android:entries="@array/distance_units" />
</LinearLayout>
- </ScrollView>
-</LinearLayout> \ No newline at end of file
+ <AutoCompleteTextView
+ android:id="@+id/name"
+ style="@style/edittext_full"
+ android:hint="@string/waypoint_name" />
+
+ <Spinner
+ android:id="@+id/type"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:visibility="gone" />
+
+ <EditText
+ android:id="@+id/note"
+ style="@style/edittext_full"
+ android:layout_height="wrap_content"
+ android:hint="@string/waypoint_note"
+ android:inputType="textMultiLine|textCapSentences"
+ android:minLines="5"
+ android:singleLine="false" />
+
+ <CheckBox
+ android:id="@+id/wpt_visited_checkbox"
+ style="@style/checkbox_full"
+ android:text="@string/waypoint_visited" />
+
+ <RadioGroup
+ android:id="@+id/modify_cache_coordinates_group"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:visibility="gone" >
+
+ <RadioButton
+ android:id="@+id/modify_cache_coordinates_nothing"
+ style="@style/radiobutton_wrap"
+ android:checked="true"
+ android:text="@string/waypoint_do_not_touch_cache_coordinates" />
+
+ <RadioButton
+ android:id="@+id/modify_cache_coordinates_local"
+ style="@style/radiobutton_wrap"
+ android:text="@string/waypoint_set_as_cache_coords" />
+
+ <RadioButton
+ android:id="@+id/modify_cache_coordinates_local_and_remote"
+ style="@style/radiobutton_wrap"
+ android:text="@string/waypoint_save_and_modify_on_website"
+ android:visibility="gone" />
+ </RadioGroup>
+
+ <Button
+ android:id="@+id/add_waypoint"
+ style="@style/button_full"
+ android:text="@string/waypoint_save" />
+ </LinearLayout>
+
+</ScrollView> \ No newline at end of file
diff --git a/main/res/layout/gpx.xml b/main/res/layout/gpx.xml
index 948c265..4367f82 100644
--- a/main/res/layout/gpx.xml
+++ b/main/res/layout/gpx.xml
@@ -4,12 +4,10 @@
android:layout_height="fill_parent"
android:orientation="vertical" >
- <include layout="@layout/actionbar" />
-
<Button
android:id="@+id/select_dir"
style="@style/button_full"
- android:visibility="gone"/>
+ android:visibility="gone" />
<ListView
android:id="@android:id/list"
@@ -18,7 +16,9 @@
android:layout_margin="0dip"
android:background="?background_color"
android:cacheColorHint="?background_color"
+ android:clipToPadding="false"
android:dividerHeight="1dip"
- android:padding="0dip" />
+ android:padding="0dip"
+ android:scrollbarStyle="outsideOverlay" />
</LinearLayout> \ No newline at end of file
diff --git a/main/res/layout/images_activity.xml b/main/res/layout/images_activity.xml
index ccd8499..861fa7e 100644
--- a/main/res/layout/images_activity.xml
+++ b/main/res/layout/images_activity.xml
@@ -5,8 +5,6 @@
android:background="?background_color"
android:orientation="vertical" >
- <include layout="@layout/actionbar" />
-
<include layout="@layout/cachedetail_images_page" />
</LinearLayout> \ No newline at end of file
diff --git a/main/res/layout/imageselect_activity.xml b/main/res/layout/imageselect_activity.xml
index fd8eaea..690baa2 100644
--- a/main/res/layout/imageselect_activity.xml
+++ b/main/res/layout/imageselect_activity.xml
@@ -1,115 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="?background_color"
- android:orientation="vertical" >
+ android:orientation="vertical"
+ android:padding="4dip" >
- <LinearLayout style="@style/action_bar" >
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
- <include layout="@layout/actionbar_title" />
+ <RelativeLayout style="@style/separator_horizontal_layout" >
- <include layout="@layout/actionbar_progress" />
- </LinearLayout>
+ <View style="@style/separator_horizontal" />
- <ScrollView
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical"
- android:padding="4dip" >
+ <TextView
+ style="@style/separator_horizontal_headline"
+ android:text="@string/log_image" />
+ </RelativeLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:orientation="vertical" >
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/log_image" />
- </RelativeLayout>
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="10dip"
- android:orientation="horizontal" >
-
- <Button
- android:id="@+id/stored"
- style="@style/button_full"
- android:layout_width="0dip"
- android:layout_weight="1"
- android:text="@string/log_image_stored" />
-
- <Button
- android:id="@+id/camera"
- style="@style/button_full"
- android:layout_width="0dip"
- android:layout_weight="1"
- android:text="@string/log_image_camera" />
- </LinearLayout>
-
- <ImageView
- android:id="@+id/image_preview"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginBottom="5dip"
- android:layout_marginTop="5dip"
- android:background="#000000"
- android:padding="1dp"
- android:visibility="gone" />
-
- <EditText
- android:id="@+id/caption"
- style="@style/edittext_full"
- android:layout_height="wrap_content"
- android:hint="@string/log_image_caption"
- android:inputType="textCapSentences"
- android:maxLength="50"
- android:minLines="1"
- android:singleLine="false" />
-
- <EditText
- android:id="@+id/description"
- style="@style/edittext_full"
- android:layout_height="wrap_content"
- android:hint="@string/log_image_description"
- android:inputType="textMultiLine|textCapSentences"
- android:maxLength="250"
- android:minLines="5"
- android:singleLine="false" />
-
- <Spinner
- android:id="@+id/logImageScale"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:entries="@array/log_image_scales"
- android:prompt="@string/log_image_scale" />
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal" >
+ android:layout_marginTop="10dip"
+ android:orientation="horizontal" >
+
+ <Button
+ android:id="@+id/stored"
+ style="@style/button_full"
+ android:layout_width="0dip"
+ android:layout_weight="1"
+ android:text="@string/log_image_stored" />
+
+ <Button
+ android:id="@+id/camera"
+ style="@style/button_full"
+ android:layout_width="0dip"
+ android:layout_weight="1"
+ android:text="@string/log_image_camera" />
+ </LinearLayout>
- <Button
- android:id="@+id/save"
- style="@style/button_full"
- android:layout_width="0dip"
- android:layout_weight="1"
- android:text="@android:string/yes" />
+ <ImageView
+ android:id="@+id/image_preview"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="5dip"
+ android:layout_marginTop="5dip"
+ android:background="#000000"
+ android:padding="1dp"
+ android:visibility="gone" />
+
+ <EditText
+ android:id="@+id/caption"
+ style="@style/edittext_full"
+ android:layout_height="wrap_content"
+ android:hint="@string/log_image_caption"
+ android:inputType="textCapSentences"
+ android:maxLength="50"
+ android:minLines="1"
+ android:singleLine="false" />
+
+ <EditText
+ android:id="@+id/description"
+ style="@style/edittext_full"
+ android:layout_height="wrap_content"
+ android:hint="@string/log_image_description"
+ android:inputType="textMultiLine|textCapSentences"
+ android:maxLength="250"
+ android:minLines="5"
+ android:singleLine="false" />
+
+ <Spinner
+ android:id="@+id/logImageScale"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:entries="@array/log_image_scales"
+ android:prompt="@string/log_image_scale" />
- <Button
- android:id="@+id/cancel"
- style="@style/button_full"
- android:layout_width="0dip"
- android:layout_weight="1"
- android:text="@android:string/no" />
- </LinearLayout>
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal" >
+
+ <Button
+ android:id="@+id/save"
+ style="@style/button_full"
+ android:layout_width="0dip"
+ android:layout_weight="1"
+ android:text="@android:string/yes" />
+
+ <Button
+ android:id="@+id/cancel"
+ style="@style/button_full"
+ android:layout_width="0dip"
+ android:layout_weight="1"
+ android:text="@android:string/no" />
</LinearLayout>
- </ScrollView>
+ </LinearLayout>
-</LinearLayout> \ No newline at end of file
+</ScrollView> \ No newline at end of file
diff --git a/main/res/layout/internal_browser.xml b/main/res/layout/internal_browser.xml
new file mode 100644
index 0000000..1e09ee0
--- /dev/null
+++ b/main/res/layout/internal_browser.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <WebView
+ android:id="@+id/webview"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+</LinearLayout> \ No newline at end of file
diff --git a/main/res/layout/logcache_activity.xml b/main/res/layout/logcache_activity.xml
index 4bbb441..b01ea74 100644
--- a/main/res/layout/logcache_activity.xml
+++ b/main/res/layout/logcache_activity.xml
@@ -1,202 +1,175 @@
<?xml version="1.0" encoding="UTF-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="?background_color"
- android:orientation="vertical" >
+ android:orientation="vertical"
+ android:padding="4dip" xmlns:tools="http://schemas.android.com/tools">
- <LinearLayout style="@style/action_bar" >
-
- <include layout="@layout/actionbar_title" />
-
- <include layout="@layout/actionbar_progress" />
- </LinearLayout>
-
- <ScrollView
+ <LinearLayout
android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical"
- android:padding="4dip" >
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
+ android:layout_marginTop="10dip"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="10dip"
- android:orientation="vertical" >
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal" >
-
- <Button
- android:id="@+id/type"
- style="@style/button_full"
- android:layout_width="0dip"
- android:layout_weight="1" />
-
- <Button
- android:id="@+id/date"
- style="@style/button_full"
- android:layout_width="0dip"
- android:layout_weight="1" />
- </LinearLayout>
-
- <EditText
- android:id="@+id/log"
- style="@style/edittext_full"
- android:layout_height="wrap_content"
- android:hint="@string/log_new_log_text"
- android:inputType="textMultiLine|textCapSentences"
- android:maxLength="4000"
- android:minLines="5"
- android:singleLine="false" />
-
- <LinearLayout
- android:id="@+id/log_password_box"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="5dip"
- android:orientation="vertical"
- android:visibility="gone" >
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:gravity="left"
- android:padding="10dip"
- android:text="@string/log_password_title"
- android:textColor="?text_color"
- android:textSize="22sp" />
- <EditText
- android:id="@+id/log_password"
- style="@style/edittext_full"
- android:hint="@string/log_hint_log_password"
- android:inputType="text"
- android:singleLine="true" />
- </LinearLayout>
-
- <LinearLayout
- android:id="@+id/tweet_box"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:orientation="horizontal"
- android:visibility="gone" >
-
- <CheckBox
- android:id="@+id/tweet"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:gravity="center"
- android:padding="2sp" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:gravity="left"
- android:paddingRight="3dip"
- android:text="@string/visit_tweet"
- android:textColor="?text_color"
- android:textSize="14sp" />
- </LinearLayout>
+ android:orientation="horizontal" >
<Button
- android:id="@+id/image_btn"
+ android:id="@+id/type"
style="@style/button_full"
- android:text="@string/log_image_attach" />
+ android:layout_width="0dip"
+ android:layout_weight="1" />
<Button
- android:id="@+id/post"
+ android:id="@+id/date"
style="@style/button_full"
- android:text="@string/log_post" />
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
+ android:layout_width="0dip"
+ android:layout_weight="1" />
+ </LinearLayout>
- <View style="@style/separator_horizontal" />
+ <EditText
+ android:id="@+id/log"
+ style="@style/edittext_full"
+ android:layout_height="wrap_content"
+ android:hint="@string/log_new_log_text"
+ android:inputType="textMultiLine|textCapSentences"
+ android:maxLength="4000"
+ android:minLines="5"
+ android:singleLine="false" />
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/cache_log_offline" />
- </RelativeLayout>
+ <LinearLayout
+ android:id="@+id/log_password_box"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="5dip"
+ android:orientation="vertical"
+ android:visibility="gone" >
- <LinearLayout
+ <TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:orientation="horizontal" >
-
- <Button
- android:id="@+id/save"
- style="@style/button_full"
- android:layout_width="0dip"
- android:layout_weight="1"
- android:text="@string/log_save" />
-
- <Button
- android:id="@+id/clear"
- style="@style/button_full"
- android:layout_width="0dip"
- android:layout_weight="1"
- android:text="@string/log_clear" />
- </LinearLayout>
+ android:gravity="left"
+ android:padding="10dip"
+ android:text="@string/log_password_title"
+ android:textColor="?text_color"
+ android:textSize="22sp" />
+
+ <EditText
+ android:id="@+id/log_password"
+ style="@style/edittext_full"
+ android:hint="@string/log_hint_log_password"
+ android:inputType="text"
+ android:singleLine="true"
+ tools:ignore="TextFields" />
+
</LinearLayout>
+ <RatingBar
+ android:id="@+id/gcvoteRating"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:max="5"
+ android:numStars="5"
+ android:stepSize="0.5"
+ android:visibility="gone" />
+
+ <TextView
+ android:id="@+id/gcvoteLabel"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_horizontal"
+ android:padding="10dip"
+ android:text="@string/log_no_rating"
+ android:textColor="?text_color"
+ android:textSize="12sp"
+ android:visibility="gone" />
+
<LinearLayout
- android:id="@+id/inventory_box"
+ android:id="@+id/tweet_box"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="10dip"
- android:layout_marginTop="10dip"
- android:orientation="vertical"
+ android:layout_marginBottom="5dip"
+ android:layout_marginLeft="10dip"
+ android:layout_marginRight="10dip"
+ android:orientation="horizontal"
android:visibility="gone" >
- <RelativeLayout style="@style/separator_horizontal_layout" >
+ <CheckBox
+ android:id="@+id/tweet"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="left"
+ android:gravity="center"
+ android:padding="2sp" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:gravity="left"
+ android:paddingRight="3dip"
+ android:text="@string/visit_tweet"
+ android:textColor="?text_color"
+ android:textSize="14sp" />
+ </LinearLayout>
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/inventory_box"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="10dip"
+ android:layout_marginTop="10dip"
+ android:orientation="vertical"
+ android:visibility="gone" >
- <View style="@style/separator_horizontal" />
+ <RelativeLayout style="@style/separator_horizontal_layout" >
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/cache_inventory" />
- </RelativeLayout>
+ <View style="@style/separator_horizontal" />
- <LinearLayout
- android:id="@+id/inventory"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
- </LinearLayout>
+ <TextView
+ style="@style/separator_horizontal_headline"
+ android:text="@string/cache_inventory" />
+ </RelativeLayout>
- <LinearLayout
- android:id="@+id/inventory_changeall"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
+ <LinearLayout
+ android:id="@+id/inventory"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/inventory_changeall"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:gravity="right"
+ android:orientation="vertical"
+ android:visibility="gone" >
+
+ <Button
+ android:id="@+id/changebutton"
+ style="@style/button_full"
+ android:layout_width="wrap_content"
+ android:layout_height="0dp"
+ android:layout_marginBottom="5dip"
+ android:layout_marginLeft="10dip"
+ android:layout_marginRight="10dip"
+ android:layout_weight="1"
android:gravity="right"
- android:orientation="vertical"
- android:visibility="gone" >
-
- <Button
- android:id="@+id/changebutton"
- style="@style/button_full"
- android:layout_width="wrap_content"
- android:layout_height="0dp"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:layout_weight="1"
- android:gravity="right"
- android:text="@string/log_tb_changeall"
- android:textSize="14sp" />
- </LinearLayout>
+ android:text="@string/log_tb_changeall"
+ android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
- </ScrollView>
+ </LinearLayout>
-</LinearLayout> \ No newline at end of file
+</ScrollView> \ No newline at end of file
diff --git a/main/res/layout/logs_page.xml b/main/res/layout/logs_page.xml
index 9aafd83..11f7855 100644
--- a/main/res/layout/logs_page.xml
+++ b/main/res/layout/logs_page.xml
@@ -1,13 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:cacheColorHint="?background_color"
+ android:clipToPadding="false"
android:divider="?background_color"
android:fastScrollEnabled="true"
android:focusable="false"
android:footerDividersEnabled="false"
android:headerDividersEnabled="false"
- android:listSelector="?background_color" >
+ android:listSelector="?background_color"
+ android:scrollbarStyle="outsideOverlay"
+ tools:listitem="@layout/logs_item" >
</ListView> \ No newline at end of file
diff --git a/main/res/layout/logtrackable_activity.xml b/main/res/layout/logtrackable_activity.xml
index 7791409..2a901ea 100644
--- a/main/res/layout/logtrackable_activity.xml
+++ b/main/res/layout/logtrackable_activity.xml
@@ -1,95 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="?background_color"
- android:orientation="vertical" >
+ android:orientation="vertical"
+ android:padding="4dip" >
- <LinearLayout style="@style/action_bar" >
-
- <include layout="@layout/actionbar_title" />
-
- <include layout="@layout/actionbar_progress" />
- </LinearLayout>
-
- <ScrollView
+ <LinearLayout
android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical"
- android:padding="4dip" >
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:orientation="vertical" >
+ android:orientation="horizontal" >
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal" >
+ <Button
+ android:id="@+id/type"
+ style="@style/button_full"
+ android:layout_width="0dip"
+ android:layout_weight="1" />
- <Button
- android:id="@+id/type"
- style="@style/button_full"
- android:layout_width="0dip"
- android:layout_weight="1" />
+ <Button
+ android:id="@+id/date"
+ style="@style/button_full"
+ android:layout_width="0dip"
+ android:layout_weight="1" />
+ </LinearLayout>
- <Button
- android:id="@+id/date"
- style="@style/button_full"
- android:layout_width="0dip"
- android:layout_weight="1" />
- </LinearLayout>
+ <EditText
+ android:id="@+id/tracking"
+ style="@style/edittext_full"
+ android:hint="@string/trackable_code"
+ android:inputType="textCapCharacters" />
- <EditText
- android:id="@+id/tracking"
- style="@style/edittext_full"
- android:hint="@string/trackable_code"
- android:inputType="textCapCharacters" />
+ <EditText
+ android:id="@+id/log"
+ style="@style/edittext_full"
+ android:hint="@string/log_new_log_text"
+ android:inputType="textMultiLine|textCapSentences"
+ android:lines="5"
+ android:maxLength="4000"
+ android:singleLine="false" />
- <EditText
- android:id="@+id/log"
- style="@style/edittext_full"
- android:hint="@string/log_new_log_text"
- android:inputType="textMultiLine|textCapSentences"
- android:lines="5"
- android:maxLength="4000"
- android:singleLine="false" />
+ <LinearLayout
+ android:id="@+id/tweet_box"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="5dip"
+ android:layout_marginLeft="10dip"
+ android:layout_marginRight="10dip"
+ android:orientation="horizontal"
+ android:visibility="gone" >
- <LinearLayout
- android:id="@+id/tweet_box"
- android:layout_width="fill_parent"
+ <CheckBox
+ android:id="@+id/tweet"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginBottom="5dip"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:orientation="horizontal"
- android:visibility="gone" >
-
- <CheckBox
- android:id="@+id/tweet"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="left"
- android:gravity="center"
- android:padding="2sp" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:gravity="left"
- android:paddingRight="3dip"
- android:text="@string/visit_tweet"
- android:textColor="?text_color"
- android:textSize="14sp" />
- </LinearLayout>
+ android:layout_gravity="left"
+ android:gravity="center"
+ android:padding="2sp" />
- <Button
- android:id="@+id/post"
- style="@style/button_full"
- android:text="@string/log_post" />
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:gravity="left"
+ android:paddingRight="3dip"
+ android:text="@string/visit_tweet"
+ android:textColor="?text_color"
+ android:textSize="14sp" />
</LinearLayout>
- </ScrollView>
+ </LinearLayout>
-</LinearLayout> \ No newline at end of file
+</ScrollView> \ No newline at end of file
diff --git a/main/res/layout/main_activity.xml b/main/res/layout/main_activity.xml
index 9e124a1..d2bd025 100644
--- a/main/res/layout/main_activity.xml
+++ b/main/res/layout/main_activity.xml
@@ -1,21 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/mainscreen"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center" >
- <LinearLayout style="@style/action_bar" >
-
- <ImageView
- style="@style/action_bar_icon_cgeo"
- android:onClick="showAbout" />
-
- <TextView style="@style/action_bar_title" />
-
- <include layout="@layout/actionbar_button_search" />
- </LinearLayout>
-
<fragment
android:id="@+id/status"
android:name="cgeo.geocaching.StatusFragment"
@@ -24,7 +14,8 @@
android:layout_alignParentTop="true"
android:layout_marginLeft="16dip"
android:layout_marginRight="16dip"
- android:layout_marginTop="60dip" />
+ android:layout_marginTop="60dip"
+ tools:layout="@layout/status" />
<!-- ** -->
<LinearLayout
diff --git a/main/res/layout/map_google.xml b/main/res/layout/map_google.xml
index 5e4d82d..85f550a 100644
--- a/main/res/layout/map_google.xml
+++ b/main/res/layout/map_google.xml
@@ -4,14 +4,9 @@
android:layout_height="fill_parent"
android:orientation="vertical" >
- <LinearLayout style="@style/action_bar" >
- <include layout="@layout/actionbar_title" />
- <include layout="@layout/actionbar_progress" />
-
- <include layout="@layout/actionbar_button_myposition" />
- </LinearLayout>
+ <include layout="@layout/actionbar_maps" />
<include layout="@layout/filter_bar" />
@@ -40,7 +35,7 @@
android:id="@+id/map"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- class="cgeo.geocaching.maps.google.GoogleMapView"
+ class="cgeo.geocaching.maps.google.v1.GoogleMapView"
android:apiKey="@string/maps_api_key"
android:clickable="true"
android:enabled="true"
diff --git a/main/res/layout/map_mapsforge.xml b/main/res/layout/map_mapsforge.xml
index f05ddb0..c44a3ee 100644
--- a/main/res/layout/map_mapsforge.xml
+++ b/main/res/layout/map_mapsforge.xml
@@ -4,14 +4,7 @@
android:layout_height="fill_parent"
android:orientation="vertical" >
- <LinearLayout style="@style/action_bar" >
-
- <include layout="@layout/actionbar_title" />
-
- <include layout="@layout/actionbar_progress" />
-
- <include layout="@layout/actionbar_button_myposition" />
- </LinearLayout>
+ <include layout="@layout/actionbar_maps" />
<include layout="@layout/filter_bar" />
diff --git a/main/res/layout/map_mapsforge_old.xml b/main/res/layout/map_mapsforge_old.xml
index ff2b9af..daa5f74 100644
--- a/main/res/layout/map_mapsforge_old.xml
+++ b/main/res/layout/map_mapsforge_old.xml
@@ -4,14 +4,7 @@
android:layout_height="fill_parent"
android:orientation="vertical" >
- <LinearLayout style="@style/action_bar" >
-
- <include layout="@layout/actionbar_title" />
-
- <include layout="@layout/actionbar_progress" />
-
- <include layout="@layout/actionbar_button_myposition" />
- </LinearLayout>
+ <include layout="@layout/actionbar_maps" />
<include layout="@layout/filter_bar" />
diff --git a/main/res/layout/navigateanypoint_activity.xml b/main/res/layout/navigateanypoint_activity.xml
index baa568c..3305d56 100644
--- a/main/res/layout/navigateanypoint_activity.xml
+++ b/main/res/layout/navigateanypoint_activity.xml
@@ -5,15 +5,15 @@
android:background="?background_color"
android:orientation="vertical" >
- <include layout="@layout/actionbar" />
-
<ListView
android:id="@+id/historyList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:cacheColorHint="?background_color"
+ android:clipToPadding="false"
android:footerDividersEnabled="false"
- android:headerDividersEnabled="false" >
+ android:headerDividersEnabled="false"
+ android:scrollbarStyle="outsideOverlay" >
</ListView>
</LinearLayout> \ No newline at end of file
diff --git a/main/res/layout/popup.xml b/main/res/layout/popup.xml
index 584eb58..de94d18 100644
--- a/main/res/layout/popup.xml
+++ b/main/res/layout/popup.xml
@@ -1,21 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="?background_color_transparent"
- android:orientation="vertical" >
-
- <LinearLayout style="@style/action_bar" >
-
- <include layout="@layout/actionbar_title_no_home" />
-
- <include layout="@layout/actionbar_button_compass" />
- </LinearLayout>
+ android:orientation="vertical"
+ tools:context=".CachePopup">
+ <include layout="@layout/actionbar_popup" />
<ScrollView
android:id="@+id/details_list_box"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="4dip" >
@@ -50,6 +46,7 @@
<TextView
android:id="@+id/offline_text"
+ tools:text="@string/cache_offline_not_ready"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
diff --git a/main/res/layout/recaptcha_dialog.xml b/main/res/layout/recaptcha_dialog.xml
index 3cae1fa..66ad4ef 100644
--- a/main/res/layout/recaptcha_dialog.xml
+++ b/main/res/layout/recaptcha_dialog.xml
@@ -43,7 +43,7 @@
android:layout_margin="7dip"
android:paddingLeft="3dip"
android:text="@string/caches_recaptcha_explanation"
- android:textColor="@color/text_grey_dark"
+ android:textColor="?text_color_hint"
android:textSize="12sp" />
</LinearLayout> \ No newline at end of file
diff --git a/main/res/layout/search_activity.xml b/main/res/layout/search_activity.xml
index 28256f1..894c461 100644
--- a/main/res/layout/search_activity.xml
+++ b/main/res/layout/search_activity.xml
@@ -1,178 +1,170 @@
<?xml version="1.0" encoding="UTF-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="?background_color"
- android:orientation="vertical" >
+ android:orientation="vertical"
+ android:padding="4dip" >
- <include layout="@layout/actionbar" />
-
- <ScrollView
+ <LinearLayout
android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical"
- android:padding="4dip" >
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/search_coordinates" />
- </RelativeLayout>
-
- <Button
- android:id="@+id/buttonLatitude"
- style="@style/button_full"
- android:hint="@string/latitude" />
-
- <Button
- android:id="@+id/buttonLongitude"
- style="@style/button_full"
- android:hint="@string/longitude" />
-
- <Button
- android:id="@+id/search_coordinates"
- style="@style/button_full"
- android:text="@string/search_coordinates_button" />
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/search_address" />
- </RelativeLayout>
-
- <AutoCompleteTextView
- android:id="@+id/address"
- style="@style/edittext_full"
- android:hint="@string/search_address"
- android:imeOptions="actionGo" />
-
- <Button
- android:id="@+id/search_address"
- style="@style/button_full"
- android:text="@string/search_address_button" />
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/search_geo" />
- </RelativeLayout>
-
- <AutoCompleteTextView
- android:id="@+id/geocode"
- style="@style/edittext_full"
- android:hint="@string/search_geo"
- android:imeOptions="actionGo"
- android:inputType="textCapCharacters"
- android:text="GC"
- tools:ignore="HardcodedText" />
-
- <Button
- android:id="@+id/display_geocode"
- style="@style/button_full"
- android:text="@string/search_geo_button" />
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/search_kw" />
- </RelativeLayout>
-
- <AutoCompleteTextView
- android:id="@+id/keyword"
- style="@style/edittext_full"
- android:hint="@string/search_kw_prefill"
- android:imeOptions="actionGo" />
-
- <Button
- android:id="@+id/search_keyword"
- style="@style/button_full"
- android:text="@string/search_kw_button" />
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/search_fbu" />
- </RelativeLayout>
-
- <AutoCompleteTextView
- android:id="@+id/finder"
- style="@style/edittext_full"
- android:hint="@string/search_fbu_prefill"
- android:imeOptions="actionGo" />
-
- <Button
- android:id="@+id/search_finder"
- style="@style/button_full"
- android:text="@string/search_fbu_button" />
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/search_hbu" />
- </RelativeLayout>
-
- <AutoCompleteTextView
- android:id="@+id/owner"
- style="@style/edittext_full"
- android:hint="@string/search_hbu_prefill"
- android:imeOptions="actionGo" />
-
- <Button
- android:id="@+id/search_owner"
- style="@style/button_full"
- android:text="@string/search_hbu_button" />
- <!-- ** -->
-
- <RelativeLayout style="@style/separator_horizontal_layout" >
-
- <View style="@style/separator_horizontal" />
-
- <TextView
- style="@style/separator_horizontal_headline"
- android:text="@string/search_tb" />
- </RelativeLayout>
-
- <AutoCompleteTextView
- android:id="@+id/trackable"
- style="@style/edittext_full"
- android:hint="@string/search_tb_hint"
- android:imeOptions="actionGo"
- android:inputType="textCapCharacters" />
-
- <Button
- android:id="@+id/display_trackable"
- style="@style/button_full"
- android:text="@string/search_tb_button" />
- </LinearLayout>
- </ScrollView>
-
-</LinearLayout> \ No newline at end of file
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
+
+ <RelativeLayout style="@style/separator_horizontal_layout" >
+
+ <View style="@style/separator_horizontal" />
+
+ <TextView
+ style="@style/separator_horizontal_headline"
+ android:text="@string/search_coordinates" />
+ </RelativeLayout>
+
+ <Button
+ android:id="@+id/buttonLatitude"
+ style="@style/button_full"
+ android:hint="@string/latitude" />
+
+ <Button
+ android:id="@+id/buttonLongitude"
+ style="@style/button_full"
+ android:hint="@string/longitude" />
+
+ <Button
+ android:id="@+id/search_coordinates"
+ style="@style/button_full"
+ android:text="@string/search_coordinates_button" />
+ <!-- ** -->
+
+ <RelativeLayout style="@style/separator_horizontal_layout" >
+
+ <View style="@style/separator_horizontal" />
+
+ <TextView
+ style="@style/separator_horizontal_headline"
+ android:text="@string/search_address" />
+ </RelativeLayout>
+
+ <AutoCompleteTextView
+ android:id="@+id/address"
+ style="@style/edittext_full"
+ android:hint="@string/search_address"
+ android:imeOptions="actionGo" />
+
+ <Button
+ android:id="@+id/search_address"
+ style="@style/button_full"
+ android:text="@string/search_address_button" />
+ <!-- ** -->
+
+ <RelativeLayout style="@style/separator_horizontal_layout" >
+
+ <View style="@style/separator_horizontal" />
+
+ <TextView
+ style="@style/separator_horizontal_headline"
+ android:text="@string/search_geo" />
+ </RelativeLayout>
+
+ <AutoCompleteTextView
+ android:id="@+id/geocode"
+ style="@style/edittext_full"
+ android:hint="@string/search_geo"
+ android:imeOptions="actionGo"
+ android:inputType="textCapCharacters"
+ android:text="GC"
+ tools:ignore="HardcodedText" />
+
+ <Button
+ android:id="@+id/display_geocode"
+ style="@style/button_full"
+ android:text="@string/search_geo_button" />
+ <!-- ** -->
+
+ <RelativeLayout style="@style/separator_horizontal_layout" >
+
+ <View style="@style/separator_horizontal" />
+
+ <TextView
+ style="@style/separator_horizontal_headline"
+ android:text="@string/search_kw" />
+ </RelativeLayout>
+
+ <AutoCompleteTextView
+ android:id="@+id/keyword"
+ style="@style/edittext_full"
+ android:hint="@string/search_kw_prefill"
+ android:imeOptions="actionGo" />
+
+ <Button
+ android:id="@+id/search_keyword"
+ style="@style/button_full"
+ android:text="@string/search_kw_button" />
+ <!-- ** -->
+
+ <RelativeLayout style="@style/separator_horizontal_layout" >
+
+ <View style="@style/separator_horizontal" />
+
+ <TextView
+ style="@style/separator_horizontal_headline"
+ android:text="@string/search_fbu" />
+ </RelativeLayout>
+
+ <AutoCompleteTextView
+ android:id="@+id/finder"
+ style="@style/edittext_full"
+ android:hint="@string/search_fbu_prefill"
+ android:imeOptions="actionGo" />
+
+ <Button
+ android:id="@+id/search_finder"
+ style="@style/button_full"
+ android:text="@string/search_fbu_button" />
+ <!-- ** -->
+
+ <RelativeLayout style="@style/separator_horizontal_layout" >
+
+ <View style="@style/separator_horizontal" />
+
+ <TextView
+ style="@style/separator_horizontal_headline"
+ android:text="@string/search_hbu" />
+ </RelativeLayout>
+
+ <AutoCompleteTextView
+ android:id="@+id/owner"
+ style="@style/edittext_full"
+ android:hint="@string/search_hbu_prefill"
+ android:imeOptions="actionGo" />
+
+ <Button
+ android:id="@+id/search_owner"
+ style="@style/button_full"
+ android:text="@string/search_hbu_button" />
+ <!-- ** -->
+
+ <RelativeLayout style="@style/separator_horizontal_layout" >
+
+ <View style="@style/separator_horizontal" />
+
+ <TextView
+ style="@style/separator_horizontal_headline"
+ android:text="@string/search_tb" />
+ </RelativeLayout>
+
+ <AutoCompleteTextView
+ android:id="@+id/trackable"
+ style="@style/edittext_full"
+ android:hint="@string/search_tb_hint"
+ android:imeOptions="actionGo"
+ android:inputType="textCapCharacters" />
+
+ <Button
+ android:id="@+id/display_trackable"
+ style="@style/button_full"
+ android:text="@string/search_tb_button" />
+ </LinearLayout>
+
+</ScrollView> \ No newline at end of file
diff --git a/main/res/layout/simple_dir_chooser.xml b/main/res/layout/simple_dir_chooser.xml
index ece29c7..167b2ec 100644
--- a/main/res/layout/simple_dir_chooser.xml
+++ b/main/res/layout/simple_dir_chooser.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="?background_color"
@@ -42,20 +43,20 @@
android:paddingTop="10dip" >
<Button
- android:id="@+id/simple_dir_chooser_ok"
+ android:id="@+id/simple_dir_chooser_cancel"
style="@style/button_full"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:text="@android:string/ok" />
+ android:text="@android:string/cancel" />
<Button
- android:id="@+id/simple_dir_chooser_cancel"
+ android:id="@+id/simple_dir_chooser_ok"
style="@style/button_full"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
- android:text="@android:string/cancel" />
+ android:text="@android:string/ok" />
</LinearLayout>
<ListView
@@ -63,6 +64,9 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/buttonLayout"
- android:layout_below="@+id/headerLayout" />
+ android:layout_below="@+id/headerLayout"
+ android:clipToPadding="false"
+ android:scrollbarStyle="outsideOverlay"
+ tools:listitem="@layout/simple_dir_item" />
</RelativeLayout> \ No newline at end of file
diff --git a/main/res/layout/staticmaps_activity.xml b/main/res/layout/staticmaps_activity.xml
index 2ffa70d..c8806b4 100644
--- a/main/res/layout/staticmaps_activity.xml
+++ b/main/res/layout/staticmaps_activity.xml
@@ -1,23 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:orientation="vertical" >
+ android:orientation="vertical"
+ android:padding="4dip" >
- <include layout="@layout/actionbar" />
-
- <ScrollView
+ <LinearLayout
+ android:id="@+id/maps_list"
android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical"
- android:padding="4dip" >
-
- <LinearLayout
- android:id="@+id/maps_list"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical" >
- </LinearLayout>
- </ScrollView>
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
+ </LinearLayout>
-</LinearLayout> \ No newline at end of file
+</ScrollView> \ No newline at end of file
diff --git a/main/res/layout/text_preference.xml b/main/res/layout/text_preference.xml
index 818b2f3..174a6d1 100644
--- a/main/res/layout/text_preference.xml
+++ b/main/res/layout/text_preference.xml
@@ -1,22 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
+ android:orientation="vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp"
- android:orientation="vertical" >
+ tools:context=".settings.SettingsActivity" >
- <TextView
+ <TextView
android:id="@+id/textPreferenceText"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall" />
- <TextView
+
+ <TextView
android:id="@+id/textPreferenceSummary"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
- android:visibility="gone"
- android:textAppearance="?android:attr/textAppearanceSmall" />
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:visibility="gone" />
-</LinearLayout>
+</LinearLayout> \ No newline at end of file
diff --git a/main/res/layout/usefulapps_activity.xml b/main/res/layout/usefulapps_activity.xml
index 84bcf39..7abb212 100644
--- a/main/res/layout/usefulapps_activity.xml
+++ b/main/res/layout/usefulapps_activity.xml
@@ -1,23 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="?background_color"
android:orientation="vertical" >
- <include layout="@layout/actionbar" />
-
<ListView
android:id="@+id/apps_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:cacheColorHint="?background_color"
+ android:clipToPadding="false"
android:divider="?background_color"
android:fastScrollEnabled="true"
android:footerDividersEnabled="false"
android:headerDividersEnabled="false"
android:listSelector="?background_color"
- android:padding="4dip" >
+ android:padding="4dip"
+ android:scrollbarStyle="outsideOverlay"
+ tools:listitem="@layout/usefulapps_item" >
</ListView>
</LinearLayout> \ No newline at end of file
diff --git a/main/res/layout/viewpager_activity.xml b/main/res/layout/viewpager_activity.xml
index 14120e0..d197bcd 100644
--- a/main/res/layout/viewpager_activity.xml
+++ b/main/res/layout/viewpager_activity.xml
@@ -1,13 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res/cgeo.geocaching"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="?background_color"
android:orientation="vertical" >
- <include layout="@layout/actionbar" />
-
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="fill_parent"
diff --git a/main/res/layout/waypoint_popup.xml b/main/res/layout/waypoint_popup.xml
index c8b257c..287fc3a 100644
--- a/main/res/layout/waypoint_popup.xml
+++ b/main/res/layout/waypoint_popup.xml
@@ -5,12 +5,7 @@
android:background="?background_color_transparent"
android:orientation="vertical" >
- <LinearLayout style="@style/action_bar" >
-
- <include layout="@layout/actionbar_title_no_home" />
-
- <include layout="@layout/actionbar_button_compass" />
- </LinearLayout>
+ <include layout="@layout/actionbar_popup" />
<ScrollView
android:id="@+id/details_list_box"
diff --git a/main/res/layout/wp_threshold_preference.xml b/main/res/layout/wp_threshold_preference.xml
index 22ffe9a..f3cbc86 100644
--- a/main/res/layout/wp_threshold_preference.xml
+++ b/main/res/layout/wp_threshold_preference.xml
@@ -1,26 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingRight="16dp"
- android:paddingTop="8dp" >
-
+ android:paddingTop="8dp"
+ tools:context=".settings.SettingsActivity" >
+
<SeekBar
android:id="@+id/wp_threshold_seekbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
- android:paddingRight="8dp"
- android:layout_weight="1" />
+ android:layout_weight="1"
+ android:paddingRight="8dp" />
<TextView
android:id="@+id/wp_threshold_value_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
- android:gravity="center"
- android:layout_weight="5" />
+ android:layout_weight="5"
+ android:gravity="center" />
-</LinearLayout>
+</LinearLayout> \ No newline at end of file
diff --git a/main/res/menu/abstract_logging_activity.xml b/main/res/menu/abstract_logging_activity.xml
index b926dd1..aeb6720 100644
--- a/main/res/menu/abstract_logging_activity.xml
+++ b/main/res/menu/abstract_logging_activity.xml
@@ -1,22 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto" >
<item
- android:id="@+id/menu_signature"
- android:icon="@drawable/ic_menu_edit"
- android:title="@string/init_signature">
+ android:id="@+id/menu_send"
+ android:enabled="true"
+ android:icon="@drawable/ic_menu_send"
+ android:title="@string/send"
+ app:showAsAction="ifRoom|withText"> <!-- enabled=true, we show a message if logging is not possible -->
</item>
<item
android:id="@+id/menu_templates"
android:icon="@drawable/ic_menu_add"
- android:title="@string/log_add">
+ android:title="@string/log_add"
+ app:showAsAction="ifRoom|withText">
+ <menu /> <!-- filled dynamically -->
+ </item>
+ <item
+ android:id="@+id/menu_image"
+ android:icon="@drawable/ic_menu_attachment"
+ android:title="@string/log_image_attach"
+ android:visible="false"
+ app:showAsAction="ifRoom|withText">
<menu /> <!-- filled dynamically -->
</item>
<item
android:id="@+id/menu_smilies"
android:icon="@drawable/ic_menu_emoticons"
- android:title="@string/log_smilies">
+ android:title="@string/log_smilies"
+ app:showAsAction="ifRoom|withText">
<menu /> <!-- filled dynamically -->
</item>
+ <item
+ android:id="@+id/save"
+ android:icon="@drawable/ic_menu_save"
+ android:title="@string/log_save"
+ android:visible="false"
+ app:showAsAction="ifRoom|withText">
+ </item>
+ <item
+ android:id="@+id/clear"
+ android:icon="@drawable/ic_menu_delete"
+ android:title="@string/log_clear"
+ android:visible="false"
+ app:showAsAction="ifRoom|withText">
+ </item>
</menu> \ No newline at end of file
diff --git a/main/res/menu/cache_list_context.xml b/main/res/menu/cache_list_context.xml
index 2767a2e..bbcc014 100644
--- a/main/res/menu/cache_list_context.xml
+++ b/main/res/menu/cache_list_context.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_default_navigation"
@@ -9,40 +10,47 @@
<item
android:id="@+id/menu_navigate"
android:icon="@drawable/ic_menu_mapmode"
- android:title="@string/cache_menu_navigate">
+ android:title="@string/cache_menu_navigate"
+ app:showAsAction="ifRoom|withText">
</item>
<item
android:id="@+id/menu_cache_details"
- android:title="@string/cache_menu_details">
+ android:title="@string/cache_menu_details"
+ app:showAsAction="ifRoom|withText">
</item>
<item
android:id="@+id/menu_log_visit_offline"
android:icon="@drawable/ic_menu_edit"
+ app:showAsAction="ifRoom|withText"
android:title="@string/cache_menu_visit_offline">
</item>
<item
android:id="@+id/menu_log_visit"
android:icon="@drawable/ic_menu_edit"
+ app:showAsAction="ifRoom|withText"
android:title="@string/cache_menu_visit">
</item>
<item
android:id="@+id/menu_drop_cache"
+ app:showAsAction="ifRoom|withText"
+ android:icon="@drawable/ic_menu_delete"
android:title="@string/cache_offline_drop">
</item>
<item
android:id="@+id/menu_move_to_list"
+ app:showAsAction="ifRoom|withText"
android:title="@string/cache_menu_move_list">
</item>
<item
- android:id="@+id/menu_export"
- android:title="@string/export">
- </item>
- <item
android:id="@+id/menu_refresh"
+ app:showAsAction="ifRoom|withText"
+ android:icon="@drawable/ic_menu_refresh"
android:title="@string/cache_menu_refresh">
</item>
<item
android:id="@+id/menu_store_cache"
+ app:showAsAction="ifRoom|withText"
+ android:icon="@drawable/ic_menu_save"
android:title="@string/cache_offline_store">
</item>
diff --git a/main/res/menu/cache_list_options.xml b/main/res/menu/cache_list_options.xml
index 418d2de..1198d5b 100644
--- a/main/res/menu/cache_list_options.xml
+++ b/main/res/menu/cache_list_options.xml
@@ -1,15 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto" >
<item
+ android:id="@+id/menu_show_on_map"
+ android:icon="@drawable/ic_menu_mapmode"
+ android:title="@string/caches_on_map"
+ app:showAsAction="ifRoom">
+ </item>
+ <item
android:id="@+id/menu_filter"
android:icon="@drawable/ic_menu_filter"
- android:title="@string/caches_filter">
+ android:title="@string/caches_filter"
+ app:showAsAction="ifRoom|withText">
</item>
<item
android:id="@+id/menu_sort"
+ android:actionProviderClass="cgeo.geocaching.sorting.SortActionProvider"
android:icon="@drawable/ic_menu_sort_alphabetically"
- android:title="@string/caches_sort">
+ android:showAsAction="always"
+ android:title="@string/caches_sort"
+ app:actionProviderClass="cgeo.geocaching.sorting.SortActionProvider"
+ app:showAsAction="ifRoom|withText">
</item>
<item
android:id="@+id/menu_switch_select_mode"
@@ -36,11 +48,7 @@
</item>
<item
android:id="@+id/menu_drop_caches"
- android:title="@string/caches_drop_all">
- </item>
- <item
- android:id="@+id/menu_drop_caches_and_list"
- android:title="@string/caches_drop_all_and_list">
+ android:title="@string/caches_remove_all">
</item>
<item
android:id="@+id/menu_delete_events"
@@ -51,22 +59,6 @@
android:title="@string/caches_clear_offlinelogs">
</item>
<item
- android:id="@+id/menu_import_gpx"
- android:title="@string/gpx_import_title">
- </item>
- <item
- android:id="@+id/menu_import_web"
- android:title="@string/web_import_title">
- </item>
- <item
- android:id="@+id/menu_import_android"
- android:title="@string/gpx_import_android">
- </item>
- <item
- android:id="@+id/menu_export"
- android:title="@string/export">
- </item>
- <item
android:id="@+id/menu_remove_from_history"
android:title="@string/cache_clear_history">
</item>
@@ -88,29 +80,52 @@
android:icon="@drawable/ic_menu_mapmode"
android:title="@string/caches_on_map"
android:visible="false">
- <menu >
+ <menu>
</menu>
</item>
<item
- android:id="@+id/submenu_manage_lists"
- android:icon="@drawable/ic_menu_more"
- android:title="@string/list_menu">
+ android:id="@+id/menu_create_list"
+ android:title="@string/list_menu_create">
+ </item>
+ <item
+ android:id="@+id/menu_drop_list"
+ android:title="@string/list_menu_drop">
+ </item>
+ <item
+ android:id="@+id/menu_rename_list"
+ android:title="@string/list_menu_rename">
+ </item>
+ <item
+ android:id="@+id/menu_import"
+ android:title="@string/list_menu_import"
+ app:showAsAction="never|withText">
<menu>
<item
- android:id="@+id/menu_create_list"
- android:title="@string/list_menu_create">
+ android:id="@+id/menu_import_gpx"
+ android:title="@string/gpx_import_title">
</item>
<item
- android:id="@+id/menu_drop_list"
- android:title="@string/list_menu_drop">
+ android:id="@+id/menu_import_web"
+ android:title="@string/web_import_title">
+ </item>
+ <item
+ android:id="@+id/menu_import_android"
+ android:title="@string/gpx_import_android">
</item>
+ </menu>
+ </item>
+ <item
+ android:id="@+id/menu_export"
+ android:title="@string/export"
+ app:showAsAction="never|withText">
+ <menu>
<item
- android:id="@+id/menu_rename_list"
- android:title="@string/list_menu_rename">
+ android:id="@+id/menu_export_gpx"
+ android:title="@string/export_gpx">
</item>
<item
- android:id="@+id/menu_switch_list"
- android:title="@string/list_menu_change">
+ android:id="@+id/menu_export_fieldnotes"
+ android:title="@string/export_fieldnotes">
</item>
</menu>
</item>
diff --git a/main/res/menu/cache_options.xml b/main/res/menu/cache_options.xml
index d2951f4..cb32215 100644
--- a/main/res/menu/cache_options.xml
+++ b/main/res/menu/cache_options.xml
@@ -1,45 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto" >
<item
android:id="@+id/menu_default_navigation"
android:icon="@drawable/ic_menu_compass"
- android:title="@string/cache_menu_navigate"> <!-- will be replaced -->
+ android:title="@string/cache_menu_navigate"
+ app:showAsAction="ifRoom"> <!-- will be replaced -->
</item>
<item
android:id="@+id/menu_navigate"
android:icon="@drawable/ic_menu_mapmode"
- android:title="@string/cache_menu_navigate">
- </item>
- <item
- android:id="@+id/menu_calendar"
- android:icon="@drawable/ic_menu_agenda"
- android:title="@string/cache_menu_event">
+ android:title="@string/cache_menu_navigate"
+ app:showAsAction="ifRoom">
</item>
<item
android:id="@+id/menu_log_visit_offline"
android:icon="@drawable/ic_menu_edit"
- android:title="@string/cache_menu_visit_offline">
+ android:title="@string/cache_menu_visit_offline"
+ app:showAsAction="ifRoom">
</item>
<item
android:id="@+id/menu_log_visit"
android:icon="@drawable/ic_menu_edit"
- android:title="@string/cache_menu_visit">
+ android:title="@string/cache_menu_visit"
+ app:showAsAction="ifRoom">
+ </item>
+ <item
+ android:id="@+id/menu_calendar"
+ android:icon="@drawable/ic_menu_my_calendar"
+ android:title="@string/cache_menu_event"
+ app:showAsAction="ifRoom">
</item>
<item
android:id="@+id/menu_caches_around"
android:icon="@drawable/ic_menu_rotate"
- android:title="@string/cache_menu_around">
+ android:title="@string/cache_menu_around"
+ app:showAsAction="ifRoom">
</item>
<item
android:id="@+id/menu_show_in_browser"
android:icon="@drawable/ic_menu_info_details"
- android:title="@string/cache_menu_browser">
+ android:title="@string/cache_menu_browser"
+ app:showAsAction="ifRoom">
+ </item>
+ <item
+ android:id="@+id/menu_store"
+ android:icon="@drawable/ic_menu_save"
+ android:title="@string/cache_offline_store"
+ android:visible="false"
+ app:showAsAction="ifRoom">
+ </item>
+ <item
+ android:id="@+id/menu_refresh"
+ android:icon="@drawable/ic_menu_refresh"
+ android:title="@string/cache_offline_refresh"
+ android:visible="false"
+ app:showAsAction="ifRoom">
+ </item>
+ <item
+ android:id="@+id/menu_delete"
+ android:icon="@drawable/ic_menu_delete"
+ android:title="@string/cache_offline_drop"
+ android:visible="false"
+ app:showAsAction="ifRoom">
</item>
<item
android:id="@+id/menu_share"
android:icon="@drawable/ic_menu_share"
- android:title="@string/cache_menu_share">
+ android:title="@string/cache_menu_share"
+ app:actionProviderClass="android.support.v7.widget.ShareActionProvider"
+ app:showAsAction="ifRoom">
</item>
-
+
</menu> \ No newline at end of file
diff --git a/main/res/menu/compass_activity_options.xml b/main/res/menu/compass_activity_options.xml
index 01c7d36..30861dd 100644
--- a/main/res/menu/compass_activity_options.xml
+++ b/main/res/menu/compass_activity_options.xml
@@ -1,37 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto" >
<item
- android:id="@+id/menu_switch_compass_gps"
- android:icon="@drawable/ic_menu_compass"
- android:title="@string/use_gps"> <!-- will be replaced in code -->
- </item>
- <item
android:id="@+id/menu_map"
android:icon="@drawable/ic_menu_mapmode"
- android:title="@string/caches_on_map">
- </item>
- <item
- android:id="@+id/menu_edit_destination"
- android:icon="@drawable/ic_menu_edit"
- android:title="@string/destination_set">
- </item>
- <item
- android:id="@+id/menu_select_destination"
- android:icon="@drawable/ic_menu_myplaces"
- android:title="@string/destination_select">
- <menu /> <!-- filled dynamically -->
+ android:title="@string/caches_on_map"
+ app:showAsAction="ifRoom|withText">
</item>
<item
android:id="@+id/menu_tts_start"
android:icon="@drawable/ic_menu_start_conversation"
- android:title="@string/tts_start">
+ android:title="@string/tts_start"
+ app:showAsAction="ifRoom|withText">
</item>
<item
android:id="@+id/menu_tts_stop"
android:icon="@drawable/ic_menu_start_conversation"
android:title="@string/tts_stop"
- android:visible="false">
+ android:visible="false"
+ app:showAsAction="ifRoom|withText">
+ </item>
+ <item
+ android:id="@+id/menu_select_destination"
+ android:icon="@drawable/ic_menu_myplaces"
+ android:title="@string/destination_select"
+ app:showAsAction="ifRoom|withText">
+ <menu /> <!-- filled dynamically -->
+ </item>
+ <item
+ android:id="@+id/menu_compass_sensor"
+ android:icon="@drawable/ic_menu_compass"
+ android:title="@string/compass_sensors"
+ app:showAsAction="never|withText"> <!-- will be replaced in code -->
+ <menu>
+ <group android:checkableBehavior="single" >
+ <item
+ android:id="@+id/menu_compass_sensor_gps"
+ android:title="@string/use_gps">
+ </item>
+ <item
+ android:id="@+id/menu_compass_sensor_magnetic"
+ android:title="@string/use_compass">
+ </item>
+ </group>
+ </menu>
</item>
</menu> \ No newline at end of file
diff --git a/main/res/menu/details_context.xml b/main/res/menu/details_context.xml
index 3125459..3c16e1e 100644
--- a/main/res/menu/details_context.xml
+++ b/main/res/menu/details_context.xml
@@ -1,26 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto" >
<item
android:id="@+id/menu_copy"
- android:title="@android:string/copy">
+ android:icon="@drawable/ic_menu_copy"
+ android:title="@android:string/copy"
+ app:showAsAction="always|withText">
</item>
<item
android:id="@+id/menu_translate_to_sys_lang"
- android:title="@string/translate_to_sys_lang">
+ android:title="@string/translate_to_sys_lang"
+ app:showAsAction="ifRoom">
</item>
<item
android:id="@+id/menu_translate_to_english"
- android:title="@string/translate_to_english">
+ android:title="@string/translate_to_english"
+ app:showAsAction="ifRoom">
</item>
<item
android:id="@+id/menu_cache_share_field"
- android:title="@string/cache_share_field">
+ android:title="@string/cache_share_field"
+ app:showAsAction="ifRoom">
</item>
<item
android:id="@+id/menu_calendar"
+ android:icon="@drawable/ic_menu_my_calendar"
android:title="@string/cache_menu_event"
- android:visible="false">
+ android:visible="false"
+ app:showAsAction="ifRoom">
</item>
</menu> \ No newline at end of file
diff --git a/main/res/menu/images_list_context.xml b/main/res/menu/images_list_context.xml
index 75d0ca0..8d3869b 100644
--- a/main/res/menu/images_list_context.xml
+++ b/main/res/menu/images_list_context.xml
@@ -1,12 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/image_open_file"
+ app:showAsAction="ifRoom|withText"
android:title="@string/cache_image_open_file">
</item>
<item
android:id="@+id/image_open_browser"
+ app:showAsAction="ifRoom|withText"
android:title="@string/cache_image_open_browser">
</item>
diff --git a/main/res/menu/logging_ui.xml b/main/res/menu/logging_ui.xml
index a8622c5..921b350 100644
--- a/main/res/menu/logging_ui.xml
+++ b/main/res/menu/logging_ui.xml
@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_log_visit_offline"
android:icon="@drawable/ic_menu_edit"
+ app:showAsAction="ifRoom|withText"
android:title="@string/cache_menu_visit_offline">
</item>
<item
android:id="@+id/menu_log_visit"
android:icon="@drawable/ic_menu_edit"
+ app:showAsAction="ifRoom|withText"
android:title="@string/cache_menu_visit">
</item>
diff --git a/main/res/menu/main_activity_options.xml b/main/res/menu/main_activity_options.xml
index fc949dc..b17080b 100644
--- a/main/res/menu/main_activity_options.xml
+++ b/main/res/menu/main_activity_options.xml
@@ -1,34 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto" >
+ <!-- TODO: use ic_action_search -->
<item
- android:id="@+id/menu_settings"
- android:icon="@drawable/ic_menu_preferences"
- android:title="@string/menu_settings">
- </item>
+ android:id="@+id/menu_gosearch"
+ style="@style/action_bar_action"
+ android:icon="@drawable/abc_ic_search"
+ android:title="@string/search_bar_hint"
+ app:actionViewClass="android.support.v7.widget.SearchView"
+ app:showAsAction="collapseActionView|always"/>
<item
android:id="@+id/menu_history"
android:icon="@drawable/ic_menu_recent_history"
- android:title="@string/menu_history">
+ android:title="@string/menu_history"
+ app:showAsAction="ifRoom">
</item>
<item
android:id="@+id/menu_pocket_queries"
android:icon="@drawable/ic_menu_account_list"
- android:title="@string/menu_pocket_queries">
+ android:title="@string/menu_pocket_queries"
+ app:showAsAction="ifRoom">
+ </item>
+ <item
+ android:id="@+id/menu_settings"
+ android:icon="@drawable/ic_menu_preferences"
+ android:title="@string/menu_settings"
+ app:showAsAction="ifRoom">
</item>
<item
android:id="@+id/menu_helpers"
android:icon="@drawable/ic_menu_shopping"
- android:title="@string/menu_helpers">
+ android:title="@string/menu_helpers"
+ app:showAsAction="ifRoom">
</item>
<item
android:id="@+id/menu_scan"
android:icon="@drawable/ic_menu_barcode"
- android:title="@string/menu_scan_geo">
+ android:title="@string/menu_scan_geo"
+ app:showAsAction="ifRoom">
</item>
<item
android:id="@+id/menu_about"
android:icon="@drawable/ic_menu_info_details"
- android:title="@string/menu_about">
+ android:title="@string/menu_about"
+ app:showAsAction="ifRoom">
</item>
+
</menu> \ No newline at end of file
diff --git a/main/res/menu/map_activity.xml b/main/res/menu/map_activity.xml
index d81a49b..2b2f1eb 100644
--- a/main/res/menu/map_activity.xml
+++ b/main/res/menu/map_activity.xml
@@ -1,10 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto" >
<item
+ android:id="@+id/menu_toggle_mypos"
+ android:icon="@drawable/ic_menu_myposition"
+ android:showAsAction="always"
+ android:title="@string/menu_centerposition"
+ app:showAsAction="always"/>
+ <item
android:id="@+id/menu_select_mapview"
android:icon="@drawable/ic_menu_mapmode"
- android:title="@string/map_view_map">
+ android:showAsAction="ifRoom|withText"
+ android:title="@string/map_view_map"
+ app:showAsAction="ifRoom|withText">
<menu>
<group
android:id="@+id/menu_group_map_sources"
@@ -15,42 +24,55 @@
<item
android:id="@+id/menu_map_live"
android:icon="@drawable/ic_menu_refresh"
- android:title="@string/map_live_disable">
+ android:showAsAction="ifRoom|withText"
+ android:title="@string/map_live_disable"
+ app:showAsAction="ifRoom|withText">
</item>
<item
android:id="@+id/menu_store_caches"
- android:enabled="false"
android:icon="@drawable/ic_menu_set_as"
- android:title="@string/caches_store_offline">
+ android:showAsAction="ifRoom|withText"
+ android:title="@string/caches_store_offline"
+ app:showAsAction="ifRoom|withText">
</item>
<item
android:id="@+id/submenu_modes"
android:icon="@drawable/ic_menu_mark"
- android:title="@string/map_modes">
+ android:showAsAction="ifRoom|withText"
+ android:title="@string/map_modes"
+ app:showAsAction="ifRoom|withText">
<menu>
<item
android:id="@+id/menu_trail_mode"
+ android:checkable="true"
android:icon="@drawable/ic_menu_trail"
- android:title="@string/map_trail_hide">
+ android:title="@string/map_trail_show"
+ app:showAsAction="ifRoom|withText">
</item>
<item
android:id="@+id/menu_circle_mode"
+ android:checkable="true"
android:icon="@drawable/ic_menu_circle"
- android:title="@string/map_circles_hide">
- </item>
- <item
- android:id="@+id/menu_mycaches_mode"
- android:icon="@android:drawable/ic_menu_myplaces"
- android:title="@string/map_mycaches_hide">
+ android:title="@string/map_circles_show"
+ app:showAsAction="ifRoom|withText">
</item>
<item
- android:id="@+id/menu_theme_mode"
- android:icon="@drawable/ic_menu_preferences"
- android:title="@string/map_theme_select">
+ android:id="@+id/menu_mycaches_mode"
+ android:checkable="true"
+ android:icon="@android:drawable/ic_menu_myplaces"
+ android:title="@string/map_mycaches_hide"
+ app:showAsAction="ifRoom|withText">
</item>
</menu>
</item>
<item
+ android:id="@+id/menu_theme_mode"
+ android:icon="@drawable/ic_menu_preferences"
+ android:showAsAction="ifRoom|withText"
+ android:title="@string/map_theme_select"
+ app:showAsAction="ifRoom|withText">
+ </item>
+ <item
android:id="@+id/submenu_strategy"
android:icon="@drawable/ic_menu_preferences"
android:title="@string/map_strategy">
diff --git a/main/res/menu/navigate_any_point_activity_options.xml b/main/res/menu/navigate_any_point_activity_options.xml
index 4f199e2..e3fd79c 100644
--- a/main/res/menu/navigate_any_point_activity_options.xml
+++ b/main/res/menu/navigate_any_point_activity_options.xml
@@ -1,25 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_navigate"
android:icon="@drawable/ic_menu_mapmode"
- android:title="@string/cache_menu_navigate">
+ android:title="@string/cache_menu_navigate"
+ app:showAsAction="ifRoom">
</item>
<item
android:id="@+id/menu_default_navigation"
android:icon="@drawable/ic_menu_compass"
- android:title="@string/cache_menu_navigate"> <!-- will be replaced in code -->
+ android:title="@string/cache_menu_navigate"
+ app:showAsAction="ifRoom"> <!-- will be replaced in code -->
</item>
<item
android:id="@+id/menu_caches_around"
android:icon="@drawable/ic_menu_rotate"
- android:title="@string/cache_menu_around">
+ android:title="@string/cache_menu_around"
+ app:showAsAction="ifRoom">
</item>
<item
android:id="@+id/menu_clear_history"
android:icon="@drawable/ic_menu_delete"
- android:title="@string/search_clear_history">
+ android:title="@string/search_clear_history"
+ app:showAsAction="ifRoom">
</item>
</menu> \ No newline at end of file
diff --git a/main/res/menu/search_activity_options.xml b/main/res/menu/search_activity_options.xml
index fcd7401..300be94 100644
--- a/main/res/menu/search_activity_options.xml
+++ b/main/res/menu/search_activity_options.xml
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_search_own_caches"
android:icon="@drawable/ic_menu_myplaces"
- android:title="@string/search_own_caches">
+ android:title="@string/search_own_caches"
+ app:showAsAction="ifRoom|withText"
+ >
</item>
</menu> \ No newline at end of file
diff --git a/main/res/menu/static_maps_activity_options.xml b/main/res/menu/static_maps_activity_options.xml
index 7850c92..fb98f54 100644
--- a/main/res/menu/static_maps_activity_options.xml
+++ b/main/res/menu/static_maps_activity_options.xml
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_refresh"
android:icon="@drawable/ic_menu_refresh"
+ app:showAsAction="ifRoom"
android:title="@string/cache_offline_refresh">
</item>
diff --git a/main/res/menu/trackable_activity.xml b/main/res/menu/trackable_activity.xml
index ddf45f6..5bcd706 100644
--- a/main/res/menu/trackable_activity.xml
+++ b/main/res/menu/trackable_activity.xml
@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_log_touch"
- android:icon="@drawable/ic_menu_agenda"
+ android:icon="@drawable/ic_menu_edit"
+ app:showAsAction="ifRoom|withText"
android:title="@string/trackable_log_touch">
</item>
<item
android:id="@+id/menu_browser_trackable"
android:icon="@drawable/ic_menu_info_details"
+ app:showAsAction="ifRoom|withText"
android:title="@string/trackable_browser_open">
</item>
diff --git a/main/res/menu/waypoint_options.xml b/main/res/menu/waypoint_options.xml
index f03cca6..7df48f8 100644
--- a/main/res/menu/waypoint_options.xml
+++ b/main/res/menu/waypoint_options.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_waypoint_reset_cache_coords"
diff --git a/main/res/values-ca/strings.xml b/main/res/values-ca/strings.xml
index 9e66e97..57741ed 100644
--- a/main/res/values-ca/strings.xml
+++ b/main/res/values-ca/strings.xml
@@ -9,7 +9,6 @@
<string name="about">Quant al c:geo</string>
<string name="latitude">Latitud</string>
<string name="longitude">Longitud</string>
- <string name="action_bar_share_title">Comparteix l\'enllaç al catxé</string>
<string name="settings_titlebar">Opcions del c:geo</string>
<string name="all_types">Tots </string>
<string name="traditional">Tradicional</string>
@@ -79,22 +78,9 @@
<string name="log_saving">S\'està enviant el registre…</string>
<string name="log_saving_and_uploading">S\'està enviant el registre i pujant la imatge…</string>
<string name="log_clear">Esborra</string>
- <string name="log_post">Envia el registre</string>
- <string name="log_post_rate">Envia el registre i la valoració</string>
- <string name="log_post_no_rate">Envia el registre sense valoració</string>
<string name="log_post_not_possible">S\'està carregant la pàgina del registre…</string>
<string name="log_add">Afegeix</string>
- <string name="log_rating">Puntuació</string>
<string name="log_no_rating">Sense puntuació</string>
- <string name="log_stars_1">1 estrella</string>
- <string name="log_stars_15">1,5 estrelles</string>
- <string name="log_stars_2">2 estrelles</string>
- <string name="log_stars_25">2,5 estrelles</string>
- <string name="log_stars_3">3 estrelles</string>
- <string name="log_stars_35">3,5 estrelles</string>
- <string name="log_stars_4">4 estrelles</string>
- <string name="log_stars_45">4,5 estrelles</string>
- <string name="log_stars_5">5 estrelles</string>
<string name="log_stars_1_description">Pobre</string>
<string name="log_stars_15_description">Bastant pobre</string>
<string name="log_stars_2_description">Per sota de la mitjana</string>
@@ -113,7 +99,6 @@
<string name="log_smilies">Emoticones</string>
<string name="log_image">Imatge</string>
<string name="log_image_attach">Adjunta una imatge</string>
- <string name="log_image_edit">Edita la imatge</string>
<string name="log_image_stored">Existent</string>
<string name="log_image_camera">Nou</string>
<string name="log_image_caption">Títol</string>
@@ -122,6 +107,13 @@
<string name="log_password_title">Contrasenya d\'accés:</string>
<string name="log_hint_log_password">Introduïu la contrasenya d\'accés</string>
<string name="log_oc_team_comment">Comentari de l\'equip OC</string>
+ <string-array name="log_image_scales">
+ <item>Sense escala</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<string name="translate_to_sys_lang">Tradueix a %s</string>
<string name="translate_to_english">Tradueix a l\'anglès</string>
<string name="translate_length_warning">La traducció pot fallar amb una gran quantitat de text.</string>
@@ -214,6 +206,7 @@
<string name="info_select_logimage_cancelled">La selecció d\'imatge o captura s\'ha cancel·lat.</string>
<string name="info_stored_image">La nova imatge s\'ha desat a:</string>
<string name="info_storing_static_maps">S\'està intentant desar els mapes estàtics</string>
+ <string name="info_cache_saved">El catxé ha estat desat localment</string>
<string name="loc_last">Última coneguda</string>
<string name="loc_net">Xarxa</string>
<string name="loc_gps">GPS</string>
@@ -221,6 +214,7 @@
<string name="loc_trying">Intentant ubicar</string>
<string name="loc_no_addr">L\'adreça és desconeguda</string>
<string name="loc_gps_disabled">El GPS està desactivat</string>
+ <string name="menu_centerposition">Centra a la meva posició</string>
<string name="menu_about">Quant al c:geo</string>
<string name="menu_helpers">Programes d\'utilitat</string>
<string name="menu_settings">Configuració</string>
@@ -242,12 +236,15 @@
<string name="caches_more_caches_currently">actualment</string>
<string name="caches_downloading">S\'estan descarregant els catxés…\nETA:  </string>
<string name="caches_eta_ltm">Menys d\'un minut</string>
+ <plurals name="caches_eta_mins">
+ <item quantity="one">%d minut</item>
+ <item quantity="other">%d minuts</item>
+ </plurals>
<string name="caches_store_offline">Desa per usar fora de línia</string>
<string name="caches_store_selected">Desa els seleccionats</string>
<string name="caches_history">Historial</string>
<string name="caches_on_map">Mostra al mapa</string>
<string name="caches_sort">Ordena</string>
- <string name="caches_sort_title">Ordena per</string>
<string name="caches_sort_distance">Distància</string>
<string name="caches_sort_difficulty">Dificultat</string>
<string name="caches_sort_terrain">Terreny</string>
@@ -269,13 +266,11 @@
<string name="caches_select_invert">Inverteix la selecció</string>
<string name="caches_nearby">Propers</string>
<string name="caches_manage">Administra</string>
- <string name="caches_drop_selected">Elimina els seleccionats</string>
- <string name="caches_drop_selected_ask">Voleu suprimir els catxés seleccionats del dispositiu?</string>
- <string name="caches_drop_all">Esborra\'ls tots</string>
- <string name="caches_drop_all_ask">Voleu suprimir tots els catxés de la llista actual?</string>
- <string name="caches_drop_stored">Esborra els desats</string>
- <string name="caches_drop_progress">S\'estan eliminant els catxés</string>
- <string name="caches_drop_all_and_list">Esborra\'ls tots i suprimeix la llista</string>
+ <string name="caches_remove_all">Suprimeix-los tots</string>
+ <string name="caches_remove_all_confirm">Voleu suprimir tots els %s catxés de la llista actual?</string>
+ <string name="caches_remove_selected">Suprimeix els seleccionats</string>
+ <string name="caches_remove_selected_confirm">Voleu suprimir del dispositiu els %s catxés seleccionats?</string>
+ <string name="caches_remove_progress">S\'estan eliminant els catxés</string>
<string name="caches_delete_events">Elimina trobades passades</string>
<string name="caches_refresh_selected">Actualitza els seleccionats</string>
<string name="caches_refresh_all">Actualitza-ho tot</string>
@@ -302,11 +297,10 @@
<string name="caches_removing_from_history">S\'està eliminant de l\'historial…</string>
<string name="caches_clear_offlinelogs">Neteja els registres fora de línea</string>
<string name="caches_clear_offlinelogs_progress">S\'estan netejant els registres fora línia</string>
- <string name="list_menu">Llista</string>
<string name="list_menu_create">Crea una llista nova</string>
<string name="list_menu_drop">Elimina la llista actual</string>
- <string name="list_menu_change">Canvia de llista</string>
<string name="list_menu_rename">Reanomena la llista actual</string>
+ <string name="list_menu_import">Importa</string>
<string name="list_title">Trieu una llista</string>
<string name="list_inbox">Desats</string>
<string name="list_all_lists">Tots els catxés</string>
@@ -374,6 +368,8 @@
<string name="init_oc_ro">Opencaching.ro</string>
<string name="settings_activate_oc_ro">Activa</string>
<string name="init_oc_ro_description">Autoritza al c:geo a opencaching.ro per buscar catxés i accedir/filtrar els teus catxés trobats.</string>
+ <string name="settings_activate_oc_uk">Activa</string>
+ <string name="init_oc_uk_description">Autoritza al c:geo a opencaching.org.uk per buscar catxés i accedir/filtrar els teus catxés trobats.</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="settings_activate_twitter">Activa</string>
@@ -403,8 +399,8 @@
<string name="init_signature_template_log">Text del registre</string>
<string name="init_ratingwanted">Valoració del GCvote</string>
<string name="init_summary_ratingwanted">Descarrega la valoració des de GCvote.com</string>
- <string name="init_friendlogswanted">Mostra els registres d\'amics</string>
- <string name="init_summary_friendlogswanted">Mostra els registres dels amics a una altra pàgina</string>
+ <string name="init_friends_and_own_logs_wanted">Mostra els dels amics i els propis</string>
+ <string name="init_summary_friends_and_own_logs_wanted">Visualitza una pàgina addicional del llibre de registre pels registres dels amics i els propis</string>
<string name="init_openlastdetailspage">Obre l\'última pàgina de detalls</string>
<string name="init_summary_openlastdetailspage">Obre els detalls amb l\'última pàgina utilitzada</string>
<string name="init_autoload">Descripció llarga</string>
@@ -493,6 +489,9 @@
<string name="init_maintenance">Manteniment</string>
<string name="init_maintenance_directories_note">El c:geo desa les imatges, el imatges dels registres i altres fitxers relacionats amb un catxé a un directori separat. En alguns casos (com important/exportant la base de dades) aquest directori pot contenir fitxers antiquats, que es poden suprimir aquí.</string>
<string name="init_maintenance_directories">Suprimeix els arxius orfes</string>
+ <string name="init_create_memory_dump">Crea un buidat de memòria</string>
+ <string name="init_memory_dump">Buidat de memòria</string>
+ <string name="init_memory_dumped">S\'ha creat el buidat de memòria al %s</string>
<string name="settings_open_website">Obre el lloc web</string>
<string name="settings_settings">Configuració</string>
<string name="settings_information">Informació</string>
@@ -543,6 +542,10 @@
<string name="auth_ocus">opencaching.us</string>
<string name="auth_ocro">opencaching.ro</string>
<string name="auth_dialog_completed_oc">El c:geo ara està autoritzat a interactuar amb %s.</string>
+ <plurals name="cache_counts">
+ <item quantity="one">Un catxé</item>
+ <item quantity="other">%1$d catxés</item>
+ </plurals>
<string name="cache_offline">Fora de línia</string>
<string name="cache_offline_refresh">Actualitza</string>
<string name="cache_offline_drop">Esborra</string>
@@ -558,7 +561,6 @@
<string name="cache_premium">Premium</string>
<string name="cache_attributes">Atributs</string>
<string name="cache_inventory">Inventari</string>
- <string name="cache_log_offline">Registre fora línia</string>
<string name="cache_log_images_title">Imatges del registre</string>
<string name="cache_log_image_default_title">Foto</string>
<string name="cache_personal_note">Nota personal</string>
@@ -569,8 +571,6 @@
<string name="cache_personal_note_uploading">S\'està pujant la nota personal</string>
<string name="cache_personal_note_upload_done">S\'ha pujat la nota personal</string>
<string name="cache_personal_note_upload_cancelled">S\'ha cancel·lat la pujada de la nota personal</string>
- <string name="cache_personal_note_unstored">El catxé no s\'ha desat</string>
- <string name="cache_personal_note_store">El catxé es desa en primer lloc per permetre una nota personal.</string>
<string name="cache_description">Descripció</string>
<string name="cache_description_long">Descripció llarga</string>
<string name="cache_description_table_note">La descripció conté un format que pot necessitar visualitzar-se a %s per a veure\'s correctament.</string>
@@ -587,10 +587,14 @@
<string name="cache_list_unknown">No està a cap llista</string>
<string name="cache_images">Imatges</string>
<string name="cache_waypoints">Fites</string>
+ <plurals name="waypoints">
+ <item quantity="one">1 fita</item>
+ <item quantity="other">%d fites</item>
+ </plurals>
<string name="cache_waypoints_add">Afegeix una fita</string>
<string name="cache_hint">Pista</string>
<string name="cache_logs">Llibre de registre</string>
- <string name="cache_logsfriends">Llibre de registre (Amics)</string>
+ <string name="cache_logs_friends_and_own">Registres dels amics o propis</string>
<string name="cache_dialog_loading_details">S\'està carregant els detalls del catxé…</string>
<string name="cache_dialog_loading_details_status_loadpage">S\'està carregant la pàgina</string>
<string name="cache_dialog_loading_details_status_details">S\'està processant els detalls</string>
@@ -636,15 +640,14 @@
<string name="cache_menu_refresh">Actualitza</string>
<string name="cache_menu_share">Comparteix el catxé</string>
<string name="cache_menu_move_list">Mou a una llista diferent</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">Catxé de balisa</string>
<string name="cache_menu_navigon">Navigon</string>
<string name="cache_menu_pebble">Pebble</string>
<string name="cache_status">Estat</string>
<string name="cache_status_offline_log">Registre desat</string>
<string name="cache_status_found">Trobat</string>
+ <string name="cache_not_status_found">No s\'ha trobat</string>
<string name="cache_status_archived">Arxivat</string>
<string name="cache_status_disabled">Desactivat</string>
<string name="cache_status_premium">Només per membres Premium</string>
@@ -756,10 +759,7 @@
<string name="map_view_map">Tria el mapa</string>
<string name="map_modes">Configuració del mapa</string>
<string name="map_trail_show">Mostra la ruta</string>
- <string name="map_trail_hide">Amaga la ruta</string>
<string name="map_circles_show">Mostra els cercles</string>
- <string name="map_circles_hide">Amaga els cercles</string>
- <string name="map_mycaches_show">Mostra els catxés propis/trobats</string>
<string name="map_mycaches_hide">Amaga els catxés propis/trobats</string>
<string name="map_theme_builtin">Per defecte</string>
<string name="map_theme_select">Trieu els detalls del mapa</string>
@@ -839,10 +839,10 @@
<string name="user_menu_open_contact">Obre targeta del contacte</string>
<string name="navigation">Navegació</string>
<string name="compass_title">Brúixola</string>
+ <string name="compass_sensors">Sensors actius</string>
<string name="use_gps">Usa només el GPS</string>
<string name="use_compass">Usa el GPS i la brúixola</string>
<string name="destination_select">Tria destinació</string>
- <string name="destination_set">Fixa destinació</string>
<string name="navigation_direct_navigation">Navegació directa</string>
<string name="navigation_target">Objectiu</string>
<string name="err_nav_no_coordinates">No es pot iniciar la navegació sense les coordenades</string>
@@ -1113,7 +1113,6 @@
<string name="website">Lloc web: <a href=""> cgeo.org</a></string>
<string name="facebook">Facebook: <a href="">Pàgina del c:geo</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Manual: <a href="">c:geo in a Nutshell</a></string>
<string name="market">Android: <a href="">El c:geo a Google Play</a></string>
<string name="about_twitter">Voleu que <b>el c:geo</b> publiqui un nou estatus al Twitter cada vegada que registreu un catxé?</string>
<string name="faq">PMF: <a href=""> faq.cgeo.org</a></string>
@@ -1129,50 +1128,28 @@
<string name="tts_stop">Deixa de parlar</string>
<string name="err_tts_lang_not_supported">La llengua actual no és compatible amb la síntesi de veu.</string>
<string name="tts_one_kilometer">un quilòmetre</string>
- <string name="tts_one_meter">un metre</string>
- <string name="tts_one_mile">una milla</string>
- <string name="tts_one_foot">un peu</string>
- <string name="tts_one_oclock">la una en punt</string>
- <string name="tts_oclock">%s en punt</string>
- <string name="clipboard_copy_ok">S\'ha copiat al portapapers</string>
- <string name="percent_favorite_points">% \ preferits</string>
- <string name="cgeo_shortcut">Drecera del c:geo</string>
- <string name="create_shortcut">Crea una drecera</string>
- <string-array name="log_image_scales">
- <item>Sense escala</item>
- <item>512 px</item>
- <item>640 px</item>
- <item>800 px</item>
- <item>1024 px</item>
- </string-array>
- <plurals name="caches_eta_mins">
- <item quantity="one">minut</item>
- <item quantity="other">minuts</item>
- </plurals>
- <plurals name="cache_counts">
- <item quantity="one">Un catxé</item>
- <item quantity="other">%1$d catxés</item>
- </plurals>
- <plurals name="waypoints">
- <item quantity="one">1 fita</item>
- <item quantity="other">%d fites</item>
- </plurals>
<plurals name="tts_kilometers">
<item quantity="one">%s quilòmetre</item>
<item quantity="other">%s quilòmetres</item>
</plurals>
+ <string name="tts_one_meter">un metre</string>
<plurals name="tts_meters">
<item quantity="one">%s metre</item>
<item quantity="other">%s metres</item>
</plurals>
+ <string name="tts_one_mile">una milla</string>
<plurals name="tts_miles">
<item quantity="one">%s milla</item>
<item quantity="other">%s milles</item>
</plurals>
+ <string name="tts_one_foot">un peu</string>
<plurals name="tts_feet">
<item quantity="one">%s peu</item>
<item quantity="other">%s peus</item>
</plurals>
+ <string name="tts_one_oclock">la una en punt</string>
+ <string name="tts_oclock">%s en punt</string>
+ <string name="clipboard_copy_ok">S\'ha copiat al portapapers</string>
<plurals name="days_ago">
<item quantity="one">ahir</item>
<item quantity="other">fa %d dies</item>
@@ -1181,4 +1158,8 @@
<item quantity="one">%s preferit</item>
<item quantity="other">%s preferits</item>
</plurals>
+ <string name="percent_favorite_points">% \ preferits</string>
+ <string name="cgeo_shortcut">Drecera del c:geo</string>
+ <string name="create_shortcut">Crea una drecera</string>
+ <string name="send">Envia</string>
</resources>
diff --git a/main/res/values-cs/strings.xml b/main/res/values-cs/strings.xml
index 3202869..8625d72 100644
--- a/main/res/values-cs/strings.xml
+++ b/main/res/values-cs/strings.xml
@@ -8,15 +8,15 @@
<string name="about">O aplikaci</string>
<string name="latitude">Zeměpisná šířka</string>
<string name="longitude">Zeměpisná délka</string>
- <string name="action_bar_share_title">Sdílet odkaz ke keši</string>
<string name="settings_titlebar">c:geo Nastavení</string>
<string name="all_types">Všechny typy keší</string>
<string name="traditional">Tradiční keš</string>
- <string name="multi">Multi-keš</string>
+ <string name="multi">Multi keš</string>
<string name="mystery">Mystery keš</string>
<string name="letterbox">Dopisní schránka</string>
<string name="event">Keš události</string>
<string name="mega">Keš Mega-události</string>
+ <string name="giga">Giga event</string>
<string name="earth">Earthcache</string>
<string name="cito">Událost Cache In Trash Out</string>
<string name="webcam">Webcam keš</string>
@@ -77,22 +77,9 @@
<string name="log_saving">Odesílání Logu…</string>
<string name="log_saving_and_uploading">Odesílání Logu a nahrávání obrázku…</string>
<string name="log_clear">Vyčistit</string>
- <string name="log_post">Odeslat Log</string>
- <string name="log_post_rate">Odeslat Log a hlasovat</string>
- <string name="log_post_no_rate">Odeslat Log a nehlasovat</string>
<string name="log_post_not_possible">Načítání stránky s Logovacím formulářem…</string>
<string name="log_add">Přidat</string>
- <string name="log_rating">Hodnocení</string>
<string name="log_no_rating">Bez hodnocení</string>
- <string name="log_stars_1">1 hvězdička</string>
- <string name="log_stars_15">1,5 hvězdičky</string>
- <string name="log_stars_2">2 hvězdičky</string>
- <string name="log_stars_25">2,5 hvězdičky</string>
- <string name="log_stars_3">3 hvězdičky</string>
- <string name="log_stars_35">3,5 hvězdičky</string>
- <string name="log_stars_4">4 hvězdičky</string>
- <string name="log_stars_45">4,5 hvězdičky</string>
- <string name="log_stars_5">5 hvězdiček</string>
<string name="log_stars_1_description">Slabá</string>
<string name="log_stars_15_description">Docela slabá</string>
<string name="log_stars_2_description">Podprůměrná</string>
@@ -111,7 +98,6 @@
<string name="log_smilies">Smajlíci</string>
<string name="log_image">Obrázek</string>
<string name="log_image_attach">Připojit obrázek</string>
- <string name="log_image_edit">Upravit obrázek</string>
<string name="log_image_stored">Existující</string>
<string name="log_image_camera">Nový</string>
<string name="log_image_caption">Titulek</string>
@@ -120,6 +106,13 @@
<string name="log_password_title">Logovací heslo:</string>
<string name="log_hint_log_password">Zadej své logovací heslo</string>
<string name="log_oc_team_comment">Komentář týmu OC</string>
+ <string-array name="log_image_scales">
+ <item>Bez měřítka</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<string name="translate_to_sys_lang">Přeložit do %s</string>
<string name="translate_to_english">Přeložit do angličtiny</string>
<string name="translate_length_warning">Při velkém množství textu může překládání selhat.</string>
@@ -212,6 +205,7 @@
<string name="info_select_logimage_cancelled">Výběr nebo focení obrázku pro Log bylo zrušeno.</string>
<string name="info_stored_image">Nový obrázek uložen do:</string>
<string name="info_storing_static_maps">Pokus o uložení statických map</string>
+ <string name="info_cache_saved">Keš uložena pro lokální použití</string>
<string name="loc_last">Poslední známá</string>
<string name="loc_net">Síť</string>
<string name="loc_gps">GPS</string>
@@ -219,6 +213,7 @@
<string name="loc_trying">Zjišťování pozice</string>
<string name="loc_no_addr">Neznámá adresa</string>
<string name="loc_gps_disabled">GPS zakázáno</string>
+ <string name="menu_centerposition">Vycentrovat na mou polohu</string>
<string name="menu_about">O programu</string>
<string name="menu_helpers">Pomocné programy</string>
<string name="menu_settings">Nastavení</string>
@@ -240,12 +235,16 @@
<string name="caches_more_caches_currently">aktuálně</string>
<string name="caches_downloading">Stahování keší…\nETA:</string>
<string name="caches_eta_ltm">Méně než minutu</string>
+ <plurals name="caches_eta_mins">
+ <item quantity="one">%d minuta</item>
+ <item quantity="few">%d minuty</item>
+ <item quantity="other">%d minuty</item>
+ </plurals>
<string name="caches_store_offline">Uložit pro offline</string>
<string name="caches_store_selected">Uložit vybrané</string>
<string name="caches_history">Historie</string>
<string name="caches_on_map">Zobrazit na mapě</string>
- <string name="caches_sort">Třídit</string>
- <string name="caches_sort_title">Setřídit dle</string>
+ <string name="caches_sort">Řazení</string>
<string name="caches_sort_distance">Vzdálenosti</string>
<string name="caches_sort_difficulty">Obtížnosti</string>
<string name="caches_sort_terrain">Terénu</string>
@@ -267,23 +266,20 @@
<string name="caches_select_invert">Invertovat výběr</string>
<string name="caches_nearby">Blízké</string>
<string name="caches_manage">Správa</string>
- <string name="caches_drop_selected">Smazat vybrané</string>
- <string name="caches_drop_selected_ask">Opravdu chceš smazat vybrané keše z přístroje?</string>
- <string name="caches_drop_all">Smazat vše</string>
- <string name="caches_drop_all_ask">Opravdu chceš smazat všechny keše z tohoto seznamu?</string>
- <string name="caches_drop_stored">Smazat uložené</string>
- <string name="caches_drop_progress">Odstraňování keší</string>
- <string name="caches_drop_all_and_list">Vymazat všechny a zrušit seznam</string>
+ <string name="caches_remove_all">Odstranit vše</string>
+ <string name="caches_remove_all_confirm">Opravdu chceš smazat všechny keše (%s) z tohoto seznamu?</string>
+ <string name="caches_remove_selected">Odstranit vybrané</string>
+ <string name="caches_remove_selected_confirm">Opravdu chceš smazat vybrané keše (%s) z přístroje?</string>
+ <string name="caches_remove_progress">Odstraňování keší</string>
<string name="caches_delete_events">Vymazat staré události</string>
<string name="caches_refresh_selected">Aktualizovat vybrané</string>
<string name="caches_refresh_all">Aktualizovat vše</string>
<string name="caches_move_selected">Přesunout vybrané</string>
- <string name="caches_move_all">Přesunout všechny</string>
+ <string name="caches_move_all">Přesunout vše</string>
<string name="caches_map_locus">Locus</string>
<string name="caches_map_locus_export">Exportovat do Locusu</string>
- <string name="caches_map_mapswithme">MapsWithMe</string>
<string name="caches_recaptcha_title">reCAPTCHA</string>
- <string name="caches_recaptcha_explanation">Prosím, opiš text z obrázku. Je to nutné ke stažení souřadnic keší. Je to volitelné a může být vypnuto v Nastavení.</string>
+ <string name="caches_recaptcha_explanation">Prosím, opiš text z obrázku. Umožní to stažení souřadnic keše. Ověřování lze vypnout v Nastavení.</string>
<string name="caches_recaptcha_hint">Text z obrázku</string>
<string name="caches_recaptcha_continue">Pokračovat</string>
<string name="caches_filter">Filtr</string>
@@ -301,11 +297,10 @@
<string name="caches_removing_from_history">Čištění Historie…</string>
<string name="caches_clear_offlinelogs">Smazat offline Logy</string>
<string name="caches_clear_offlinelogs_progress">Mazání offline logů</string>
- <string name="list_menu">Seznam</string>
<string name="list_menu_create">Vytvořit nový seznam</string>
<string name="list_menu_drop">Smazat aktuální seznam</string>
- <string name="list_menu_change">Změnit seznam</string>
<string name="list_menu_rename">Přejmenovat aktuální seznam</string>
+ <string name="list_menu_import">Import</string>
<string name="list_title">Vyber seznam</string>
<string name="list_inbox">Uložené</string>
<string name="list_all_lists">Všechny keše</string>
@@ -350,32 +345,34 @@
<string name="settings_title_gc">Geocaching.com</string>
<string name="settings_title_ec">Extremcaching.com</string>
<string name="settings_title_ox">Opencaching.com (Garmin)</string>
- <string name="settings_activate_gc">Aktivace</string>
- <string name="settings_activate_ec">Aktivace</string>
- <string name="settings_activate_ox">Aktivace</string>
+ <string name="settings_activate_gc">Aktivovat</string>
+ <string name="settings_activate_ec">Aktivovat</string>
+ <string name="settings_activate_ox">Aktivovat</string>
<string name="settings_gc_legal_note">Používáním služeb Geocaching.com souhlasíš s Podmínkami použití společnosti Groundspeak.</string>
<string name="settings_info_facebook_login_title">Facebook přihlášení</string>
- <string name="settings_info_facebook_login">Přes c:geo se sice na Geocaching.com pomocí Facebook účtu nepřihlásíš, ale je tu jednoduché řešení …</string>
+ <string name="settings_info_facebook_login">Přes c:geo se sice na Geocaching.com svým Facebookovým účtem nepřihlásíš, ale je tu jednoduché řešení…</string>
<string name="settings_authorize">Autorizovat c:geo</string>
<string name="settings_reauthorize">Znovu autorizovat c:geo</string>
<string name="init_oc">opencaching.de</string>
- <string name="settings_activate_oc">Aktivace opencaching.de na Aktivní mapě a ve vyhledávání</string>
+ <string name="settings_activate_oc">Aktivovat</string>
<string name="init_oc_de_description">Autorizovat c:geo pro hledání keší a přístup/filtrování tvých nalezených keší služby opencaching.de.</string>
<string name="init_oc_pl">Opencaching.pl</string>
- <string name="settings_activate_oc_pl">Aktivace</string>
+ <string name="settings_activate_oc_pl">Aktivovat</string>
<string name="init_oc_pl_description">Autorizovat c:geo pro hledání keší a přístup/filtrování tvých nalezených keší služby opencaching.pl.</string>
<string name="init_oc_nl">Opencaching.nl</string>
- <string name="settings_activate_oc_nl">Aktivace</string>
+ <string name="settings_activate_oc_nl">Aktivovat</string>
<string name="init_oc_nl_description">Autorizovat c:geo pro hledání keší a přístup/filtrování tvých nalezených keší služby opencaching.nl.</string>
<string name="init_oc_us">Opencaching.us</string>
- <string name="settings_activate_oc_us">Aktivace</string>
+ <string name="settings_activate_oc_us">Aktivovat</string>
<string name="init_oc_us_description">Autorizovat c:geo pro hledání keší a přístup/filtrování tvých nalezených keší služby opencaching.us.</string>
<string name="init_oc_ro">Opencaching.ro</string>
- <string name="settings_activate_oc_ro">Aktivace</string>
+ <string name="settings_activate_oc_ro">Aktivovat</string>
<string name="init_oc_ro_description">Autorizovat c:geo pro hledání keší a přístup/filtrování tvých nalezených keší služby opencaching.ro.</string>
+ <string name="settings_activate_oc_uk">Aktivovat</string>
+ <string name="init_oc_uk_description">Autorizovat c:geo pro hledání keší a přístup/filtrování tvých nalezených keší služby opencaching.org.uk.</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
- <string name="settings_activate_twitter">Aktivace</string>
+ <string name="settings_activate_twitter">Povolit</string>
<string name="init_username">Uživatelské jméno</string>
<string name="init_password">Heslo</string>
<string name="init_login">Zkontrolovat</string>
@@ -400,41 +397,41 @@
<string name="init_signature_template_name">Jméno</string>
<string name="init_signature_template_url">URL</string>
<string name="init_signature_template_log">Text logu</string>
- <string name="init_ratingwanted">Načítat hodnocení keše z GCvote.com</string>
- <string name="init_summary_ratingwanted">Načítat hodnocení keše z GCvote.com</string>
- <string name="init_friendlogswanted">Načítat doplňkový Logbook s logy od kámošů</string>
- <string name="init_summary_friendlogswanted">Načítat doplňkový Logbook s logy od kámošů</string>
- <string name="init_openlastdetailspage">Otevřít detaily na naposledy použité stránce</string>
- <string name="init_summary_openlastdetailspage">Otevřít detaily na naposledy použité stránce</string>
- <string name="init_autoload">Automaticky načítat dlouhý popis</string>
+ <string name="init_ratingwanted">Načítat hodnocení</string>
+ <string name="init_summary_ratingwanted">Načítat hodnocení keší z GCvote.com</string>
+ <string name="init_friends_and_own_logs_wanted">Zobrazovat mé logy a logy přátel</string>
+ <string name="init_summary_friends_and_own_logs_wanted">Zobrazovat další Logbook s mými logy a logy přátel</string>
+ <string name="init_openlastdetailspage">Otevřít poslední stránku</string>
+ <string name="init_summary_openlastdetailspage">Otevřít detaily keše na naposledy použité stránce</string>
+ <string name="init_autoload">Dlouhý popis</string>
<string name="init_summary_autoload">Automaticky načítat dlouhý popis</string>
- <string name="init_skin">Používat světlý vzhled\n(Vyžaduje restart)</string>
- <string name="init_summary_skin">Používat světlý vzhled\n(Vyžaduje restart)</string>
- <string name="init_address">Zobrazovat adresu na hlavní obrazovce</string>
+ <string name="init_skin">Používat světlý vzhled</string>
+ <string name="init_summary_skin">Používat světlý vzhled (Vyžaduje restart)</string>
+ <string name="init_address">Zobrazovat adresu</string>
<string name="init_summary_address">Zobrazovat adresu místo souřadnic na hlavní obrazovce</string>
- <string name="init_captcha">Zobrazovat obrázek CAPTCHA, pokud je třeba (pouze Běžní uživatelé)</string>
+ <string name="init_captcha">Zobrazovat CAPTCHu</string>
<string name="init_summary_captcha">Zobrazit obrázek CAPTCHA, pokud je třeba (pouze Běžní členové)</string>
- <string name="init_useenglish">Používat angličtinu pro c:geo\n(Vyžaduje restart)</string>
+ <string name="init_useenglish">Používat angličtinu</string>
<string name="init_summary_useenglish">Používat angličtinu pro c:geo\n(Vyžaduje restart)</string>
- <string name="init_exclude">Nezobrazovat mé vlastní a nalezené keše</string>
+ <string name="init_exclude">Nezobrazovat vlastní a nalezené keše</string>
<string name="init_summary_exclude">Nezobrazovat mé vlastní a nalezené keše</string>
<string name="init_showwaypoints">Zobrazovat body trasy na Aktivní mapě</string>
<string name="init_showwaypoint_description">Pokud je na mapě zobrazeno méně než zadaný počet keší, zobrazují se i jejich body trasy.</string>
<string name="init_disabled">Nezobrazovat deaktivované keše</string>
<string name="init_summary_disabled">Nezobrazovat deaktivované keše</string>
- <string name="init_offline">Ukládat mapy pro offline použití</string>
- <string name="init_summary_offline">Ukládat mapy pro offline použití</string>
- <string name="init_offline_wp">Ukládat statické mapy k bodům trasy pro offline použití</string>
+ <string name="init_offline">Statické mapy</string>
+ <string name="init_summary_offline">Ukládat statické mapy ke keším pro offline použití</string>
+ <string name="init_offline_wp">Statické mapy bodů trasy</string>
<string name="init_summary_offline_wp">Ukládat statické mapy k bodům trasy pro offline použití</string>
- <string name="init_save_log_img">Ukládat obrázky z logů</string>
+ <string name="init_save_log_img">Ukládat obrázky</string>
<string name="init_summary_save_log_img">Ukládat obrázky z logů</string>
- <string name="init_units">Používat imperiální jednotky vzdálenosti</string>
+ <string name="init_units">Používat imperiální jednotky</string>
<string name="init_summary_units">Používat imperiální jednotky vzdálenosti</string>
- <string name="init_log_offline">Povolit Offline logování\n(Při logování nezobrazovat online logovací obrazovku a neodesílat Log na server)</string>
+ <string name="init_log_offline">Povolit offline logování</string>
<string name="init_summary_log_offline">Povolit Offline logování\n(Při logování nezobrazovat online logovací obrazovku a neodesílat Log na server)</string>
- <string name="init_choose_list">Ptát se na seznam pro uložení keše</string>
+ <string name="init_choose_list">Ptát se na seznam</string>
<string name="init_summary_choose_list">Ptát se na seznam pro uložení keše</string>
- <string name="init_livelist">Zobrazovat směr v seznamu keší</string>
+ <string name="init_livelist">Zobrazovat směr</string>
<string name="init_summary_livelist">Zobrazovat směr v seznamu keší</string>
<string name="init_backup">Záloha</string>
<string name="init_backup_backup">Zálohovat</string>
@@ -453,17 +450,17 @@
<string name="settings_info_offline_maps_title">Info o Offline mapách</string>
<string name="settings_info_offline_maps">c:geo podporuje používání offline map. Mapy si můžeš stáhnout z Mapsforge a nebo si vytvořit vlastní z dat Open Street Map (OSM). Aby bylo možné offline mapy používat, musíš nejprve zvolit místo jejich uložení.</string>
<string name="settings_info_themes_title">Info o stylech mapy</string>
- <string name="settings_info_themes">c:geo podporuje vlastní styly pro offline mapy. Ty mohou být použity pro změnu barevného stylu mapy (např. noční mapa), pro zvýranění důležitých objektů (jako jsou např. cykloztezky) nebo pro určení šířky čar.</string>
+ <string name="settings_info_themes">c:geo podporuje vlastní styly pro offline mapy. Ty mohou být použity pro změnu barevného stylu mapy (např. noční mapa), pro zvýraznění důležitých objektů (jako jsou např. cykloztezky) nebo pro určení šířky čar.</string>
<string name="init_mapsource_select">Vyber mapový zdroj</string>
<string name="settings_title_scale_map_text">Měřítko textu mapy</string>
<string name="settings_summary_scale_map_text">Velikost textových popisků offline mapy dle DPI zařízení</string>
<string name="init_map_directory_description">Složka s offline mapami</string>
<string name="init_gpx_exportdir">Složka pro GPX export</string>
<string name="init_gpx_importdir">Složka pro GPX import</string>
- <string name="init_maptrail">Zobrazit trasu na mapě</string>
- <string name="init_summary_maptrail">Zobrazit trasu na mapě</string>
+ <string name="init_maptrail">Zobrazovat trasu cesty</string>
+ <string name="init_summary_maptrail">Zobrazovat na mapě trasu cesty</string>
<string name="init_share_after_export">Po exportování GPX otevřít menu sdílení</string>
- <string name="init_trackautovisit">Nastavit sledovatelné předměty na \"Navštíveno\" jako výchozí</string>
+ <string name="init_trackautovisit">Nastavit TB na \"Navštíveno\"</string>
<string name="init_summary_trackautovisit">Nastavit sledovatelné předměty na \"Navštíveno\" jako výchozí</string>
<string name="init_sigautoinsert">Vkládat podpis automaticky</string>
<string name="init_loaddirectionimg">V případě potřeby stahovat směrový obrázek (pouze Běžní členové)</string>
@@ -476,10 +473,10 @@
<string name="init_navigation_menu_description">Zde můžeš zvolit, které z dostupných metod navigace budou zobrazovány v navigačním menu keše nebo bodu trasy. Nedostupné nástroje nejsou na tomto zařízení nainstalovány.</string>
<string name="init_debug_title">Ladící informace</string>
<string name="init_debug_note">c:geo může generovat mnoho ladících informací. Tyto informace nejsou pro běžné uživatele užitečné, ale pro vývojáře mohou být užitečné při hledání problému. V případě potřeby zaškrtni tuto volbu a pošli jim vygenerovaný soubor.</string>
- <string name="init_debug">Aktivace ladícího protokolování</string>
+ <string name="init_debug">Aktivovat ladící protokolování</string>
<string name="init_dbonsdcard_title">Umístění databáze</string>
<string name="init_dbonsdcard_note">Databáze c:geo může být umístěna na SD kartě. Ušetříš tím část interní paměti, avšak za cenu případného snížení rychlosti aplikace. Bez SD karty aplikace nebude následně fungovat.</string>
- <string name="init_dbonsdcard">Na SD kartě</string>
+ <string name="init_dbonsdcard">Databáze na SD kartě</string>
<string name="init_dbmove_dbmove">Přesun databáze</string>
<string name="init_dbmove_running">Přesouvání databáze</string>
<string name="init_dbmove_success">Databáze úspěšně přesunuta.</string>
@@ -488,10 +485,13 @@
<string name="init_summary_plain_logs">Zobrazovat logy bez barev</string>
<string name="init_use_native_ua">Identifikovat se jako webový prohlížeč Android. Řeší problémy v některých sítích.</string>
<string name="init_summary_use_native_ua">Identifikovat se jako webový prohlížeč Android. Řeší problémy v některých sítích.</string>
- <string name="init_rendertheme_folder">Složka témat mapy</string>
+ <string name="init_rendertheme_folder">Složka se styly map</string>
<string name="init_maintenance">Údržba</string>
<string name="init_maintenance_directories_note">c:geo ukládá obrázky, obrázky z logů a další soubory vázané ke keši v samostatném adresáři. V některých případech (jako import/export databáze) může tento adresář obsahovat staré soubory, které se zde dají smazat.</string>
<string name="init_maintenance_directories">Odstranit osamocené soubory</string>
+ <string name="init_create_memory_dump">Vytvořit výpis paměti</string>
+ <string name="init_memory_dump">Výpis stavu paměti</string>
+ <string name="init_memory_dumped">Paměť vypsána do %s</string>
<string name="settings_open_website">Otevřít webovou stránku</string>
<string name="settings_settings">Nastavení</string>
<string name="settings_information">Informace</string>
@@ -519,12 +519,12 @@
<string name="map_source_osm_cyclemap">OSM: Cyklomapa</string>
<string name="map_source_osm_offline">Offline</string>
<string name="init_sendToCgeo">Poslat do c:geo</string>
- <string name="settings_info_send2cgeo_title">Info o send2c:geo</string>
+ <string name="settings_info_send2cgeo_title">Info o funkci send2c:geo</string>
<string name="init_sendToCgeo_name">Název tvého zařízení</string>
- <string name="init_sendToCgeo_description"><b>Send2c:geo</b> umožňuje stahovat keše přímo ze stránky Geocaching.com pomocí speciálního pluginu pro Firefox a Chrome. Před registrací zkoukni <a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a>. Pokud chceš používat funkci send2c:geo, musíš se zaregistrovat. c:geo bude pracovat normálně i bez registrace.</string>
+ <string name="init_sendToCgeo_description">Funkce <b>Send2c:geo</b> umožňuje stahovat keše přímo ze stránky Geocaching.com pomocí speciálního doplňku pro webové prholížeče. Před registrací zkoukni <a href="http://send2.cgeo.org/">http://send2.cgeo.org/</a>. Pokud chceš používat funkci send2c:geo, musíš se zaregistrovat. c:geo může samozřejmě pracovat normálně i bez registrace této funkce.</string>
<string name="init_sendToCgeo_register">Požádat o registraci</string>
<string name="init_sendToCgeo_registering">Registrace tvého zařízení pro funkci Poslat do c:geo…</string>
- <string name="init_sendToCgeo_register_ok">Registrace úspěšně dokončena. PIN kód je ####. Použij ho na stránce c:geo pro přidání zařízení do Tvého prohlížeče.</string>
+ <string name="init_sendToCgeo_register_ok">Registrace úspěšně dokončena. PIN kód je ####. Použij ho na stránce c:geo pro přidání zařízení do tvého prohlížeče.</string>
<string name="init_sendToCgeo_register_fail">Registrace selhala.</string>
<string name="sendToCgeo_download_fail">c:geo selhalo při stahování keší. Nefunguje internetové připojení nebo je služba send2c:geo vypnutá.</string>
<string name="sendToCgeo_no_registration">c:geo selhalo při stahování keší. Registrace pro send2c:geo vypršela. Prosím, registruj se znova v nastavení.</string>
@@ -536,7 +536,7 @@
<string name="auth_explain_short">Následující proces umožní <b>c:geu</b> přístup k %s.</string>
<string name="auth_explain_long">Stisknutím tlačítka \"Autorizovat c:geo\" bude proces zahájen. Tento proces otevře webový prohlížeč se stránkou %s. Na této stránce se přihlaš a povol <b>c:geu</b> přistupovat k tvému účtu. To je vše.</string>
<string name="auth_dialog_completed_twitter">c:geo nyní může posílat zprávy na Tvůj Twitter.</string>
- <string name="auth_ocde">opencaching.de</string>
+ <string name="auth_ocde">Opencaching.de</string>
<string name="auth_ocpl">opencaching.pl</string>
<string name="auth_ocnl">opencaching.nl</string>
<string name="auth_ocus">opencaching.us</string>
@@ -557,7 +557,6 @@
<string name="cache_premium">Prémiový účet</string>
<string name="cache_attributes">Atributy</string>
<string name="cache_inventory">Inventář</string>
- <string name="cache_log_offline">Offline Log</string>
<string name="cache_log_images_title">Obrázky z Logů</string>
<string name="cache_log_image_default_title">Fotografie</string>
<string name="cache_personal_note">Osobní poznámka</string>
@@ -568,8 +567,6 @@
<string name="cache_personal_note_uploading">Nahrávání osobní poznámky</string>
<string name="cache_personal_note_upload_done">Osobní poznámka nahrána</string>
<string name="cache_personal_note_upload_cancelled">Nahrávání osobní poznámky přerušeno</string>
- <string name="cache_personal_note_unstored">Keš neuložena</string>
- <string name="cache_personal_note_store">Keš bude nejdříve uložena kvůli povolení osobních poznámek.</string>
<string name="cache_description">Popis</string>
<string name="cache_description_long">Dlouhý popis</string>
<string name="cache_description_table_note">Popis obsahuje tabulkové formátování, které je pravděpodobně nutné prohlížet na %s, aby bylo správně zobrazené.</string>
@@ -586,10 +583,15 @@
<string name="cache_list_unknown">Není v seznamu</string>
<string name="cache_images">Obrázky</string>
<string name="cache_waypoints">Body trasy</string>
+ <plurals name="waypoints">
+ <item quantity="one">1 bod trasy</item>
+ <item quantity="few">%d bodů trasy</item>
+ <item quantity="other">%d body trasy</item>
+ </plurals>
<string name="cache_waypoints_add">Přidat Bod trasy</string>
<string name="cache_hint">Nápověda</string>
<string name="cache_logs">Logbook</string>
- <string name="cache_logsfriends">Logbook (Přátelé)</string>
+ <string name="cache_logs_friends_and_own">Moje logy a logy přátel</string>
<string name="cache_dialog_loading_details">Načítání detailů keše…</string>
<string name="cache_dialog_loading_details_status_loadpage">Načítání stránky</string>
<string name="cache_dialog_loading_details_status_details">Zpracovávání podrobností</string>
@@ -599,7 +601,7 @@
<string name="cache_dialog_loading_details_status_gcvote">Načítání GCVote</string>
<string name="cache_dialog_loading_details_status_cache">Ukládání do mezipaměti</string>
<string name="cache_dialog_loading_details_status_render">Vykreslování pohledu</string>
- <string name="cache_dialog_offline_save_title">Offline</string>
+ <string name="cache_dialog_offline_save_title">Offline použití</string>
<string name="cache_dialog_offline_save_message">Ukládání keše pro offline použití…</string>
<string name="cache_dialog_offline_drop_title">Offline</string>
<string name="cache_dialog_offline_drop_message">Odstraňování keše z paměti zařízení…</string>
@@ -635,16 +637,14 @@
<string name="cache_menu_refresh">Obnovit</string>
<string name="cache_menu_share">Sdílet keš</string>
<string name="cache_menu_move_list">Přesunout do jiného seznamu</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">Cache Beacon</string>
<string name="cache_menu_navigon">Navigon</string>
<string name="cache_menu_pebble">Pebble</string>
- <string name="cache_menu_mapswithme">MapsWithMe</string>
<string name="cache_status">Stav</string>
<string name="cache_status_offline_log">Připravený Log</string>
<string name="cache_status_found">Nalezena</string>
+ <string name="cache_not_status_found">Nenalezeno</string>
<string name="cache_status_archived">Archivována</string>
<string name="cache_status_disabled">Deaktivována</string>
<string name="cache_status_premium">Pouze pro prémiové uživatele</string>
@@ -756,10 +756,7 @@
<string name="map_view_map">Vybrat typ mapy</string>
<string name="map_modes">Režimy mapy</string>
<string name="map_trail_show">Zobrazit záznam trasy</string>
- <string name="map_trail_hide">Skrýt záznam trasy</string>
<string name="map_circles_show">Zobrazit kruhy</string>
- <string name="map_circles_hide">Skrýt kruhy</string>
- <string name="map_mycaches_show">Zobrazovat vlastní/nalezené keše</string>
<string name="map_mycaches_hide">Skrývat vlastní/nalezené keše</string>
<string name="map_theme_builtin">Výchozí</string>
<string name="map_theme_select">Vyber téma mapy</string>
@@ -839,23 +836,23 @@
<string name="user_menu_open_contact">Otevřít kartu kontaktu</string>
<string name="navigation">Navigace</string>
<string name="compass_title">Kompas</string>
+ <string name="compass_sensors">Aktivovat senzory</string>
<string name="use_gps">Použít GPS</string>
<string name="use_compass">Použít kompas</string>
<string name="destination_select">Vyber cíl</string>
- <string name="destination_set">Cíl nastaven</string>
<string name="navigation_direct_navigation">Přímá navigace</string>
<string name="navigation_target">Cíl</string>
<string name="err_nav_no_coordinates">Nelze spustit navigaci bez souřadnic</string>
<string name="license">Licence</string>
<string name="license_show">Zobrazit licenci</string>
<string name="license_dismiss">Zamítnout</string>
- <string name="helper_calendar_title">c:geo modul kalendáře</string>
+ <string name="helper_calendar_title">c:geo - Kalendář (doplněk)</string>
<string name="helper_calendar_missing">Doplněk pro c:geo - Kalendář není nainstalován.</string>
<string name="helper_calendar_description">Umožňuje exportovat události keší do tvého kalendáře.</string>
<string name="helper_sendtocgeo_title">Poslat do c:geo</string>
<string name="helper_contacts_title">c:geo - kontakty (doplněk)</string>
<string name="helper_contacts_description">Umožňuje otevřít vizitku (z tvého seznamu kontaktů) přímo z logu keše, můžeš tak snadněji kontaktovat kamarády o pomoc.</string>
- <string name="helper_sendtocgeo_description">Odeslat do c:geo (Send to c:geo) je rozšíření prohlížeče <strong>pro tvůj počítač</strong>. Umožňuje zaslání keše do tvého mobilního zařízení jediným klepnutím, přímo z prohlížeče, při procházení webu Geocaching.com.</string>
+ <string name="helper_sendtocgeo_description">Poslat do c:geo (Send2c:geo) je rozšíření prohlížeče <strong>pro tvůj počítač</strong>. Umožňuje zaslání keše do tvého mobilního zařízení jediným klepnutím, přímo z prohlížeče, při procházení webu Geocaching.com.</string>
<string name="helper_locus_title">Locus</string>
<string name="helper_locus_description">Jednoduše použitelná aplikace zobrazující Online mapy a dovolující je přímo stahovat pro Offline použití (pouze rastrové mapy). Také podporuje záznam trasy, zpracování bodů zájmu a další užitečné funkce.</string>
<string name="helper_gpsstatus_title">GPS Status</string>
@@ -1014,7 +1011,7 @@
<string name="attribute_food_yes">Jídlo poblíž</string>
<string name="attribute_food_no">Žádné jídlo poblíž</string>
<string name="attribute_oc_only_yes">Zapisovatelné pouze na Opencachingu</string>
- <string name="attribute_oc_only_no">Zapisovatelné nejen Opencachingu</string>
+ <string name="attribute_oc_only_no">Zapisovatelné nejen na Opencachingu</string>
<string name="attribute_link_only_yes">Pouze odkaz na jiný geocachingový portál</string>
<string name="attribute_link_only_no">Není jen odkazem na jiný geocachingový portál</string>
<string name="attribute_letterbox_yes">Letterbox (potřebujete razítko)</string>
@@ -1113,7 +1110,6 @@
<string name="website">Stránka: <a href="">cgeo.org</a></string>
<string name="facebook">Facebook: <a href="">Stránka c:geo</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Návod: <a href="">c:geo v Nutshell</a></string>
<string name="market">Android: <a href="">c:geo na Google Play</a></string>
<string name="about_twitter">Má <b>c:geo</b> publikovat nový status na Twitteru vždy, když zaloguješ keš?</string>
<string name="faq">FAQ: <a href="">faq.cgeo.org</a></string>
@@ -1138,16 +1134,5 @@
<string name="percent_favorite_points">%\ oblíbené</string>
<string name="cgeo_shortcut">c:geo zástupce</string>
<string name="create_shortcut">Vytvořit zástupce</string>
- <string-array name="log_image_scales">
- <item>Bez měřítka</item>
- <item>512 px</item>
- <item>640 px</item>
- <item>800 px</item>
- <item>1024 px</item>
- </string-array>
- <plurals name="caches_eta_mins">
- <item quantity="one">minuta</item>
- <item quantity="few">minuty</item>
- <item quantity="other">minuty</item>
- </plurals>
+ <string name="send">Odeslat</string>
</resources>
diff --git a/main/res/values-da/strings.xml b/main/res/values-da/strings.xml
index e3d3ba4..7b0be1b 100644
--- a/main/res/values-da/strings.xml
+++ b/main/res/values-da/strings.xml
@@ -9,7 +9,6 @@
<string name="about">Om c:geo</string>
<string name="latitude">Breddegrad</string>
<string name="longitude">Længdegrad</string>
- <string name="action_bar_share_title">Del link til cache</string>
<string name="settings_titlebar">c:geo Indstillinger</string>
<string name="all_types">Alle Cache typer</string>
<string name="traditional">Traditionel cache</string>
@@ -71,17 +70,7 @@
<string name="log_save">Gem</string>
<string name="log_clear">Fjern</string>
<string name="log_add">Tilføj</string>
- <string name="log_rating">Vurdering</string>
<string name="log_no_rating">Ingen vurdering</string>
- <string name="log_stars_1">1 stjerne</string>
- <string name="log_stars_15">1,5 stjerner</string>
- <string name="log_stars_2">2 stjerner</string>
- <string name="log_stars_25">2,5 stjerner</string>
- <string name="log_stars_3">3 stjerner</string>
- <string name="log_stars_35">3,5 stjerner</string>
- <string name="log_stars_4">4 stjerner</string>
- <string name="log_stars_45">4,5 stjerner</string>
- <string name="log_stars_5">5 stjerner</string>
<string name="log_stars_15_description">Temmelig dårlig</string>
<string name="log_stars_2_description">Under gennemsnittet</string>
<string name="log_stars_25_description">Ikke så slemt</string>
@@ -161,6 +150,10 @@
<string name="auth_authorize">Godkend c:geo</string>
<string name="auth_start">Start godkendelse</string>
<string name="auth_again">Start igen</string>
+ <plurals name="cache_counts">
+ <item quantity="one">En cache</item>
+ <item quantity="other">%1$d cacher</item>
+ </plurals>
<string name="cache_offline">Offline</string>
<string name="cache_offline_refresh">Genindlæs</string>
<string name="cache_offline_drop">Fjern</string>
@@ -175,7 +168,6 @@
<string name="cache_offline_time_days">dage siden</string>
<string name="cache_attributes">Attributter</string>
<string name="cache_inventory">Inventar</string>
- <string name="cache_log_offline">Offline log</string>
<string name="cache_description">Beskrivelse</string>
<string name="cache_description_long">Lang beskrivelse</string>
<string name="cache_waypoints">Waypoints</string>
@@ -235,7 +227,6 @@
<string name="map_live">Live-kort</string>
<string name="map_view_map">Kort-view</string>
<string name="map_trail_show">Vis spor</string>
- <string name="map_trail_hide">Skjul spor</string>
<string name="map_live_enable">Aktivér live</string>
<string name="map_live_disable">Deaktivér live</string>
<string name="search_coordinates">Koordinater</string>
@@ -264,8 +255,4 @@
<string name="facebook">Facebook: <a href="http://www.facebook.com/pages/cgeo/297269860090">c:geo page</a></string>
<string name="twitter">Twitter: <a href="http://twitter.com/android_gc">@android_GC</a></string>
<string name="about_twitter">Skal <b>c:geo</b> sende status til Twitter hvergang du logger en cache?</string>
- <plurals name="cache_counts">
- <item quantity="one">En cache</item>
- <item quantity="other">%1$d cacher</item>
- </plurals>
</resources>
diff --git a/main/res/values-de/strings.xml b/main/res/values-de/strings.xml
index 9180f5e..8f6c069 100644
--- a/main/res/values-de/strings.xml
+++ b/main/res/values-de/strings.xml
@@ -9,7 +9,6 @@
<string name="about">Über c:geo</string>
<string name="latitude">Breitengrad</string>
<string name="longitude">Längengrad</string>
- <string name="action_bar_share_title">Link versenden</string>
<string name="settings_titlebar">c:geo Einstellungen</string>
<string name="all_types">Alle Caches</string>
<string name="traditional">Traditional-Cache</string>
@@ -79,22 +78,9 @@
<string name="log_saving">Log wird gesendet…</string>
<string name="log_saving_and_uploading">Log und Bild werden gesendet…</string>
<string name="log_clear">Leeren</string>
- <string name="log_post">Loggen</string>
- <string name="log_post_rate">Loggen &amp; bewerten</string>
- <string name="log_post_no_rate">Loggen ohne Bewertung</string>
<string name="log_post_not_possible">Lade Log-Seite…</string>
<string name="log_add">Hinzufügen</string>
- <string name="log_rating">Bewertung</string>
<string name="log_no_rating">Keine Bewertung</string>
- <string name="log_stars_1">1 Stern</string>
- <string name="log_stars_15">1,5 Sterne</string>
- <string name="log_stars_2">2 Sterne</string>
- <string name="log_stars_25">2,5 Sterne</string>
- <string name="log_stars_3">3 Sterne</string>
- <string name="log_stars_35">3,5 Sterne</string>
- <string name="log_stars_4">4 Sterne</string>
- <string name="log_stars_45">4,5 Sterne</string>
- <string name="log_stars_5">5 Sterne</string>
<string name="log_stars_1_description">Schlecht</string>
<string name="log_stars_15_description">Lohnt sich nicht</string>
<string name="log_stars_2_description">Schwach</string>
@@ -113,7 +99,6 @@
<string name="log_smilies">Smilies</string>
<string name="log_image">Bild</string>
<string name="log_image_attach">Bild hinzufügen</string>
- <string name="log_image_edit">Bild bearbeiten</string>
<string name="log_image_stored">Vorhanden</string>
<string name="log_image_camera">Neu</string>
<string name="log_image_caption">Überschrift</string>
@@ -122,6 +107,13 @@
<string name="log_password_title">Log-Passwort:</string>
<string name="log_hint_log_password">Log-Passwort eingeben</string>
<string name="log_oc_team_comment">OC Team Bemerkung</string>
+ <string-array name="log_image_scales">
+ <item>Keine Skalierung</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<string name="translate_to_sys_lang">Übersetze in %s</string>
<string name="translate_to_english">Übersetze in Englisch</string>
<string name="translate_length_warning">Die Übersetzung kann bei sehr langen Texten evtl. fehlschlagen.</string>
@@ -214,6 +206,7 @@
<string name="info_select_logimage_cancelled">Fotoauswahl oder -erstellung abgebrochen.</string>
<string name="info_stored_image">Neues Foto gespeichert nach:</string>
<string name="info_storing_static_maps">Versuche, statische Karten zu speichern</string>
+ <string name="info_cache_saved">Der Cache wurde gespeichert</string>
<string name="loc_last">Letzte Position</string>
<string name="loc_net">Netzwerk</string>
<string name="loc_gps">GPS</string>
@@ -221,14 +214,15 @@
<string name="loc_trying">Lokalisierung</string>
<string name="loc_no_addr">Adresse unbekannt</string>
<string name="loc_gps_disabled">GPS nicht aktiv</string>
- <string name="menu_about">über c:geo</string>
+ <string name="menu_centerposition">Zentriere meine Position</string>
+ <string name="menu_about">Über c:geo</string>
<string name="menu_helpers">Nützliche Apps</string>
<string name="menu_settings">Einstellungen</string>
<string name="menu_history">Verlauf</string>
<string name="menu_filter">Filter</string>
<string name="menu_scan_geo">Geocode scannen</string>
<string name="menu_pocket_queries">Pocket Queries</string>
- <string name="menu_scan_description">c:geo kann Geocodes, die als QR code abgebildet sind scannen. Die dafür notwendige App ist nicht installiert. Wollen sie Google Play öffnen, um sie zu installieren?</string>
+ <string name="menu_scan_description">c:geo kann Geocodes scannen, die als QR-Code abgebildet sind. Die dafür notwendige App ist nicht installiert. Möchten Sie Google Play öffnen, um sie zu installieren?</string>
<string name="live_map_button">Live-Karte</string>
<string name="caches_nearby_button">In der Nähe</string>
<string name="advanced_search_button">Suche</string>
@@ -242,12 +236,15 @@
<string name="caches_more_caches_currently">aktuell</string>
<string name="caches_downloading">Lade Caches…\nGeschätzte Zeit: </string>
<string name="caches_eta_ltm">Weniger als eine Minute</string>
+ <plurals name="caches_eta_mins">
+ <item quantity="one">%d Minute</item>
+ <item quantity="other">%d Minuten</item>
+ </plurals>
<string name="caches_store_offline">Für Offline speichern</string>
<string name="caches_store_selected">Ausgewählte speichern</string>
<string name="caches_history">Verlauf</string>
<string name="caches_on_map">Zeige auf Karte</string>
<string name="caches_sort">Sortierung</string>
- <string name="caches_sort_title">Sortieren nach</string>
<string name="caches_sort_distance">Entfernung</string>
<string name="caches_sort_difficulty">Schwierigkeit</string>
<string name="caches_sort_terrain">Gelände</string>
@@ -269,13 +266,11 @@
<string name="caches_select_invert">Auswahl invertieren</string>
<string name="caches_nearby">In der Nähe</string>
<string name="caches_manage">Verwalten</string>
- <string name="caches_drop_selected">Ausgewählte löschen</string>
- <string name="caches_drop_selected_ask">Sollen die ausgewählten Caches wirklich vom Gerät gelöscht werden?</string>
- <string name="caches_drop_all">Alle löschen</string>
- <string name="caches_drop_all_ask">Sollen wirklich alle Caches von dieser Liste gelöscht werden?</string>
- <string name="caches_drop_stored">Gespeicherte löschen</string>
- <string name="caches_drop_progress">Entferne Caches…</string>
- <string name="caches_drop_all_and_list">Alle Caches und Liste löschen</string>
+ <string name="caches_remove_all">Alle löschen</string>
+ <string name="caches_remove_all_confirm">Sollen alle %s Caches gelöscht werden?</string>
+ <string name="caches_remove_selected">Ausgewählte löschen</string>
+ <string name="caches_remove_selected_confirm">Sollen die %s Caches gelöscht werden?</string>
+ <string name="caches_remove_progress">Entferne Caches…</string>
<string name="caches_delete_events">Vergangene Events löschen</string>
<string name="caches_refresh_selected">Ausgewählte aktualisieren</string>
<string name="caches_refresh_all">Alle aktualisieren</string>
@@ -283,7 +278,6 @@
<string name="caches_move_all">Alle verschieben</string>
<string name="caches_map_locus">Locus</string>
<string name="caches_map_locus_export">Exportieren nach Locus</string>
- <string name="caches_map_mapswithme">MapsWithMe</string>
<string name="caches_recaptcha_title">reCAPTCHA</string>
<string name="caches_recaptcha_explanation">Bitte Text vom Bild abschreiben. Wichtig, um Koordinaten des Caches laden zu können. Dies ist optional und kann in den Einstellungen deaktiviert werden.</string>
<string name="caches_recaptcha_hint">Text vom Bild</string>
@@ -303,11 +297,10 @@
<string name="caches_removing_from_history">Lösche aus Verlauf…</string>
<string name="caches_clear_offlinelogs">Offline-Logs löschen</string>
<string name="caches_clear_offlinelogs_progress">Lösche Offline-Logs</string>
- <string name="list_menu">Liste</string>
<string name="list_menu_create">Neue Liste</string>
<string name="list_menu_drop">Aktuelle Liste löschen</string>
- <string name="list_menu_change">Andere Liste anzeigen</string>
<string name="list_menu_rename">Aktuelle Liste umbenennen</string>
+ <string name="list_menu_import">Importieren</string>
<string name="list_title">Liste wählen</string>
<string name="list_inbox">Standardliste</string>
<string name="list_all_lists">Alle</string>
@@ -357,7 +350,7 @@
<string name="settings_activate_ox">Aktivieren</string>
<string name="settings_gc_legal_note">Mit Benutzung der Dienste von geocaching.com werden die Groundspeak-Nutzungsbedingungen (englisch) akzeptiert.</string>
<string name="settings_info_facebook_login_title">Facebook-Login</string>
- <string name="settings_info_facebook_login">c:geo kann sich zwar nicht per Facebook bei Geocaching.com einloggen, aber es gibt eine einfache Abhilfe …</string>
+ <string name="settings_info_facebook_login">c:geo kann sich zwar nicht per Facebook bei Geocaching.com einloggen, aber es gibt eine einfache Abhilfe…</string>
<string name="settings_authorize">c:geo autorisieren</string>
<string name="settings_reauthorize">c:geo neu autorisieren</string>
<string name="init_oc">Opencaching.de</string>
@@ -375,6 +368,8 @@
<string name="init_oc_ro">Opencaching.ro</string>
<string name="settings_activate_oc_ro">Aktivieren</string>
<string name="init_oc_ro_description">Autorisiere c:geo auf opencaching.ro zuzugreifen um Caches zu suchen und nach deinen Funden zu filtern.</string>
+ <string name="settings_activate_oc_uk">Aktivieren</string>
+ <string name="init_oc_uk_description">Autorisiere c:geo auf opencaching.org.uk zuzugreifen um Caches zu suchen und nach deinen Funden zu filtern.</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="settings_activate_twitter">Aktivieren</string>
@@ -404,8 +399,8 @@
<string name="init_signature_template_log">Log text</string>
<string name="init_ratingwanted">GCvote-Bewertung</string>
<string name="init_summary_ratingwanted">Lade Cache-Bewertung von GCvote.com</string>
- <string name="init_friendlogswanted">Logs von Freunden zeigen</string>
- <string name="init_summary_friendlogswanted">Lade zusätzliche Logbuch-Seite für Logs von Freunden</string>
+ <string name="init_friends_and_own_logs_wanted">Eigene und Logs von Freunden zeigen</string>
+ <string name="init_summary_friends_and_own_logs_wanted">Lade zusätzliche Logbuch-Seiten für eigene und Logs von Freunden</string>
<string name="init_openlastdetailspage">Zuletzt genutzte Seite</string>
<string name="init_summary_openlastdetailspage">Öffne Details mit zuletzt genutzter Seite</string>
<string name="init_autoload">Ausführliche Beschreibung</string>
@@ -433,7 +428,7 @@
<string name="init_units">Imperiale Einheiten</string>
<string name="init_summary_units">Imperiale Einheiten (Meilen/Fuß)</string>
<string name="init_log_offline">Offline loggen</string>
- <string name="init_summary_log_offline">Offline loggen aktivieren (Dialog für Online-Log wird nicht angezeigt beim loggen, Logs werden nicht hochgeladen)</string>
+ <string name="init_summary_log_offline">Offline loggen aktivieren (Dialog für Online-Log wird beim loggen nicht angezeigt, Logs werden nicht hochgeladen)</string>
<string name="init_choose_list">Nach Liste fragen</string>
<string name="init_summary_choose_list">Beim Speichern von Caches nach Liste fragen</string>
<string name="init_livelist">Richtung zum Cache</string>
@@ -494,6 +489,9 @@
<string name="init_maintenance">Wartung</string>
<string name="init_maintenance_directories_note">c:geo speichert Bilder, Log-Bilder und weitere Dateien zu einem Cache in einem separaten Verzeichnis. In manchen Fällen (z.B. bei Sichern und Wiederherstellen der Datenbank) kann dieses Verzeichnis unnötige Daten enthalten, die gelöscht werden können.</string>
<string name="init_maintenance_directories">Verwaiste Daten löschen</string>
+ <string name="init_create_memory_dump">Erzeuge ein Speicherabbild</string>
+ <string name="init_memory_dump">Speicherabbild</string>
+ <string name="init_memory_dumped">Speicherabbild in %s gespeichert</string>
<string name="settings_open_website">Webseite öffnen</string>
<string name="settings_settings">Einstellungen</string>
<string name="settings_information">Information</string>
@@ -541,6 +539,10 @@
<string name="auth_ocde">opencaching.de</string>
<string name="auth_ocpl">opencaching.pl</string>
<string name="auth_dialog_completed_oc">c:geo ist nun autorisiert, Caches zu laden und auf %s zu loggen.</string>
+ <plurals name="cache_counts">
+ <item quantity="one">Ein Cache</item>
+ <item quantity="other">%1$d Caches</item>
+ </plurals>
<string name="cache_offline">Offline</string>
<string name="cache_offline_refresh">Aktualisieren</string>
<string name="cache_offline_drop">Löschen</string>
@@ -556,7 +558,6 @@
<string name="cache_premium">Premium</string>
<string name="cache_attributes">Attribute</string>
<string name="cache_inventory">Inventar</string>
- <string name="cache_log_offline">Offline-Log</string>
<string name="cache_log_images_title">Logbild</string>
<string name="cache_log_image_default_title">Bild</string>
<string name="cache_personal_note">Persönliche Notiz</string>
@@ -567,8 +568,6 @@
<string name="cache_personal_note_uploading">Persönliche Notiz wird gesendet</string>
<string name="cache_personal_note_upload_done">Persönliche Notiz wurde hochgeladen</string>
<string name="cache_personal_note_upload_cancelled">Hochladen der Notiz abgebrochen</string>
- <string name="cache_personal_note_unstored">Cache noch nicht gespeichert</string>
- <string name="cache_personal_note_store">Der Cache wird zunächst gespeichert, damit die persönliche Notiz möglich ist.</string>
<string name="cache_description">Beschreibung</string>
<string name="cache_description_long">Ausführliche Beschreibung</string>
<string name="cache_description_table_note">Diese Beschreibung enthält Tabellenelemente, die evtl. nur auf %s korrekt angezeigt werden.</string>
@@ -585,10 +584,14 @@
<string name="cache_list_unknown">In keiner Liste</string>
<string name="cache_images">Bilder</string>
<string name="cache_waypoints">Wegpunkte</string>
+ <plurals name="waypoints">
+ <item quantity="one">1 Wegpunkt</item>
+ <item quantity="other">%d Wegpunkte</item>
+ </plurals>
<string name="cache_waypoints_add">Wegpunkt hinzufügen</string>
<string name="cache_hint">Hinweis</string>
<string name="cache_logs">Logbuch</string>
- <string name="cache_logsfriends">Logbuch (Freunde)</string>
+ <string name="cache_logs_friends_and_own">Logbuch (Freunde/Eigene)</string>
<string name="cache_dialog_loading_details">Lade Cache-Details…</string>
<string name="cache_dialog_loading_details_status_loadpage">Lade Seite</string>
<string name="cache_dialog_loading_details_status_details">Verarbeite Details</string>
@@ -634,16 +637,14 @@
<string name="cache_menu_refresh">Aktualisieren</string>
<string name="cache_menu_share">Weiterleiten</string>
<string name="cache_menu_move_list">Auf andere Liste verschieben</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">Cache Beacon</string>
<string name="cache_menu_navigon">Navigon</string>
<string name="cache_menu_pebble">Pebble Smartwatch</string>
- <string name="cache_menu_mapswithme">MapsWithMe</string>
<string name="cache_status">Status</string>
<string name="cache_status_offline_log">Gespeicherter Log</string>
<string name="cache_status_found">Gefunden</string>
+ <string name="cache_not_status_found">Nicht gefunden</string>
<string name="cache_status_archived">Archiviert</string>
<string name="cache_status_disabled">Deaktiviert</string>
<string name="cache_status_premium">Nur für Premium-Mitglieder</string>
@@ -656,7 +657,7 @@
<string name="cache_size">Größe</string>
<string name="cache_distance">Entfernung</string>
<string name="cache_difficulty">Schwierigkeit</string>
- <string name="cache_terrain">Terrain</string>
+ <string name="cache_terrain">Gelände</string>
<string name="cache_rating">Bewertung</string>
<string name="cache_own_rating">Eigene Bewertung</string>
<string name="cache_rating_of">von</string>
@@ -755,10 +756,7 @@
<string name="map_view_map">Karte</string>
<string name="map_modes">Karteneinstellungen</string>
<string name="map_trail_show">Spur einblenden</string>
- <string name="map_trail_hide">Spur ausblenden</string>
<string name="map_circles_show">Kreise anzeigen</string>
- <string name="map_circles_hide">Kreise verbergen</string>
- <string name="map_mycaches_show">Eigene/gefundene Caches anzeigen</string>
<string name="map_mycaches_hide">Eigene/gefundene Caches ausblenden</string>
<string name="map_theme_builtin">Standard</string>
<string name="map_theme_select">Kartendarstellung wählen</string>
@@ -838,10 +836,10 @@
<string name="user_menu_open_contact">Kontakt öffnen</string>
<string name="navigation">Navigation</string>
<string name="compass_title">Kompass</string>
+ <string name="compass_sensors">Aktive Sensoren</string>
<string name="use_gps">Nur GPS nutzen</string>
<string name="use_compass">GPS und Kompass nutzen</string>
<string name="destination_select">Ziel auswählen</string>
- <string name="destination_set">Ziel setzen</string>
<string name="navigation_direct_navigation">Direkte Navigation</string>
<string name="navigation_target">Ziel</string>
<string name="err_nav_no_coordinates">Die Navigation kann ohne Koordinaten nicht gestartet werden</string>
@@ -970,8 +968,8 @@
<string name="attribute_skiis_no">Langlauf-Ski nicht erforderlich</string>
<string name="attribute_s_tool_yes">Besondere Werkzeuge erforderlich</string>
<string name="attribute_s_tool_no">Keine besonderen Werkzeuge erforderlich</string>
- <string name="attribute_wirelessbeacon_yes">Cache mit Funk-Sender (Chirp)</string>
- <string name="attribute_wirelessbeacon_no">Kein Cache mit Funk-Sender (Chirp)</string>
+ <string name="attribute_wirelessbeacon_yes">Funk-Sender</string>
+ <string name="attribute_wirelessbeacon_no">Ohne Funk-Sender</string>
<string name="attribute_treeclimbing_yes">Auf Bäume klettern erforderlich</string>
<string name="attribute_treeclimbing_no">Auf Bäume klettern nicht erforderlich</string>
<string name="attribute_poisonoak_yes">Giftige Pflanzen</string>
@@ -1112,7 +1110,6 @@
<string name="website">Webseite: <a href="">cgeo.org</a></string>
<string name="facebook">Facebook: <a href="">c:geo page</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Benutzung: <a href="">c:geo Kurzanleitung</a></string>
<string name="market">Android: <a href="">c:geo auf Google Play</a></string>
<string name="about_twitter">Soll jeder neue Fund auf Twitter veröffentlicht werden, wenn er über <b>c:geo</b> geloggt wird?</string>
<string name="faq">FAQ: <a href="">faq.cgeo.org</a></string>
@@ -1128,50 +1125,28 @@
<string name="tts_stop">Stoppe Sprache</string>
<string name="err_tts_lang_not_supported">Die aktuelle Sprache wird von TTS nicht unterstützt.</string>
<string name="tts_one_kilometer">ein Kilometer</string>
- <string name="tts_one_meter">ein Meter</string>
- <string name="tts_one_mile">eine Meile</string>
- <string name="tts_one_foot">ein Fuß</string>
- <string name="tts_one_oclock">ein Uhr</string>
- <string name="tts_oclock">%s Uhr</string>
- <string name="clipboard_copy_ok">In Zwischenablage kopiert</string>
- <string name="percent_favorite_points">% Favoriten</string>
- <string name="cgeo_shortcut">c:geo Shortcut</string>
- <string name="create_shortcut">Shortcut erstellen</string>
- <string-array name="log_image_scales">
- <item>Keine Skalierung</item>
- <item>512 px</item>
- <item>640 px</item>
- <item>800 px</item>
- <item>1024 px</item>
- </string-array>
- <plurals name="caches_eta_mins">
- <item quantity="one">Minute</item>
- <item quantity="other">Minuten</item>
- </plurals>
- <plurals name="cache_counts">
- <item quantity="one">Ein Cache</item>
- <item quantity="other">%1$d Caches</item>
- </plurals>
- <plurals name="waypoints">
- <item quantity="one">1 Wegpunkt</item>
- <item quantity="other">%d Wegpunkte</item>
- </plurals>
<plurals name="tts_kilometers">
<item quantity="one">%s Kilometer</item>
<item quantity="other">%s Kilometer</item>
</plurals>
+ <string name="tts_one_meter">ein Meter</string>
<plurals name="tts_meters">
<item quantity="one">%s Meter</item>
<item quantity="other">%s Meter</item>
</plurals>
+ <string name="tts_one_mile">eine Meile</string>
<plurals name="tts_miles">
<item quantity="one">%s Meile</item>
<item quantity="other">%s Meilen</item>
</plurals>
+ <string name="tts_one_foot">ein Fuß</string>
<plurals name="tts_feet">
<item quantity="one">%s Fuß</item>
<item quantity="other">%s Fuß</item>
</plurals>
+ <string name="tts_one_oclock">ein Uhr</string>
+ <string name="tts_oclock">%s Uhr</string>
+ <string name="clipboard_copy_ok">In Zwischenablage kopiert</string>
<plurals name="days_ago">
<item quantity="one">gestern</item>
<item quantity="other">vor %d Tagen</item>
@@ -1180,4 +1155,8 @@
<item quantity="one">%s Favorit</item>
<item quantity="other">%s Favoriten</item>
</plurals>
+ <string name="percent_favorite_points">% Favoriten</string>
+ <string name="cgeo_shortcut">c:geo Shortcut</string>
+ <string name="create_shortcut">Shortcut erstellen</string>
+ <string name="send">Senden</string>
</resources>
diff --git a/main/res/values-es/strings.xml b/main/res/values-es/strings.xml
index e7da7a1..8ee3be9 100644
--- a/main/res/values-es/strings.xml
+++ b/main/res/values-es/strings.xml
@@ -9,7 +9,6 @@
<string name="about">Sobre c:geo</string>
<string name="latitude">Latitud</string>
<string name="longitude">Longitud</string>
- <string name="action_bar_share_title">Compartir enlace a escondite</string>
<string name="settings_titlebar">c:geo Ajustes</string>
<string name="all_types">Todos los escondites</string>
<string name="traditional">Tradicionales</string>
@@ -77,22 +76,9 @@
<string name="log_saving">Enviando registo…</string>
<string name="log_saving_and_uploading">Enviando registro y subiendo imagen…</string>
<string name="log_clear">Limpiar</string>
- <string name="log_post">Enviar registro</string>
- <string name="log_post_rate">Enviar registro y puntuación</string>
- <string name="log_post_no_rate">Enviar registro sin puntuar</string>
<string name="log_post_not_possible">Cargando página de registro…</string>
<string name="log_add">Añadir</string>
- <string name="log_rating">Puntuación</string>
<string name="log_no_rating">Sin puntuación</string>
- <string name="log_stars_1">1 estrella</string>
- <string name="log_stars_15">1,5 estrellas</string>
- <string name="log_stars_2">2 estrellas</string>
- <string name="log_stars_25">2,5 estrellas</string>
- <string name="log_stars_3">3 estrellas</string>
- <string name="log_stars_35">3,5 estrellas</string>
- <string name="log_stars_4">4 estrellas</string>
- <string name="log_stars_45">4,5 estrellas</string>
- <string name="log_stars_5">5 estrellas</string>
<string name="log_stars_1_description">malísimo</string>
<string name="log_stars_15_description">muy malo</string>
<string name="log_stars_2_description">malo</string>
@@ -111,7 +97,6 @@
<string name="log_smilies">Emoticonos</string>
<string name="log_image">Imagen</string>
<string name="log_image_attach">Adjuntar imagen</string>
- <string name="log_image_edit">Editar imagen</string>
<string name="log_image_stored">Galería</string>
<string name="log_image_camera">Tomar foto</string>
<string name="log_image_caption">Título</string>
@@ -120,6 +105,13 @@
<string name="log_password_title">Contraseña:</string>
<string name="log_hint_log_password">Introduzca su contraseña</string>
<string name="log_oc_team_comment">Comentario equipo OC</string>
+ <string-array name="log_image_scales">
+ <item>Sin redimensionar</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<string name="translate_to_sys_lang">Traducir al %s</string>
<string name="translate_to_english">Traducir al inglés</string>
<string name="translate_length_warning">La traducción podría fallar con un texto muy largo.</string>
@@ -240,12 +232,15 @@
<string name="caches_more_caches_currently">actualmente</string>
<string name="caches_downloading">Descargando escondites…\nFaltan: </string>
<string name="caches_eta_ltm">Menos de un minuto</string>
+ <plurals name="caches_eta_mins">
+ <item quantity="one">%d minuto</item>
+ <item quantity="other">%d minutos</item>
+ </plurals>
<string name="caches_store_offline">Usar sin conexión luego</string>
<string name="caches_store_selected">Almacenamiento seleccionado</string>
<string name="caches_history">Historial</string>
<string name="caches_on_map">Ver en mapa</string>
<string name="caches_sort">Ordenar</string>
- <string name="caches_sort_title">Ordenar por</string>
<string name="caches_sort_distance">distancia</string>
<string name="caches_sort_difficulty">dificultad</string>
<string name="caches_sort_terrain">terreno</string>
@@ -267,13 +262,6 @@
<string name="caches_select_invert">Invertir selección</string>
<string name="caches_nearby">Cercanos</string>
<string name="caches_manage">Gestionar</string>
- <string name="caches_drop_selected">Descartar los seleccionados</string>
- <string name="caches_drop_selected_ask">¿Quieres borrar los escondites seleccionados del dispositivo?</string>
- <string name="caches_drop_all">Descartar todos</string>
- <string name="caches_drop_all_ask">¿Quieres borrar todos los escondites guardados en el dispositivo?</string>
- <string name="caches_drop_stored">Descartar guardados</string>
- <string name="caches_drop_progress">Borrando escondites</string>
- <string name="caches_drop_all_and_list">Descartar todos y borrar lista</string>
<string name="caches_delete_events">Borrar eventos pasados</string>
<string name="caches_refresh_selected">Actualizar seleccionados</string>
<string name="caches_refresh_all">Actualizar todos</string>
@@ -300,10 +288,8 @@
<string name="caches_removing_from_history">Borrando del historial…</string>
<string name="caches_clear_offlinelogs">Borrar registros sin conexión</string>
<string name="caches_clear_offlinelogs_progress">Borrando registros sin conexión</string>
- <string name="list_menu">Lista</string>
<string name="list_menu_create">Crear nueva lista</string>
<string name="list_menu_drop">Borrar lista actual</string>
- <string name="list_menu_change">Cambiar lista</string>
<string name="list_menu_rename">Renombrar la lista actual</string>
<string name="list_title">Escoger lista</string>
<string name="list_inbox">Guardadas</string>
@@ -351,11 +337,13 @@
<string name="settings_activate_ox">Activar</string>
<string name="settings_gc_legal_note">Usando el servicio de geocaching.com, usted acepta los términos de uso de Groundspeak.</string>
<string name="settings_info_facebook_login_title">Facebook Login</string>
+ <string name="settings_info_facebook_login">No puedes iniciar sesión en geocaching.com desde c:geo con tu cuenta de Facebook. Pero esto se puede solucionar con un simple truco…</string>
<string name="settings_authorize">Autorizar c:geo</string>
<string name="settings_reauthorize">Autorizar c:geo otra vez</string>
<string name="init_oc">Opencaching.de</string>
<string name="settings_activate_oc">Activar</string>
<string name="settings_activate_oc_pl">Activar</string>
+ <string name="settings_activate_oc_ro">Activar</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="settings_activate_twitter">Activar</string>
@@ -370,6 +358,7 @@
<string name="init_login_popup_not_authorized">No autorizado</string>
<string name="init_login_popup_invalid_timestamp">Hora local inválida, ajuste la hora de nuevo</string>
<string name="init_login_popup_invalid_token">Autorización inválida, volver a autorizar</string>
+ <string name="settings_service_active">Activo</string>
<string name="init_signature">Firma</string>
<string name="init_signature_template_button">Insertar plantilla</string>
<string name="init_signature_template_date">Fecha</string>
@@ -380,8 +369,8 @@
<string name="init_signature_template_owner">Propietario</string>
<string name="init_signature_template_name">Nombre</string>
<string name="init_signature_template_url">URL</string>
+ <string name="init_signature_template_log">Texto de registro</string>
<string name="init_ratingwanted">Clasificación de GCvote</string>
- <string name="init_friendlogswanted">Mostrar registros de amigos</string>
<string name="init_openlastdetailspage">Detalles de la última página</string>
<string name="init_autoload">Autocargar descripción larga</string>
<string name="init_summary_autoload">Autocargar descripción larga</string>
@@ -463,6 +452,10 @@
<string name="auth_again">Volver a iniciar</string>
<string name="auth_dialog_waiting">Esperando a %s…</string>
<string name="auth_ocde">Opencaching.de</string>
+ <plurals name="cache_counts">
+ <item quantity="one">Un escondite</item>
+ <item quantity="other">%1$d Escondites</item>
+ </plurals>
<string name="cache_offline">Desconectado</string>
<string name="cache_offline_refresh">Actualizar</string>
<string name="cache_offline_drop">Tirar</string>
@@ -478,7 +471,6 @@
<string name="cache_premium">Premium</string>
<string name="cache_attributes">Atributos</string>
<string name="cache_inventory">Inventario</string>
- <string name="cache_log_offline">Registro desconectado</string>
<string name="cache_log_images_title">Imagen de registro</string>
<string name="cache_log_image_default_title">Foto</string>
<string name="cache_personal_note">Nota personal</string>
@@ -521,7 +513,6 @@
<string name="cache_menu_refresh">Actualizar</string>
<string name="cache_menu_share">Compartir escondite</string>
<string name="cache_menu_move_list">Mover a otra lista</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
<string name="cache_status">Estado</string>
@@ -595,9 +586,7 @@
<string name="map_view_map">Ver mapa</string>
<string name="map_modes">Configuración del mapa</string>
<string name="map_trail_show">Mostrar rastro</string>
- <string name="map_trail_hide">Ocultar rastro</string>
<string name="map_circles_show">Mostrar círculos</string>
- <string name="map_circles_hide">Ocultar círculos</string>
<string name="map_theme_builtin">Por defecto</string>
<string name="map_live_enable">Activar en vivo</string>
<string name="map_live_disable">Desactivar en vivo</string>
@@ -668,7 +657,6 @@
<string name="use_gps">Solo usar GPS</string>
<string name="use_compass">Usar GPS y brújula</string>
<string name="destination_select">Seleccionar destino</string>
- <string name="destination_set">Elegir destino</string>
<string name="navigation_target">Objetivo</string>
<string name="license">Licencia</string>
<string name="license_show">Mostrar licencia</string>
@@ -837,7 +825,6 @@
<string name="website">Web: <a href="">cgeo.org</a></string>
<string name="facebook">Facebook: <a href="">c:geo page</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Manual: <a href="">c:geo en breve</a></string>
<string name="about_twitter">¿Debe <b>c:geo</b> publicar el nuevo estado en Twitter cuando registras un escondite?</string>
<string name="status_new_release" tools:ignore="UnusedResources">Nueva versión disponible. \nClick para instalar.</string>
<string name="tts_start">Empezar a hablar</string>
@@ -849,19 +836,4 @@
<string name="tts_oclock">%s en punto</string>
<string name="clipboard_copy_ok">Copiado al portapapeles</string>
<string name="percent_favorite_points">% \ favoritos</string>
- <string-array name="log_image_scales">
- <item>Sin redimensionar</item>
- <item>512 px</item>
- <item>640 px</item>
- <item>800 px</item>
- <item>1024 px</item>
- </string-array>
- <plurals name="caches_eta_mins">
- <item quantity="one">minuto</item>
- <item quantity="other">minutos</item>
- </plurals>
- <plurals name="cache_counts">
- <item quantity="one">Un escondite</item>
- <item quantity="other">%1$d Escondites</item>
- </plurals>
</resources>
diff --git a/main/res/values-fr/strings.xml b/main/res/values-fr/strings.xml
index e8487bf..deedf5f 100644
--- a/main/res/values-fr/strings.xml
+++ b/main/res/values-fr/strings.xml
@@ -9,7 +9,6 @@
<string name="about">À propos de c:geo</string>
<string name="latitude">Latitude</string>
<string name="longitude">Longitude</string>
- <string name="action_bar_share_title">Partager le lien vers la cache</string>
<string name="settings_titlebar">Paramètres c:geo</string>
<string name="all_types">Tous les genres</string>
<string name="traditional">Traditionnelles</string>
@@ -18,6 +17,7 @@
<string name="letterbox">Boîtes aux lettres hybrides</string>
<string name="event">Événements</string>
<string name="mega">Méga-événements</string>
+ <string name="giga">Giga-événements</string>
<string name="earth">Earthcache</string>
<string name="cito">Cache in trash out</string>
<string name="webcam">Webcams</string>
@@ -78,22 +78,9 @@
<string name="log_saving">Enregistrement en cours…</string>
<string name="log_saving_and_uploading">Envoi de la note et de l\'image…</string>
<string name="log_clear">Effacer</string>
- <string name="log_post">Envoyer</string>
- <string name="log_post_rate">Envoyer &amp; noter</string>
- <string name="log_post_no_rate">Envoyer &amp; ne pas noter</string>
<string name="log_post_not_possible">Chargement de la page…</string>
<string name="log_add">Ajouter</string>
- <string name="log_rating">Note</string>
<string name="log_no_rating">Pas de note</string>
- <string name="log_stars_1">1 étoile</string>
- <string name="log_stars_15">1,5 étoiles</string>
- <string name="log_stars_2">2 étoiles</string>
- <string name="log_stars_25">2,5 étoiles</string>
- <string name="log_stars_3">3 étoiles</string>
- <string name="log_stars_35">3,5 étoiles</string>
- <string name="log_stars_4">4 étoiles</string>
- <string name="log_stars_45">4,5 étoiles</string>
- <string name="log_stars_5">5 étoiles</string>
<string name="log_stars_1_description">faible</string>
<string name="log_stars_15_description">plutôt faible</string>
<string name="log_stars_2_description">en dessous de la moyenne</string>
@@ -112,7 +99,6 @@
<string name="log_smilies">Sourillards</string>
<string name="log_image">Image</string>
<string name="log_image_attach">Ajouter une image</string>
- <string name="log_image_edit">Éditer l\'image</string>
<string name="log_image_stored">Existante</string>
<string name="log_image_camera">Nouvelle</string>
<string name="log_image_caption">Légende</string>
@@ -121,6 +107,13 @@
<string name="log_password_title">Mot de passe du carnet :</string>
<string name="log_hint_log_password">Entrez votre mot de passe pour le carnet</string>
<string name="log_oc_team_comment">Commentaire de l\'équipe OC</string>
+ <string-array name="log_image_scales">
+ <item>Taille originale</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<string name="translate_to_sys_lang">Traduire en %s</string>
<string name="translate_to_english">Traduire en anglais</string>
<string name="translate_length_warning">La traduction d\'un texte trop long peut échouer.</string>
@@ -213,6 +206,7 @@
<string name="info_select_logimage_cancelled">La sélection ou l\'acquisition de l\'image a été annulée.</string>
<string name="info_stored_image">Nouvelle image sauvée dans :</string>
<string name="info_storing_static_maps">Sauvegarde des cartes statiques</string>
+ <string name="info_cache_saved">La cache a été stockée en local</string>
<string name="loc_last">Aucun</string>
<string name="loc_net">Réseau</string>
<string name="loc_gps">Gps</string>
@@ -220,6 +214,7 @@
<string name="loc_trying">Localisation en cours…</string>
<string name="loc_no_addr">Adresse inconnue</string>
<string name="loc_gps_disabled">GPS désactivé</string>
+ <string name="menu_centerposition">Centrer sur ma position</string>
<string name="menu_about">À propos de c:geo</string>
<string name="menu_helpers">Utilitaires</string>
<string name="menu_settings">Paramètres</string>
@@ -241,12 +236,15 @@
<string name="caches_more_caches_currently">actuellement</string>
<string name="caches_downloading">Téléchargement des caches…\nRestant: </string>
<string name="caches_eta_ltm">Moins d\'une minute</string>
+ <plurals name="caches_eta_mins">
+ <item quantity="one">%d minute</item>
+ <item quantity="other">%d minutes</item>
+ </plurals>
<string name="caches_store_offline">Stocker localement</string>
<string name="caches_store_selected">Stocker la sélection</string>
<string name="caches_history">Historique</string>
<string name="caches_on_map">Voir sur la carte</string>
<string name="caches_sort">Trier</string>
- <string name="caches_sort_title">Trier par</string>
<string name="caches_sort_distance">Distance</string>
<string name="caches_sort_difficulty">Difficulté</string>
<string name="caches_sort_terrain">Terrain</string>
@@ -268,13 +266,11 @@
<string name="caches_select_invert">Inverser la sélection</string>
<string name="caches_nearby">Proches</string>
<string name="caches_manage">Gérer</string>
- <string name="caches_drop_selected">Effacer les caches sélectionnées</string>
- <string name="caches_drop_selected_ask">Effacer les caches sélectionnées du téléphone ?</string>
- <string name="caches_drop_all">Tout effacer</string>
- <string name="caches_drop_all_ask">Effacer les caches de la liste courante ?</string>
- <string name="caches_drop_stored">Effacer les caches stockées</string>
- <string name="caches_drop_progress">Suppression des caches en cours</string>
- <string name="caches_drop_all_and_list">Suppr. caches et liste</string>
+ <string name="caches_remove_all">Tout supprimer</string>
+ <string name="caches_remove_all_confirm">Voulez-vous supprimer les %s caches de votre liste actuelle ?</string>
+ <string name="caches_remove_selected">Supprimer la sélection</string>
+ <string name="caches_remove_selected_confirm">Voulez-vous supprimer de votre appareil les %s caches sélectionnées ?</string>
+ <string name="caches_remove_progress">Suppression des caches en cours</string>
<string name="caches_delete_events">Effacer les événements précédents</string>
<string name="caches_refresh_selected">Rafraîchir les caches sélectionnées</string>
<string name="caches_refresh_all">Tout rafraîchir</string>
@@ -301,11 +297,10 @@
<string name="caches_removing_from_history">Effacer de l\'historique…</string>
<string name="caches_clear_offlinelogs">Effacer les entrées de carnet hors-ligne</string>
<string name="caches_clear_offlinelogs_progress">Effacement des entrées de carnet hors-ligne</string>
- <string name="list_menu">Listes</string>
<string name="list_menu_create">Nouvelle liste</string>
<string name="list_menu_drop">Effacer la liste courante</string>
- <string name="list_menu_change">Changer de liste</string>
<string name="list_menu_rename">Renommer la liste courante</string>
+ <string name="list_menu_import">Importer</string>
<string name="list_title">Choisir une liste</string>
<string name="list_inbox">Enregistrées</string>
<string name="list_all_lists">Toutes les caches</string>
@@ -373,6 +368,8 @@
<string name="init_oc_ro">Opencaching.ro</string>
<string name="settings_activate_oc_ro">Activer</string>
<string name="init_oc_ro_description">Autoriser c:geo à utiliser opencaching.ro pour chercher des caches et accéder/filtrer vos caches trouvées.</string>
+ <string name="settings_activate_oc_uk">Activer</string>
+ <string name="init_oc_uk_description">Autoriser c:geo à utiliser opencaching.org.uk pour chercher des caches et accéder/filtrer vos caches trouvées.</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="settings_activate_twitter">Activer</string>
@@ -402,8 +399,8 @@
<string name="init_signature_template_log">Texte du journal</string>
<string name="init_ratingwanted">Charger la note depuis GCvote.com</string>
<string name="init_summary_ratingwanted">Charger la note depuis GCvote.com</string>
- <string name="init_friendlogswanted">Charger le carnet (amis)</string>
- <string name="init_summary_friendlogswanted">Charger le carnet (amis)</string>
+ <string name="init_friends_and_own_logs_wanted">Montrer vos entrées / amis</string>
+ <string name="init_summary_friends_and_own_logs_wanted">Afficher une page de carnet supplémentaire avec vos entrées de carnet et celles de vos amis</string>
<string name="init_openlastdetailspage">Réouvrir les détails à la dernière page ouverte</string>
<string name="init_summary_openlastdetailspage">Réouvrir les détails à la dernière page ouverte</string>
<string name="init_autoload">Afficher automatiquement les descriptions longues</string>
@@ -431,7 +428,7 @@
<string name="init_units">Utiliser des unités de distance impériales</string>
<string name="init_summary_units">Utiliser des unités de distance impériales</string>
<string name="init_log_offline">Toujours utiliser le mode hors-ligne, même si connecté.</string>
- <string name="init_summary_log_offline">Toujours utiliser le mode hors-ligne, même si connecté.</string>
+ <string name="init_summary_log_offline">Toujours utiliser le mode hors-ligne, même si connecté</string>
<string name="init_choose_list">Demander dans quelle liste sauver les caches.</string>
<string name="init_summary_choose_list">Demander dans quelle liste sauver les caches.</string>
<string name="init_livelist">Afficher la direction des caches dans les listes</string>
@@ -492,6 +489,9 @@
<string name="init_maintenance">Maintenance</string>
<string name="init_maintenance_directories_note">c:geo stocke les images et les autres fichiers associés à une géocache dans un dossier dédié. Dans certains cas (comme l\'importation/exportation de la base de données), ce dossier peut contenir des fichiers obsolètes, qui peuvent être supprimés ici.</string>
<string name="init_maintenance_directories">Supprimer les fichiers orphelins</string>
+ <string name="init_create_memory_dump">Créer une image mémoire</string>
+ <string name="init_memory_dump">Image mémoire</string>
+ <string name="init_memory_dumped">Mémoire copiée dans %s</string>
<string name="settings_open_website">Ouvrir le site dans un navigateur</string>
<string name="settings_settings">Paramètres</string>
<string name="settings_information">Information</string>
@@ -539,6 +539,10 @@
<string name="auth_ocde">opencaching.de</string>
<string name="auth_ocpl">opencaching.pl</string>
<string name="auth_dialog_completed_oc">c:geo est désormais autorisé à interagir avec %s.</string>
+ <plurals name="cache_counts">
+ <item quantity="one">%1$d cache</item>
+ <item quantity="other">%1$d caches</item>
+ </plurals>
<string name="cache_offline">Hors ligne</string>
<string name="cache_offline_refresh">Recharger</string>
<string name="cache_offline_drop">Effacer</string>
@@ -554,7 +558,6 @@
<string name="cache_premium">Premium</string>
<string name="cache_attributes">Attributs</string>
<string name="cache_inventory">Inventaire</string>
- <string name="cache_log_offline">Visite hors-ligne</string>
<string name="cache_log_images_title">Image de la visite</string>
<string name="cache_log_image_default_title">Photo</string>
<string name="cache_personal_note">Note personnelle</string>
@@ -565,8 +568,6 @@
<string name="cache_personal_note_uploading">Envoi de la note personnelle</string>
<string name="cache_personal_note_upload_done">Note personnelle envoyée</string>
<string name="cache_personal_note_upload_cancelled">Envoi de la note personnelle annulé</string>
- <string name="cache_personal_note_unstored">Cache non sauvegardée localement</string>
- <string name="cache_personal_note_store">La cache va être sauvegardée localement avant d\'autoriser les notes personnelles.</string>
<string name="cache_description">Description</string>
<string name="cache_description_long">Description longue</string>
<string name="cache_description_table_note">La description contient des informations de formattages qui nécessitent possiblement d\'être vues sur le site %s pour être affichées correctement.</string>
@@ -583,10 +584,14 @@
<string name="cache_list_unknown">Dans aucune liste</string>
<string name="cache_images">Images</string>
<string name="cache_waypoints">Étapes</string>
+ <plurals name="waypoints">
+ <item quantity="one">%d étape</item>
+ <item quantity="other">%d étapes</item>
+ </plurals>
<string name="cache_waypoints_add">Ajouter une étape</string>
<string name="cache_hint">Indice</string>
<string name="cache_logs">Carnet de bord</string>
- <string name="cache_logsfriends">Carnet (amis)</string>
+ <string name="cache_logs_friends_and_own">Vous / amis</string>
<string name="cache_dialog_loading_details">Chargement des détails…</string>
<string name="cache_dialog_loading_details_status_loadpage">Chargement de la page</string>
<string name="cache_dialog_loading_details_status_details">Analyse</string>
@@ -632,15 +637,14 @@
<string name="cache_menu_refresh">Recharger</string>
<string name="cache_menu_share">Partager la cache</string>
<string name="cache_menu_move_list">Déplacer dans une autre liste</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">Cache Beacon</string>
<string name="cache_menu_navigon">Navigon</string>
<string name="cache_menu_pebble">Pebble</string>
<string name="cache_status">Statut</string>
<string name="cache_status_offline_log">Visite sauvée hors-ligne</string>
<string name="cache_status_found">Trouvée</string>
+ <string name="cache_not_status_found">Pas trouvée</string>
<string name="cache_status_archived">Archivée</string>
<string name="cache_status_disabled">Désactivée</string>
<string name="cache_status_premium">Membres privilégiés seulement</string>
@@ -752,10 +756,7 @@
<string name="map_view_map">Voir carte</string>
<string name="map_modes">Marqueurs</string>
<string name="map_trail_show">Afficher le parcours</string>
- <string name="map_trail_hide">Cacher le parcours</string>
<string name="map_circles_show">Afficher les cercles</string>
- <string name="map_circles_hide">Cacher les cercles</string>
- <string name="map_mycaches_show">Montrer les caches placées/trouvées</string>
<string name="map_mycaches_hide">Cacher les caches placées/trouvées</string>
<string name="map_theme_builtin">Défault</string>
<string name="map_theme_select">Sélectionner le thème</string>
@@ -835,10 +836,10 @@
<string name="user_menu_open_contact">Ouvrir la fiche du contact</string>
<string name="navigation">Navigation</string>
<string name="compass_title">Boussole</string>
+ <string name="compass_sensors">Capteurs actifs</string>
<string name="use_gps">Utiliser GPS</string>
<string name="use_compass">Utiliser la boussole</string>
<string name="destination_select">Choisir une destination</string>
- <string name="destination_set">Définir une destination</string>
<string name="navigation_direct_navigation">Navigation directe</string>
<string name="navigation_target">Cible</string>
<string name="err_nav_no_coordinates">Impossible de démarrer la navigation en l\'absence de coordonnées</string>
@@ -1109,7 +1110,6 @@
<string name="website">site: <a href="">cgeo.org</a></string>
<string name="facebook">facebook: <a href="">page c:geo</a></string>
<string name="twitter">twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Manuel: <a href="">c:geo en bref</a></string>
<string name="market">Android: <a href="">c:geo sur Google Play</a></string>
<string name="about_twitter">Voulez-vous publier un nouveau statut sur Twitter à chaque nouvelle cache découverte sous <b>c:geo</b>?</string>
<string name="faq">FAQ: <a href="">faq.cgeo.org</a></string>
@@ -1125,56 +1125,38 @@
<string name="tts_stop">Arrêter de parler</string>
<string name="err_tts_lang_not_supported">La langue courante n\'est pas prise en charge par la synthèse vocale.</string>
<string name="tts_one_kilometer">un kilomètre</string>
- <string name="tts_one_meter">un mètre</string>
- <string name="tts_one_mile">un mille</string>
- <string name="tts_one_foot">un pied</string>
- <string name="tts_one_oclock">une heure</string>
- <string name="tts_oclock">%s heures</string>
- <string name="clipboard_copy_ok">Copié dans le presse-papiers</string>
- <string name="percent_favorite_points">%\ favoris</string>
- <string name="cgeo_shortcut">c:geo raccourci</string>
- <string name="create_shortcut">Créer un raccourci</string>
- <string-array name="log_image_scales">
- <item>Taille originale</item>
- <item>512 px</item>
- <item>640 px</item>
- <item>800 px</item>
- <item>1024 px</item>
- </string-array>
- <plurals name="caches_eta_mins">
- <item quantity="one">minute</item>
- <item quantity="other">minutes</item>
- </plurals>
- <plurals name="cache_counts">
- <item quantity="one">une cache</item>
- <item quantity="other">%1$d caches</item>
- </plurals>
- <plurals name="waypoints">
- <item quantity="one">1 étape</item>
- <item quantity="other">%d étapes</item>
- </plurals>
<plurals name="tts_kilometers">
<item quantity="one">%s kilomètre</item>
<item quantity="other">%s kilomètres</item>
</plurals>
+ <string name="tts_one_meter">un mètre</string>
<plurals name="tts_meters">
<item quantity="one">%s mètre</item>
<item quantity="other">%s mètres</item>
</plurals>
+ <string name="tts_one_mile">un mille</string>
<plurals name="tts_miles">
<item quantity="one">%s mille</item>
<item quantity="other">%s milles</item>
</plurals>
+ <string name="tts_one_foot">un pied</string>
<plurals name="tts_feet">
<item quantity="one">%s pied</item>
<item quantity="other">%s pieds</item>
</plurals>
+ <string name="tts_one_oclock">une heure</string>
+ <string name="tts_oclock">%s heures</string>
+ <string name="clipboard_copy_ok">Copié dans le presse-papiers</string>
<plurals name="days_ago">
- <item quantity="one">hier</item>
+ <item quantity="one">il y a %d jour</item>
<item quantity="other">il y a %d jours</item>
</plurals>
<plurals name="favorite_points">
<item quantity="one">%s favori</item>
<item quantity="other">%s favoris</item>
</plurals>
+ <string name="percent_favorite_points">%\ favoris</string>
+ <string name="cgeo_shortcut">c:geo raccourci</string>
+ <string name="create_shortcut">Créer un raccourci</string>
+ <string name="send">Envoyer</string>
</resources>
diff --git a/main/res/values-hu/strings.xml b/main/res/values-hu/strings.xml
index 7e66ed5..14452d6 100644
--- a/main/res/values-hu/strings.xml
+++ b/main/res/values-hu/strings.xml
@@ -9,7 +9,6 @@
<string name="about">A c:geo-ról</string>
<string name="latitude">Szélesség</string>
<string name="longitude">Hosszúság</string>
- <string name="action_bar_share_title">A láda linkjének megosztása</string>
<string name="settings_titlebar">c:geo Beállítások</string>
<string name="all_types">Minden láda típus</string>
<string name="traditional">Hagyományos láda</string>
@@ -68,22 +67,9 @@
<string name="log_save">Mentés</string>
<string name="log_saving">Log mentése…</string>
<string name="log_clear">Törlés</string>
- <string name="log_post">Log beküldése</string>
- <string name="log_post_rate">Log beküldése &amp; értékelés</string>
- <string name="log_post_no_rate">Log beküldése &amp; nincs értékelés</string>
<string name="log_post_not_possible">Log oldal betöltése…</string>
<string name="log_add">Hozzáadás</string>
- <string name="log_rating">Értékelés</string>
<string name="log_no_rating">Nincs értékelés</string>
- <string name="log_stars_1">1 csillag</string>
- <string name="log_stars_15">1.5 csillag</string>
- <string name="log_stars_2">2 csillag</string>
- <string name="log_stars_25">2.5 csillag</string>
- <string name="log_stars_3">3 csillag</string>
- <string name="log_stars_35">3.5 csillag</string>
- <string name="log_stars_4">4 csillag</string>
- <string name="log_stars_45">4.5 csillag</string>
- <string name="log_stars_5">5 csillag</string>
<string name="log_stars_1_description">nagyon rossz</string>
<string name="log_stars_15_description">elég rossz</string>
<string name="log_stars_2_description">átlagon aluli</string>
@@ -212,7 +198,6 @@
<string name="caches_history">Előzmények</string>
<string name="caches_on_map">Mutasd meg térképen</string>
<string name="caches_sort">Rendezés</string>
- <string name="caches_sort_title">Rendezés eszerint</string>
<string name="caches_sort_distance">távolság</string>
<string name="caches_sort_difficulty">nehézség</string>
<string name="caches_sort_terrain">terep</string>
@@ -233,13 +218,6 @@
<string name="caches_select_invert">Kijelölés invertálása</string>
<string name="caches_nearby">Közeli</string>
<string name="caches_manage">Kezelés</string>
- <string name="caches_drop_selected">Kiválasztott törlése</string>
- <string name="caches_drop_selected_ask">El szeretnéd távolítani a kiválasztott ládákat az eszközről?</string>
- <string name="caches_drop_all">Az összes törlése</string>
- <string name="caches_drop_all_ask">Szeretnél eltávolítani minden ládát a jelenlegi listáról?</string>
- <string name="caches_drop_stored">Tároltak elvetése</string>
- <string name="caches_drop_progress">Ládák eltávolítása</string>
- <string name="caches_drop_all_and_list">Az összes térlése és a lista eltávolítása.</string>
<string name="caches_refresh_selected">Kijelöltek frissítése</string>
<string name="caches_refresh_all">Mind frissítése</string>
<string name="caches_move_selected">Kijelöltek mozgatása</string>
@@ -258,10 +236,8 @@
<string name="caches_filter_clear">szűrők törlése</string>
<string name="caches_filter_modified">Módosított koordinátákkal</string>
<string name="caches_removing_from_history">Eltávolítás a Előzményekből…</string>
- <string name="list_menu">Lista</string>
<string name="list_menu_create">Új lista létrehozása</string>
<string name="list_menu_drop">Jelenlegi lista elvetése</string>
- <string name="list_menu_change">Lista megváltoztatása</string>
<string name="list_menu_rename">Az aktuális lista átnevezése</string>
<string name="list_title">Válassz listát</string>
<string name="list_inbox">Mentett</string>
@@ -302,8 +278,6 @@
<string name="init_signature_template_owner">Tulajdonos</string>
<string name="init_ratingwanted">Értékelés betöltése a GCvote.com-ról</string>
<string name="init_summary_ratingwanted">Értékelés betöltése a GCvote.com-ról</string>
- <string name="init_friendlogswanted">További logbook oldal betöltése a barátok logjainak.</string>
- <string name="init_summary_friendlogswanted">További logbook oldal betöltése a barátok logjainak.</string>
<string name="init_openlastdetailspage">Az utoljára használt oldal részleteinek betöltése</string>
<string name="init_summary_openlastdetailspage">Az utoljára használt oldal részleteinek betöltése</string>
<string name="init_autoload">Hosszú leírás automatikus betöltése</string>
@@ -410,7 +384,6 @@
<string name="cache_premium">Prémium</string>
<string name="cache_attributes">Tulajdonságok</string>
<string name="cache_inventory">Tárgyak</string>
- <string name="cache_log_offline">Offline bejegyzés</string>
<string name="cache_log_images_title">Bejegyzés kép</string>
<string name="cache_log_image_default_title">Fotó</string>
<string name="cache_personal_note">Személyes megjegyzés</string>
@@ -431,7 +404,6 @@
<string name="cache_waypoints_add">Útpont hozzáadása</string>
<string name="cache_hint">Segítség</string>
<string name="cache_logs">Láda napló</string>
- <string name="cache_logsfriends">Logbook (Barátok)</string>
<string name="cache_dialog_loading_details">Láda adatainak betöltése…</string>
<string name="cache_dialog_loading_details_status_loadpage">Oldal betöltése</string>
<string name="cache_dialog_loading_details_status_details">Részletek feldolgozása</string>
@@ -469,10 +441,8 @@
<string name="cache_menu_refresh">Frissítés</string>
<string name="cache_menu_share">Láda megosztása</string>
<string name="cache_menu_move_list">Mozgatás másik listára</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">Geoláda jelzőbója</string>
<string name="cache_status">Állapot</string>
<string name="cache_status_offline_log">Mentett bejegyzés</string>
<string name="cache_status_found">Megtalált</string>
@@ -566,9 +536,7 @@
<string name="map_view_map">Térkép nézet</string>
<string name="map_modes">Térkép módok</string>
<string name="map_trail_show">Ösvény mutatása</string>
- <string name="map_trail_hide">Ösvény elrejtése</string>
<string name="map_circles_show">Körök mutatása</string>
- <string name="map_circles_hide">Körök elrejtése</string>
<string name="map_theme_builtin">Alapértelmezett</string>
<string name="map_theme_select">Válassz térképtémát</string>
<string name="map_live_enable">Élő mód engedélyezése</string>
@@ -637,7 +605,6 @@
<string name="use_gps">GPS használata</string>
<string name="use_compass">Iránytű használata</string>
<string name="destination_select">Cél kiválasztása</string>
- <string name="destination_set">Cél beállítása</string>
<string name="navigation_direct_navigation">Közvetlen navigáció</string>
<string name="navigation_target">Célpont</string>
<string name="license">Licensz</string>
@@ -807,7 +774,6 @@
<string name="website">Weboldal: <a href="">cgeo.org</a></string>
<string name="facebook">Facebook: <a href="">c:geo page</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Kézikönyv: <a href="">A c:geo dióhéjban</a></string>
<string name="about_twitter">Akarod, hogy <b>c:geo</b> új bejegyzést írjon Twitterre mindig mikor egy ládát megtalálsz?</string>
<string name="status_new_release" tools:ignore="UnusedResources">Új kiadás található.\nKattints a telepítéshez.</string>
<string name="status_new_nightly" tools:ignore="UnusedResources">Új napi verzió található.\nKattints a telepítéshez.</string>
diff --git a/main/res/values-it/strings.xml b/main/res/values-it/strings.xml
index 43e6c88..5c01b5d 100644
--- a/main/res/values-it/strings.xml
+++ b/main/res/values-it/strings.xml
@@ -9,7 +9,6 @@
<string name="about">Info c:geo</string>
<string name="latitude">Latitudine</string>
<string name="longitude">Longitudine</string>
- <string name="action_bar_share_title">Condividi link al cache</string>
<string name="settings_titlebar">Impostazioni di c:geo</string>
<string name="all_types">Tutti i tipi di cache</string>
<string name="traditional">Traditional cache</string>
@@ -18,6 +17,7 @@
<string name="letterbox">Letterbox hybrid</string>
<string name="event">Cache Evento</string>
<string name="mega">Mega-event cache</string>
+ <string name="giga">Giga-event cache</string>
<string name="earth">Earthcache</string>
<string name="cito">Evento Cache In Trash Out</string>
<string name="webcam">Webcam cache</string>
@@ -78,22 +78,9 @@
<string name="log_saving">Invio log…</string>
<string name="log_saving_and_uploading">Invio log e immagine…</string>
<string name="log_clear">Azzera</string>
- <string name="log_post">Invia log</string>
- <string name="log_post_rate">Invia log + voto</string>
- <string name="log_post_no_rate">Invia log senza voto</string>
<string name="log_post_not_possible">Connessione…</string>
<string name="log_add">Aggiungi</string>
- <string name="log_rating">Voto</string>
<string name="log_no_rating">Nessun voto</string>
- <string name="log_stars_1">1 stella</string>
- <string name="log_stars_15">1.5 stelle</string>
- <string name="log_stars_2">2 stelle</string>
- <string name="log_stars_25">2.5 stelle</string>
- <string name="log_stars_3">3 stelle</string>
- <string name="log_stars_35">3.5 stelle</string>
- <string name="log_stars_4">4 stelle</string>
- <string name="log_stars_45">4.5 stelle</string>
- <string name="log_stars_5">5 stelle</string>
<string name="log_stars_1_description">proprio brutto</string>
<string name="log_stars_15_description">abbastanza brutto</string>
<string name="log_stars_2_description">bruttino</string>
@@ -112,7 +99,6 @@
<string name="log_smilies">Faccine</string>
<string name="log_image">Immagine</string>
<string name="log_image_attach">Aggiungi immagine</string>
- <string name="log_image_edit">Modifica immagine</string>
<string name="log_image_stored">Esistente</string>
<string name="log_image_camera">Nuova</string>
<string name="log_image_caption">Didascalia</string>
@@ -121,6 +107,13 @@
<string name="log_password_title">Log Password:</string>
<string name="log_hint_log_password">Inserisci la password per il log</string>
<string name="log_oc_team_comment">Commenti del Team OC</string>
+ <string-array name="log_image_scales">
+ <item>Dimensioni originali</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<string name="translate_to_sys_lang">Traduci in %s</string>
<string name="translate_to_english">Traduci in inglese</string>
<string name="translate_length_warning">La traduzione può fallire quando c\'è molto testo.</string>
@@ -213,6 +206,7 @@
<string name="info_select_logimage_cancelled">Selezione o cattura immagine annulata.</string>
<string name="info_stored_image">Nuova immagine salvata su:</string>
<string name="info_storing_static_maps">Tento di salvare le mappe statiche</string>
+ <string name="info_cache_saved">Il cache è stato salvato localmente</string>
<string name="loc_last">Ultima nota</string>
<string name="loc_net">Network</string>
<string name="loc_gps">GPS</string>
@@ -220,6 +214,7 @@
<string name="loc_trying">Localizzazione in corso</string>
<string name="loc_no_addr">Indirizzo sconosciuto</string>
<string name="loc_gps_disabled">GPS non attivo</string>
+ <string name="menu_centerposition">Centra sulla mia posizione</string>
<string name="menu_about">Info su c:geo</string>
<string name="menu_helpers">Programmi utili</string>
<string name="menu_settings">Impostazioni</string>
@@ -241,12 +236,15 @@
<string name="caches_more_caches_currently">attualmente</string>
<string name="caches_downloading">Download cache in corso…\nETA: </string>
<string name="caches_eta_ltm">Meno di un minuto</string>
+ <plurals name="caches_eta_mins">
+ <item quantity="one">%d minuto</item>
+ <item quantity="other">%d minuti</item>
+ </plurals>
<string name="caches_store_offline">Salva per Offline</string>
<string name="caches_store_selected">Salva selezionati</string>
<string name="caches_history">Cronologia</string>
<string name="caches_on_map">Visualizza sulla mappa</string>
<string name="caches_sort">Ordina</string>
- <string name="caches_sort_title">Ordina per</string>
<string name="caches_sort_distance">Distanza</string>
<string name="caches_sort_difficulty">Difficoltà</string>
<string name="caches_sort_terrain">Terreno</string>
@@ -268,13 +266,11 @@
<string name="caches_select_invert">Inverti selezione</string>
<string name="caches_nearby">Qui vicino</string>
<string name="caches_manage">Gestisci</string>
- <string name="caches_drop_selected">Elimina selezionati</string>
- <string name="caches_drop_selected_ask">Vuoi rimuovere i cache selezionati dal dispositivo?</string>
- <string name="caches_drop_all">Elimina tutti</string>
- <string name="caches_drop_all_ask">Vuoi rimuovere tutti i cache dalla lista corrente?</string>
- <string name="caches_drop_stored">Elimina i cache salvati</string>
- <string name="caches_drop_progress">Eliminazione dei cache</string>
- <string name="caches_drop_all_and_list">Elimina tutti ed elimina la lista</string>
+ <string name="caches_remove_all">Elimina tutti</string>
+ <string name="caches_remove_all_confirm">Vuoi rimuovere tutti i %s cache dalla lista corrente?</string>
+ <string name="caches_remove_selected">Elimina selezionati</string>
+ <string name="caches_remove_selected_confirm">Vuoi rimuovere i %s cache selezionati dal dispositivo?</string>
+ <string name="caches_remove_progress">Eliminazione dei cache</string>
<string name="caches_delete_events">Cancella eventi passati</string>
<string name="caches_refresh_selected">Aggiorna i cache selezionati</string>
<string name="caches_refresh_all">Aggiorna tutti</string>
@@ -301,11 +297,10 @@
<string name="caches_removing_from_history">Rimozione dalla cronologia…</string>
<string name="caches_clear_offlinelogs">Cancella i log offline</string>
<string name="caches_clear_offlinelogs_progress">Cancellazione logs offline</string>
- <string name="list_menu">Lista</string>
<string name="list_menu_create">Crea nuova lista</string>
<string name="list_menu_drop">Elimina la lista corrente</string>
- <string name="list_menu_change">Cambia lista</string>
<string name="list_menu_rename">Rinomina la lista corrente</string>
+ <string name="list_menu_import">Importazione</string>
<string name="list_title">Seleziona una lista</string>
<string name="list_inbox">Salvate</string>
<string name="list_all_lists">Tutti i cache</string>
@@ -355,7 +350,7 @@
<string name="settings_activate_ox">Attiva</string>
<string name="settings_gc_legal_note">Per usare i servizi di Geocaching.com, si applicano i termini e le condizioni del Contratto Groundspeak che deve essere approvato dall\'utente.</string>
<string name="settings_info_facebook_login_title">Facebook Login</string>
- <string name="settings_info_facebook_login">Con il tuo account di Facebook non puoi fare login su geocaching.com. Ma c\'è una soluzione semplice …</string>
+ <string name="settings_info_facebook_login">Con il tuo account di Facebook non puoi fare login su geocaching.com. Ma c\'è una soluzione semplice…</string>
<string name="settings_authorize">Autorizza c:geo</string>
<string name="settings_reauthorize">Autorizza nuovamente c:geo</string>
<string name="init_oc">Opencaching.de</string>
@@ -370,6 +365,8 @@
<string name="init_oc_us_description">Autorizza c:geo a cercare cache ed accedere/filtrare i ritrovamenti su opencaching.us.</string>
<string name="settings_activate_oc_ro">Attiva</string>
<string name="init_oc_ro_description">Autorizza c:geo a cercare cache ed accedere/filtrare i ritrovamenti su opencaching.ro.</string>
+ <string name="settings_activate_oc_uk">Attiva</string>
+ <string name="init_oc_uk_description">Autorizza c:geo a cercare cache ed accedere/filtrare i ritrovamenti su opencaching.org.uk.</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="settings_activate_twitter">Attiva</string>
@@ -399,8 +396,8 @@
<string name="init_signature_template_log">Testo di Log</string>
<string name="init_ratingwanted">Rating da GCvote.com</string>
<string name="init_summary_ratingwanted">Carica il rating del cache da GCvote.com</string>
- <string name="init_friendlogswanted">Visualizza log dei miei amici</string>
- <string name="init_summary_friendlogswanted">Carica logbook addizionale con i log dei miei amici</string>
+ <string name="init_friends_and_own_logs_wanted">Visualizza i tuoi/dei tuoi amici</string>
+ <string name="init_summary_friends_and_own_logs_wanted">Visualizza una pagina di log addizionale per i log dei tuoi amici e i tuoi log</string>
<string name="init_openlastdetailspage">Carica ultima pagina usata nei dettagli</string>
<string name="init_summary_openlastdetailspage">Ricorda l\'ultima pagina usata nei dettagli</string>
<string name="init_autoload">Descrizione estesa</string>
@@ -489,6 +486,9 @@
<string name="init_maintenance">Manutenzione</string>
<string name="init_maintenance_directories_note">c:geo memorizza immagini, immagini log e altri file (correlati a un cache) in una cartella separata. In alcuni casi (es.: dopo import/esport del database) questa cartella potrebbe contenere file obsoleti, che possono essere cancellati da qui.</string>
<string name="init_maintenance_directories">Elimina file orfani</string>
+ <string name="init_create_memory_dump">Salva la memoria del programma</string>
+ <string name="init_memory_dump">Salvataggio memoria</string>
+ <string name="init_memory_dumped">Memoria salvata in %s</string>
<string name="settings_open_website">Apri il sito</string>
<string name="settings_settings">Impostazioni</string>
<string name="settings_information">Informazioni</string>
@@ -536,6 +536,10 @@
<string name="auth_ocde">opencaching.de</string>
<string name="auth_ocpl">opencaching.pl</string>
<string name="auth_dialog_completed_oc">c:geo è ora autorizzato ad accedere a %s.</string>
+ <plurals name="cache_counts">
+ <item quantity="one">Un cache</item>
+ <item quantity="other">%1$d cache</item>
+ </plurals>
<string name="cache_offline">Offline</string>
<string name="cache_offline_refresh">Aggiorna</string>
<string name="cache_offline_drop">Elimina</string>
@@ -551,7 +555,6 @@
<string name="cache_premium">Premium</string>
<string name="cache_attributes">Attributi</string>
<string name="cache_inventory">Oggetti</string>
- <string name="cache_log_offline">Log Offline</string>
<string name="cache_log_images_title">Immagini Log</string>
<string name="cache_log_image_default_title">Foto</string>
<string name="cache_personal_note">Note personali</string>
@@ -562,8 +565,6 @@
<string name="cache_personal_note_uploading">Nota personale in caricamento</string>
<string name="cache_personal_note_upload_done">Nota personale caricata</string>
<string name="cache_personal_note_upload_cancelled">Caricamento nota personale annullato</string>
- <string name="cache_personal_note_unstored">Cache non salvati</string>
- <string name="cache_personal_note_store">Il cache verrà prima salvato per abilitare le note personali.</string>
<string name="cache_description">Descrizione</string>
<string name="cache_description_long">Descrizione estesa</string>
<string name="cache_description_table_note">La descrizione contiene una tabella formattata in modo tale che potresti aver bisogno di andare su %s per vederla correttamente.</string>
@@ -580,10 +581,14 @@
<string name="cache_list_unknown">Non in una lista</string>
<string name="cache_images">Immagini</string>
<string name="cache_waypoints">Waypoints</string>
+ <plurals name="waypoints">
+ <item quantity="one">1 Waypoint</item>
+ <item quantity="other">%d Waypoint</item>
+ </plurals>
<string name="cache_waypoints_add">Aggiungi waypoint</string>
<string name="cache_hint">Aiuto (spoiler)</string>
<string name="cache_logs">Logbook</string>
- <string name="cache_logsfriends">Log amici</string>
+ <string name="cache_logs_friends_and_own">Log tuoi e degli amici</string>
<string name="cache_dialog_loading_details">Caricamento dettagli del cache…</string>
<string name="cache_dialog_loading_details_status_loadpage">Caricamento pagina</string>
<string name="cache_dialog_loading_details_status_details">Elaborazione dettagli</string>
@@ -629,15 +634,14 @@
<string name="cache_menu_refresh">Aggiorna</string>
<string name="cache_menu_share">Condividi cache</string>
<string name="cache_menu_move_list">Muovi in un\'altra lista</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">Cache Beacon</string>
<string name="cache_menu_navigon">Navigon</string>
<string name="cache_menu_pebble">Pebble</string>
<string name="cache_status">Stato</string>
<string name="cache_status_offline_log">Log salvato</string>
<string name="cache_status_found">Trovato</string>
+ <string name="cache_not_status_found">Non trovato</string>
<string name="cache_status_archived">Archiviato</string>
<string name="cache_status_disabled">Non attivo</string>
<string name="cache_status_premium">Solo per utenti Premium</string>
@@ -749,10 +753,7 @@
<string name="map_view_map">Scegli mappa</string>
<string name="map_modes">Modi mappa</string>
<string name="map_trail_show">Mostra scia</string>
- <string name="map_trail_hide">Nasconde scia</string>
<string name="map_circles_show">Mostra area cache</string>
- <string name="map_circles_hide">Nascondi area cache</string>
- <string name="map_mycaches_show">Visualizza cache tuoi o che hai trovato</string>
<string name="map_mycaches_hide">Nascondi i tuoi cache o che hai trovato</string>
<string name="map_theme_builtin">Tema predefinito</string>
<string name="map_theme_select">Scegli un tema mappa</string>
@@ -832,10 +833,10 @@
<string name="user_menu_open_contact">Aprire scheda contatto</string>
<string name="navigation">Navigazione</string>
<string name="compass_title">Bussola</string>
+ <string name="compass_sensors">Sensori attivi</string>
<string name="use_gps">Usa Nord solo da GPS</string>
<string name="use_compass">Usa Nord da GPS e bussola</string>
<string name="destination_select">Scegli destinazione</string>
- <string name="destination_set">Attiva destinazione</string>
<string name="navigation_direct_navigation">Navigazione diretta</string>
<string name="navigation_target">Destinazione</string>
<string name="err_nav_no_coordinates">Non è possibile avviare la navigazione senza coordinate</string>
@@ -1106,7 +1107,6 @@
<string name="website">Sito: <a href="">cgeo.org</a></string>
<string name="facebook">Facebook: <a href="">Pagina c:geo</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Manuale: <a href="">c:geo in a Nutshell</a></string>
<string name="market">Android: <a href="">c:geo su Google Play</a></string>
<string name="about_twitter">Può <b>c:geo</b> pubblicare su Twitter ogni volta che logghi un cache?</string>
<string name="faq">FAQ: <a href="">faq.cgeo.org</a></string>
@@ -1122,50 +1122,28 @@
<string name="tts_stop">Stop voce</string>
<string name="err_tts_lang_not_supported">Il linguaggio attivo non è supportato dal modulo di sintesi vocale.</string>
<string name="tts_one_kilometer">un chilometro</string>
- <string name="tts_one_meter">un metro</string>
- <string name="tts_one_mile">un miglio</string>
- <string name="tts_one_foot">un piede</string>
- <string name="tts_one_oclock">a ore una</string>
- <string name="tts_oclock">a ore %s</string>
- <string name="clipboard_copy_ok">Copiato nella clipboard</string>
- <string name="percent_favorite_points">%\ preferiti</string>
- <string name="cgeo_shortcut">collegamento a c:geo</string>
- <string name="create_shortcut">Crea collegamento</string>
- <string-array name="log_image_scales">
- <item>Dimensioni originali</item>
- <item>512 px</item>
- <item>640 px</item>
- <item>800 px</item>
- <item>1024 px</item>
- </string-array>
- <plurals name="caches_eta_mins">
- <item quantity="one">minuto</item>
- <item quantity="other">minuti</item>
- </plurals>
- <plurals name="cache_counts">
- <item quantity="one">Un cache</item>
- <item quantity="other">%1$d cache</item>
- </plurals>
- <plurals name="waypoints">
- <item quantity="one">1 Waypoint</item>
- <item quantity="other">%d Waypoint</item>
- </plurals>
<plurals name="tts_kilometers">
<item quantity="one">un chilometro</item>
<item quantity="other">%s chilometri</item>
</plurals>
+ <string name="tts_one_meter">un metro</string>
<plurals name="tts_meters">
<item quantity="one">un metro</item>
<item quantity="other">%s metri</item>
</plurals>
+ <string name="tts_one_mile">un miglio</string>
<plurals name="tts_miles">
<item quantity="one">un miglio</item>
<item quantity="other">%s miglia</item>
</plurals>
+ <string name="tts_one_foot">un piede</string>
<plurals name="tts_feet">
<item quantity="one">un piede</item>
<item quantity="other">%s piedi</item>
</plurals>
+ <string name="tts_one_oclock">a ore una</string>
+ <string name="tts_oclock">a ore %s</string>
+ <string name="clipboard_copy_ok">Copiato nella clipboard</string>
<plurals name="days_ago">
<item quantity="one">ieri</item>
<item quantity="other">%d giorni fa</item>
@@ -1174,4 +1152,8 @@
<item quantity="one">%s preferito</item>
<item quantity="other">%s preferiti</item>
</plurals>
+ <string name="percent_favorite_points">%\ preferiti</string>
+ <string name="cgeo_shortcut">collegamento a c:geo</string>
+ <string name="create_shortcut">Crea collegamento</string>
+ <string name="send">Invia</string>
</resources>
diff --git a/main/res/values-ja/strings.xml b/main/res/values-ja/strings.xml
index 9164a8c..649210c 100644
--- a/main/res/values-ja/strings.xml
+++ b/main/res/values-ja/strings.xml
@@ -9,7 +9,6 @@
<string name="about">c:geoについて</string>
<string name="latitude">緯度</string>
<string name="longitude">経度</string>
- <string name="action_bar_share_title">キャッシュのリンクを共有</string>
<string name="settings_titlebar">c:geo 設定</string>
<string name="all_types">全てのタイプのキャッシュ</string>
<string name="traditional">トラディショナルキャッシュ</string>
@@ -76,22 +75,9 @@
<string name="log_saving">ログを送信中…</string>
<string name="log_saving_and_uploading">ログと画像を送信中…</string>
<string name="log_clear">消去</string>
- <string name="log_post">ログの投稿</string>
- <string name="log_post_rate">ログの投稿と評価:</string>
- <string name="log_post_no_rate">ログの投稿(未評価)</string>
<string name="log_post_not_possible">ログのページをロード中…</string>
<string name="log_add">挿入</string>
- <string name="log_rating">評価</string>
<string name="log_no_rating">未評価</string>
- <string name="log_stars_1">星1つ</string>
- <string name="log_stars_15">星1.5</string>
- <string name="log_stars_2">星2つ</string>
- <string name="log_stars_25">星2.5</string>
- <string name="log_stars_3">星3つ</string>
- <string name="log_stars_35">星3.5</string>
- <string name="log_stars_4">星4つ</string>
- <string name="log_stars_45">星4.5</string>
- <string name="log_stars_5">星5つ</string>
<string name="log_stars_1_description">お粗末</string>
<string name="log_stars_15_description">見劣りする</string>
<string name="log_stars_2_description">平均以下</string>
@@ -110,7 +96,6 @@
<string name="log_smilies">スマイルマーク</string>
<string name="log_image">画像</string>
<string name="log_image_attach">画像を添付</string>
- <string name="log_image_edit">添付画像を変更</string>
<string name="log_image_stored">ファイル選択</string>
<string name="log_image_camera">撮影</string>
<string name="log_image_caption">タイトル</string>
@@ -118,6 +103,13 @@
<string name="log_image_scale">拡大縮小</string>
<string name="log_password_title">Log Password:</string>
<string name="log_hint_log_password">Enter your log password</string>
+ <string-array name="log_image_scales">
+ <item>実サイズ</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<string name="translate_to_sys_lang">%sに翻訳</string>
<string name="translate_to_english">英語に翻訳</string>
<string name="translate_length_warning">文章が長すぎるので翻訳できないかもしれません。</string>
@@ -235,12 +227,14 @@
<string name="caches_more_caches_currently">現在</string>
<string name="caches_downloading">キャッシュ情報をダウンロード中…\n残り時間: </string>
<string name="caches_eta_ltm">1分以内</string>
+ <plurals name="caches_eta_mins">
+ <item quantity="other">%d 分</item>
+ </plurals>
<string name="caches_store_offline">オフライン用に保存</string>
<string name="caches_store_selected">選択したキャッシュを保存</string>
<string name="caches_history">履歴</string>
<string name="caches_on_map">地図で表示</string>
<string name="caches_sort">並び替え</string>
- <string name="caches_sort_title">並び替え</string>
<string name="caches_sort_distance">距離</string>
<string name="caches_sort_difficulty">難易度</string>
<string name="caches_sort_terrain">地形</string>
@@ -262,13 +256,6 @@
<string name="caches_select_invert">選択を反転</string>
<string name="caches_nearby">現在地の近く</string>
<string name="caches_manage">管理</string>
- <string name="caches_drop_selected">選択したキャッシュを削除</string>
- <string name="caches_drop_selected_ask">選択したキャッシュをデバイスから削除しますか?</string>
- <string name="caches_drop_all">全て削除</string>
- <string name="caches_drop_all_ask">全てのキャッシュをデバイスから削除しますか?</string>
- <string name="caches_drop_stored">削除</string>
- <string name="caches_drop_progress">キャッシュを削除中</string>
- <string name="caches_drop_all_and_list">全て削除し、リストも消去</string>
<string name="caches_delete_events">過去のイベントを削除</string>
<string name="caches_refresh_selected">選択したキャッシュを更新</string>
<string name="caches_refresh_all">全てのキャッシュを更新</string>
@@ -295,10 +282,8 @@
<string name="caches_removing_from_history">履歴から削除中…</string>
<string name="caches_clear_offlinelogs">全てのオフラインログを削除</string>
<string name="caches_clear_offlinelogs_progress">全てのオフラインログを削除中</string>
- <string name="list_menu">リスト</string>
<string name="list_menu_create">新しいリストを作成</string>
<string name="list_menu_drop">このリストを消去</string>
- <string name="list_menu_change">別のリストにする</string>
<string name="list_menu_rename">このリスト名を変更</string>
<string name="list_title">リストの選択</string>
<string name="list_inbox">保存済み</string>
@@ -381,8 +366,6 @@
<string name="init_signature_template_url">URL</string>
<string name="init_ratingwanted">GCvote評価</string>
<string name="init_summary_ratingwanted">キャッシュの評価をGCvote.comから取得</string>
- <string name="init_friendlogswanted">友達のログページ</string>
- <string name="init_summary_friendlogswanted">友達の書いたログを別ページに表示</string>
<string name="init_openlastdetailspage">最後に表示したページ</string>
<string name="init_summary_openlastdetailspage">キャッシュ情報の表示では最後に表示したページを開く</string>
<string name="init_autoload">詳細表示</string>
@@ -491,6 +474,9 @@
<string name="auth_dialog_completed_twitter">c:geoはTwitterにポストするための認証を受けました。</string>
<string name="auth_ocde">opencaching.de</string>
<string name="auth_dialog_completed_oc">c:geoは%sと連携するための認証を受けました。</string>
+ <plurals name="cache_counts">
+ <item quantity="other">%1$d キャッシュ</item>
+ </plurals>
<string name="cache_offline">オフライン</string>
<string name="cache_offline_refresh">更新</string>
<string name="cache_offline_drop">削除</string>
@@ -506,7 +492,6 @@
<string name="cache_premium">プレミアム会員</string>
<string name="cache_attributes">属性</string>
<string name="cache_inventory">目録</string>
- <string name="cache_log_offline">オフラインログ</string>
<string name="cache_log_images_title">ログの添付画像</string>
<string name="cache_log_image_default_title">写真</string>
<string name="cache_personal_note">パーソナルノート</string>
@@ -517,8 +502,6 @@
<string name="cache_personal_note_uploading">パーソナルノートをアップロード中</string>
<string name="cache_personal_note_upload_done">パーソナルノートをアップロードしました</string>
<string name="cache_personal_note_upload_cancelled">パーソナルノートのアップロードをキャンセルしました</string>
- <string name="cache_personal_note_unstored">キャッシュ情報が保存されていません</string>
- <string name="cache_personal_note_store">パーソナルノートを有効にするためにキャッシュ情報を保存します。</string>
<string name="cache_description">説明</string>
<string name="cache_description_long">全て表示</string>
<string name="cache_description_table_note">キャッシュ情報の説明にはhtmlを使ったテーブル表が含まれています。正しく表示するには%sで開く必要があるかもしれません。</string>
@@ -535,10 +518,12 @@
<string name="cache_list_unknown">Not in a list</string>
<string name="cache_images">画像</string>
<string name="cache_waypoints">ウェイポイント</string>
+ <plurals name="waypoints">
+ <item quantity="other">%d ウェイポイント</item>
+ </plurals>
<string name="cache_waypoints_add">ウェイポイントを追加</string>
<string name="cache_hint">ヒント</string>
<string name="cache_logs">ログブック</string>
- <string name="cache_logsfriends">ログブック(友達)</string>
<string name="cache_dialog_loading_details">キャッシュの詳細をロード中…</string>
<string name="cache_dialog_loading_details_status_loadpage">ページをロード中</string>
<string name="cache_dialog_loading_details_status_details">詳細を処理中</string>
@@ -584,10 +569,8 @@
<string name="cache_menu_refresh">更新</string>
<string name="cache_menu_share">キャッシュを共有</string>
<string name="cache_menu_move_list">他のリストに移動</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">キャッシュビーコン</string>
<string name="cache_status">状態</string>
<string name="cache_status_offline_log">保存済みのログ</string>
<string name="cache_status_found">見つかった</string>
@@ -701,10 +684,7 @@
<string name="map_view_map">地図の変更</string>
<string name="map_modes">表示切替</string>
<string name="map_trail_show">軌跡を表示</string>
- <string name="map_trail_hide">軌跡を非表示</string>
<string name="map_circles_show">0.1マイル円を表示</string>
- <string name="map_circles_hide">円を非表示</string>
- <string name="map_mycaches_show">所有/見つけたキャッシュを表示</string>
<string name="map_mycaches_hide">所有/見つけたキャッシュを非表示</string>
<string name="map_theme_builtin">デフォルト</string>
<string name="map_theme_select">地図のテーマを選択</string>
@@ -784,7 +764,6 @@
<string name="use_gps">GPSのみ使用</string>
<string name="use_compass">GPSとコンパスを使用</string>
<string name="destination_select">目的地を選択</string>
- <string name="destination_set">目的地を入力</string>
<string name="navigation_direct_navigation">Direct Navigation</string>
<string name="navigation_target">Target</string>
<string name="err_nav_no_coordinates">座標値が未入力なのでナビゲーションが開始できません</string>
@@ -1023,7 +1002,6 @@ Google翻訳アプリで各言語の辞書をダウンロードしておけば
<string name="website">Webサイト: <a href="">cgeo.org</a></string>
<string name="facebook">Facebook: <a href="">c:geo page</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">マニュアル: <a href="">c:geo マニュアル(英語)</a></string>
<string name="market">Android: <a href="">Google Playのc:geo</a></string>
<string name="about_twitter">キャッシュのログを書いたら<b>c:geo</b>にTwitterでつぶやいてほしい?</string>
<string name="status_new_release" tools:ignore="UnusedResources">新しいバージョンがあります。\nクリックしてインストールしてください。</string>
@@ -1036,29 +1014,13 @@ Google翻訳アプリで各言語の辞書をダウンロードしておけば
<string name="tts_start">音声案内開始</string>
<string name="tts_stop">音声案内終了</string>
<string name="tts_one_kilometer">1 km</string>
+ <plurals name="tts_kilometers">
+ <item quantity="other">%s キロメートル</item>
+ </plurals>
<string name="tts_one_meter">1 m</string>
<string name="tts_one_mile">1 マイル</string>
<string name="tts_one_foot">1 フィート</string>
<string name="tts_one_oclock">1 時</string>
<string name="tts_oclock">%s 時</string>
<string name="clipboard_copy_ok">クリップボードにコピーしました</string>
- <string-array name="log_image_scales">
- <item>実サイズ</item>
- <item>512 px</item>
- <item>640 px</item>
- <item>800 px</item>
- <item>1024 px</item>
- </string-array>
- <plurals name="caches_eta_mins">
- <item quantity="other">分</item>
- </plurals>
- <plurals name="cache_counts">
- <item quantity="other">%1$d キャッシュ</item>
- </plurals>
- <plurals name="waypoints">
- <item quantity="other">%d ウェイポイント</item>
- </plurals>
- <plurals name="tts_kilometers">
- <item quantity="other">%s キロメートル</item>
- </plurals>
</resources>
diff --git a/main/res/values-lt/strings.xml b/main/res/values-lt/strings.xml
index 2494f90..6e16c65 100644
--- a/main/res/values-lt/strings.xml
+++ b/main/res/values-lt/strings.xml
@@ -8,7 +8,6 @@
<string name="about">Apie c:geo</string>
<string name="latitude">Platuma</string>
<string name="longitude">Ilguma</string>
- <string name="action_bar_share_title">Dalintis nuoroda į slėptuvę</string>
<string name="settings_titlebar">c:geo Nustatymai</string>
<string name="all_types">Visos slėptuvių rūšys</string>
<string name="traditional">Tradicinė slėptuvė</string>
@@ -79,22 +78,9 @@
<string name="log_saving">Siunčiamas įrašas…</string>
<string name="log_saving_and_uploading">Siunčiamas įrašas ir įkeliama nuotrauka…</string>
<string name="log_clear">Išvalyti</string>
- <string name="log_post">Siųsti įrašą</string>
- <string name="log_post_rate">Siųsti įrašą ir Reitinguoti</string>
- <string name="log_post_no_rate">Siųsti įrašą ir Nereitinguoti</string>
<string name="log_post_not_possible">Įkeliamas įrašo puslapis…</string>
<string name="log_add">Pridėti</string>
- <string name="log_rating">Reitingas</string>
<string name="log_no_rating">Nėra reitingo</string>
- <string name="log_stars_1">1 žvaigždė</string>
- <string name="log_stars_15">1,5 žvaigždės</string>
- <string name="log_stars_2">2 žvaigždės</string>
- <string name="log_stars_25">2,5 žvaigždės</string>
- <string name="log_stars_3">3 žvaigždės</string>
- <string name="log_stars_35">3,5 žvaigždės</string>
- <string name="log_stars_4">4 žvaigždės</string>
- <string name="log_stars_45">4,5 žvaigždės</string>
- <string name="log_stars_5">5 žvaigždės</string>
<string name="log_stars_1_description">Prasta</string>
<string name="log_stars_15_description">Pakankamai prasta</string>
<string name="log_stars_2_description">Žemiau vidutinio</string>
@@ -113,7 +99,6 @@
<string name="log_smilies">Šypsenėlės</string>
<string name="log_image">Nuotrauka</string>
<string name="log_image_attach">Pridėti nuotrauką</string>
- <string name="log_image_edit">Taisyti nuotrauką</string>
<string name="log_image_stored">Esamą</string>
<string name="log_image_camera">Naują</string>
<string name="log_image_caption">Antraštė</string>
@@ -122,6 +107,13 @@
<string name="log_password_title">Įrašo slaptažodis:</string>
<string name="log_hint_log_password">Įveskite savo įrašo slaptažodį</string>
<string name="log_oc_team_comment">OC komandos komentaras</string>
+ <string-array name="log_image_scales">
+ <item>Nekeisti dydžio</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<string name="translate_to_sys_lang">Išversti į %s</string>
<string name="translate_to_english">Išversti į anglų</string>
<string name="translate_length_warning">Vertimas gali nepavykti jei tekstas labai ilgas.</string>
@@ -214,6 +206,7 @@
<string name="info_select_logimage_cancelled">Nuotraukos pasirinkimas ar fotografavimas buvo atšauktas.</string>
<string name="info_stored_image">Nauja nuotrauka įrašyta į:</string>
<string name="info_storing_static_maps">Bandoma išsaugoti statinius žemėlapius</string>
+ <string name="info_cache_saved">Slėptuvė buvo išsaugota lokaliai</string>
<string name="loc_last">Paskutinė žinoma vieta</string>
<string name="loc_net">Tinklas</string>
<string name="loc_gps">GPS</string>
@@ -221,6 +214,7 @@
<string name="loc_trying">Bandoma nustatyti</string>
<string name="loc_no_addr">Nežinomas adresas</string>
<string name="loc_gps_disabled">GPS išjungtas</string>
+ <string name="menu_centerposition">Centruoti mano poziciją</string>
<string name="menu_about">Apie c:geo</string>
<string name="menu_helpers">Naudingos programos</string>
<string name="menu_settings">Nustatymai</string>
@@ -240,14 +234,18 @@
<string name="caches_more_caches_no">Daugiau slėptuvių nėra</string>
<string name="caches_more_caches_loading">Įkeliamos slėptuvės…</string>
<string name="caches_more_caches_currently">dabar</string>
- <string name="caches_downloading">Atsisiunčiamos slėptuvės…\nUžtruks</string>
+ <string name="caches_downloading">Atnaujinamos slėptuvės…\nUžtruks</string>
<string name="caches_eta_ltm">mažiau nei minutę</string>
+ <plurals name="caches_eta_mins">
+ <item quantity="one">%d minutę</item>
+ <item quantity="few">%d minutes</item>
+ <item quantity="other">%d minučių</item>
+ </plurals>
<string name="caches_store_offline">Išsaugoti slėptuves</string>
<string name="caches_store_selected">Išsaugoti pasirinktas</string>
<string name="caches_history">Istorija</string>
- <string name="caches_on_map">Žemėlapyje</string>
+ <string name="caches_on_map">Rodyti žemėlapyje</string>
<string name="caches_sort">Rūšiuoti</string>
- <string name="caches_sort_title">Rūšiuoti pagal</string>
<string name="caches_sort_distance">Atstumą</string>
<string name="caches_sort_difficulty">Sudėtingumą</string>
<string name="caches_sort_terrain">Vietovę</string>
@@ -269,13 +267,11 @@
<string name="caches_select_invert">Žymėti priešingai</string>
<string name="caches_nearby">Netoliese</string>
<string name="caches_manage">Valdyti</string>
- <string name="caches_drop_selected">Išmesti pasirinktas</string>
- <string name="caches_drop_selected_ask">Ar norite pašalinti pasirinktas slėptuves iš prietaiso?</string>
- <string name="caches_drop_all">Išmesti visas</string>
- <string name="caches_drop_all_ask">Ar norite pašalinti visas slėptuves iš dabartinio sąrašo?</string>
- <string name="caches_drop_stored">Išmesti išsaugotas</string>
- <string name="caches_drop_progress">Pašalinamos slėptuvės</string>
- <string name="caches_drop_all_and_list">Išmesti visas ir panaikinti sąrašą</string>
+ <string name="caches_remove_all">Pašalinti visas</string>
+ <string name="caches_remove_all_confirm">Ar norite pašalinti visas %s slėptuves iš dabartinio sąrašo?</string>
+ <string name="caches_remove_selected">Pašalinti pasirinktą</string>
+ <string name="caches_remove_selected_confirm">Ar norite pašalinti pasirinktas %s slėptuves iš prietaiso?</string>
+ <string name="caches_remove_progress">Pašalinamos slėptuvės</string>
<string name="caches_delete_events">Ištrinti praeities įvykius</string>
<string name="caches_refresh_selected">Atnaujinti pasirinktas</string>
<string name="caches_refresh_all">Atnaujinti visas</string>
@@ -283,7 +279,6 @@
<string name="caches_move_all">Perkelti visas</string>
<string name="caches_map_locus">Locus</string>
<string name="caches_map_locus_export">Eksportuoti į Locus</string>
- <string name="caches_map_mapswithme">MapsWithMe</string>
<string name="caches_recaptcha_title">reCAPTCHA</string>
<string name="caches_recaptcha_explanation">Prašome įvesti tekstą kurį matote paveikslėlyje. Tai leis atsisiųsti slėptuvės koordinates ir tai galima išjungti Nustatymuose.</string>
<string name="caches_recaptcha_hint">Tekstas iš paveikslėlio</string>
@@ -303,11 +298,10 @@
<string name="caches_removing_from_history">Pašalinama iš Istorijos…</string>
<string name="caches_clear_offlinelogs">Išvalyti išsaugotus įrašus</string>
<string name="caches_clear_offlinelogs_progress">Išvalomi išsaugoti įrašai</string>
- <string name="list_menu">Sąrašas</string>
<string name="list_menu_create">Sukurti naują sąrašą</string>
<string name="list_menu_drop">Išmesti dabartinį sąrašą</string>
- <string name="list_menu_change">Pakeisti sąrašą</string>
<string name="list_menu_rename">Pervadinti dabartinį sąrašą</string>
+ <string name="list_menu_import">Importuoti</string>
<string name="list_title">Pasirinkti sąrašą</string>
<string name="list_inbox">Išsaugota</string>
<string name="list_all_lists">Visos slėptuvės</string>
@@ -354,7 +348,7 @@
<string name="settings_activate_ox">Aktyvuoti</string>
<string name="settings_gc_legal_note">Naudodamiesi geocaching.com paslaugomis, Jūs sutinkate su Groundspeak naudojimo taisyklėmis.</string>
<string name="settings_info_facebook_login_title">Facebook prisijungimas</string>
- <string name="settings_info_facebook_login">c:geo negali prisijungti prie geocaching.com su jūsų Facebook paskyra. Bet yra paprastas problemos sprendimas …</string>
+ <string name="settings_info_facebook_login">c:geo negali prisijungti prie geocaching.com su jūsų Facebook paskyra. Bet yra paprastas problemos sprendimas…</string>
<string name="settings_authorize">Leisti c:geo prisijungti</string>
<string name="settings_reauthorize">Dar kartą leisti c:geo prisijungti</string>
<string name="init_oc">Opencaching.de</string>
@@ -371,6 +365,8 @@
<string name="init_oc_ro">Opencaching.ro</string>
<string name="settings_activate_oc_ro">Aktyvuoti</string>
<string name="init_oc_ro_description">Leiskite c:geo prisijungti prie opencaching.ro tam, kad galėtumėt ieškoti slėptuvių ir prieiti/filtruoti rastas slėptuves.</string>
+ <string name="settings_activate_oc_uk">Aktyvuoti</string>
+ <string name="init_oc_uk_description">Leiskite c:geo prisijungti prie opencaching.org.uk tam, kad galėtumėt ieškoti slėptuvių ir prieiti/filtruoti rastas slėptuves.</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="settings_activate_twitter">Aktyvuoti</string>
@@ -400,8 +396,8 @@
<string name="init_signature_template_log">Įrašo tekstas</string>
<string name="init_ratingwanted">GCvote reitingas</string>
<string name="init_summary_ratingwanted">Įkelti slėptuvės reitingą iš GCvote.com</string>
- <string name="init_friendlogswanted">Rodyti draugų įrašus</string>
- <string name="init_summary_friendlogswanted">Rodyti papildomą draugų įrašų puslapį</string>
+ <string name="init_friends_and_own_logs_wanted">Rodyti draugų/savo</string>
+ <string name="init_summary_friends_and_own_logs_wanted">Rodyti papildomą draugų ir savų įrašų puslapį</string>
<string name="init_openlastdetailspage">Paskutinis naudotas puslapis</string>
<string name="init_summary_openlastdetailspage">Atidaryti kitą slėptuvę nuo paskutinio naudoto puslapio</string>
<string name="init_autoload">Ilgas aprašymas</string>
@@ -490,6 +486,9 @@
<string name="init_maintenance">Priežiūra</string>
<string name="init_maintenance_directories_note">c:geo saugo nuotraukas, įrašų nuotraukas ir kitus failus, susijusius su slėptuve, atskirame kataloge. Kai kuriais atvejais (pvz., importuojant/eksportuojant duomenų bazę) šiame kataloge gali likti pasenusių failų, kuriuos galima panaikinti čia.</string>
<string name="init_maintenance_directories">Ištrinti nebereikalingus failus</string>
+ <string name="init_create_memory_dump">Sukurti atminties dump failą</string>
+ <string name="init_memory_dump">Atminties dump failas</string>
+ <string name="init_memory_dumped">Atminties dump failas išsaugotas %s</string>
<string name="settings_open_website">Atidaryti interneto svetainę</string>
<string name="settings_settings">Nustatymai</string>
<string name="settings_information">Informacija</string>
@@ -536,6 +535,11 @@
<string name="auth_dialog_completed_twitter">c:geo priregistruota ir jai leidžiama rašyti Twitter paskyroje.</string>
<string name="auth_ocde">opencaching.de</string>
<string name="auth_dialog_completed_oc">c:geo dabar registruota ir leidžiama naudotis %s.</string>
+ <plurals name="cache_counts">
+ <item quantity="one">%1$d slėptuvė</item>
+ <item quantity="few">%1$d slėptuvės</item>
+ <item quantity="other">%1$d slėptuvių</item>
+ </plurals>
<string name="cache_offline">Išsaugota</string>
<string name="cache_offline_refresh">Naujinti</string>
<string name="cache_offline_drop">Išmesti</string>
@@ -551,7 +555,6 @@
<string name="cache_premium">Premium</string>
<string name="cache_attributes">Atributai</string>
<string name="cache_inventory">Inventorius</string>
- <string name="cache_log_offline">Įrašas neprisijungus</string>
<string name="cache_log_images_title">Nuotraukos iš įrašo</string>
<string name="cache_log_image_default_title">Nuotrauka</string>
<string name="cache_personal_note">Asmeninė pastaba</string>
@@ -562,8 +565,6 @@
<string name="cache_personal_note_uploading">Įkeliama asmeninė pastaba</string>
<string name="cache_personal_note_upload_done">Asmeninė pastaba įkelta</string>
<string name="cache_personal_note_upload_cancelled">Asmeninės pastabos įkėlimas atšauktas</string>
- <string name="cache_personal_note_unstored">Slėptuvė neišsaugota</string>
- <string name="cache_personal_note_store">Rašyti asmeninę pastabą galima tik išsaugotos slėptuvės aprašyme.</string>
<string name="cache_description">Aprašymas</string>
<string name="cache_description_long">Ilgas aprašymas</string>
<string name="cache_description_table_note">Aprašymas turi lentelės formatavimą ir norint pamatyti jį atvaizduotą teisingai gali tekti apsilankyti %s.</string>
@@ -580,10 +581,15 @@
<string name="cache_list_unknown">Nėra sąraše</string>
<string name="cache_images">Nuotraukos</string>
<string name="cache_waypoints">Papildomi taškai</string>
+ <plurals name="waypoints">
+ <item quantity="one">%d papildomas taškas</item>
+ <item quantity="few">%d papildomi taškai</item>
+ <item quantity="other">%d papildomų taškų</item>
+ </plurals>
<string name="cache_waypoints_add">Pridėti papildomą tašką</string>
<string name="cache_hint">Užuomina</string>
<string name="cache_logs">Įrašai</string>
- <string name="cache_logsfriends">Draugų įrašai</string>
+ <string name="cache_logs_friends_and_own">Draugų/savi įrašai</string>
<string name="cache_dialog_loading_details">Įkeliama slėptuvės informacija…</string>
<string name="cache_dialog_loading_details_status_loadpage">Įkeliamas puslapis</string>
<string name="cache_dialog_loading_details_status_details">Apdorojama informacija</string>
@@ -598,7 +604,7 @@
<string name="cache_dialog_offline_drop_title">Pašalinti</string>
<string name="cache_dialog_offline_drop_message">Slėptuvė pašalinama iš prietaiso atminties…</string>
<string name="cache_dialog_refresh_title">Atnaujinti</string>
- <string name="cache_dialog_refresh_message">Slėptuvės informacija atsiunčiama iš naujo…</string>
+ <string name="cache_dialog_refresh_message">Atnaujinama slėptuvės informacija…</string>
<string name="cache_dialog_watchlist_add_title">Įtraukti į stebimų slėptuvių sąrašą</string>
<string name="cache_dialog_watchlist_add_message">Slėptuvė įtraukiama į stebimų slėptuvių sąrašą…</string>
<string name="cache_dialog_watchlist_remove_title">Pašalinti iš stebimų slėptuvių sąrašo</string>
@@ -629,15 +635,13 @@
<string name="cache_menu_refresh">Atnaujinti</string>
<string name="cache_menu_share">Bendrinti slėptuvę</string>
<string name="cache_menu_move_list">Perkelti į kitą sąrašą</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">Cache Beacon</string>
<string name="cache_menu_pebble">Pebble</string>
- <string name="cache_menu_mapswithme">MapsWithMe</string>
<string name="cache_status">Būsena</string>
- <string name="cache_status_offline_log">Įrašas išsaugotas</string>
+ <string name="cache_status_offline_log">Išsaugotas įrašas</string>
<string name="cache_status_found">Rasta</string>
+ <string name="cache_not_status_found">Nerasta</string>
<string name="cache_status_archived">Suarchyvuota</string>
<string name="cache_status_disabled">Išjungta</string>
<string name="cache_status_premium">Tik Premium nariams</string>
@@ -749,10 +753,7 @@
<string name="map_view_map">Žemėlapio šaltinis</string>
<string name="map_modes">Žemėlapio nustatymai</string>
<string name="map_trail_show">Rodyti pėdsaką</string>
- <string name="map_trail_hide">Slėpti pėdsaką</string>
<string name="map_circles_show">Rodyti apskritimus</string>
- <string name="map_circles_hide">Slėpti apskritimus</string>
- <string name="map_mycaches_show">Rodyti savo/rastas slėptuves</string>
<string name="map_mycaches_hide">Slėpti savo/rastas slėptuves</string>
<string name="map_theme_builtin">Numatyta</string>
<string name="map_theme_select">Pasirinkti žemėlapio temą</string>
@@ -832,10 +833,10 @@
<string name="user_menu_open_contact">Atidaryti kontakto kortelę</string>
<string name="navigation">Navigacija</string>
<string name="compass_title">Kompasas</string>
+ <string name="compass_sensors">Aktyvuoti sensorius</string>
<string name="use_gps">Naudoti tik GPS</string>
<string name="use_compass">Naudoti GPS ir kompasą</string>
<string name="destination_select">Pasirinkite tikslą</string>
- <string name="destination_set">Nustatyti tikslą</string>
<string name="navigation_direct_navigation">Tiesioginė navigacija</string>
<string name="navigation_target">Tikslas</string>
<string name="err_nav_no_coordinates">Be koordinačių navigacijos pradėti neįmanoma</string>
@@ -1105,7 +1106,6 @@
<string name="website">Tinklapis: <a href="">cgeo.org</a></string>
<string name="facebook">Facebook: <a href="">c:geo page</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Vadovas: <a href="">c:geo in a Nutshell</a></string>
<string name="market">Android: <a href="">c:geo on Google Play</a></string>
<string name="about_twitter">Kaskart registruojant slėptuvę <b>c:geo</b> paskelbs nauja statusą Twitter paskyroje.</string>
<string name="status_new_release" tools:ignore="UnusedResources">Galima nauja versija. \nPaspauskite čia ir įdiekite.</string>
@@ -1120,59 +1120,34 @@
<string name="tts_stop">Nekalbėti</string>
<string name="err_tts_lang_not_supported">Dabartinė kalba nepalaikoma teksto-į-kalbą.</string>
<string name="tts_one_kilometer">vienas kilometras</string>
- <string name="tts_one_meter">vienas metras</string>
- <string name="tts_one_mile">viena mylia</string>
- <string name="tts_one_foot">viena pėda</string>
- <string name="tts_one_oclock">one o\'clock</string>
- <string name="tts_oclock">%s o\'clock</string>
- <string name="clipboard_copy_ok">Nukopijuota į mainų sritį</string>
- <string name="percent_favorite_points">%\ mėgiamos</string>
- <string name="cgeo_shortcut">c:geo nuoroda</string>
- <string name="create_shortcut">Sukurti nuorodą</string>
- <string-array name="log_image_scales">
- <item>Nekeisti dydžio</item>
- <item>512 px</item>
- <item>640 px</item>
- <item>800 px</item>
- <item>1024 px</item>
- </string-array>
- <plurals name="caches_eta_mins">
- <item quantity="one">minutę</item>
- <item quantity="few">minutes</item>
- <item quantity="other">minučių</item>
- </plurals>
- <plurals name="cache_counts">
- <item quantity="one">%1$d slėptuvė</item>
- <item quantity="few">%1$d slėptuvės</item>
- <item quantity="other">%1$d slėptuvių</item>
- </plurals>
- <plurals name="waypoints">
- <item quantity="one">1papildomas taškas</item>
- <item quantity="few">%d papildomi taškai</item>
- <item quantity="other">%d papildomų taškų</item>
- </plurals>
<plurals name="tts_kilometers">
<item quantity="one">%s kilometras</item>
<item quantity="few">%s kilometrai</item>
<item quantity="other">%s kilometrų</item>
</plurals>
+ <string name="tts_one_meter">vienas metras</string>
<plurals name="tts_meters">
<item quantity="one">%s metras</item>
<item quantity="few">%s metrai</item>
<item quantity="other">%s metrų</item>
</plurals>
+ <string name="tts_one_mile">viena mylia</string>
<plurals name="tts_miles">
<item quantity="one">%s mylia</item>
<item quantity="few">%s mylios</item>
<item quantity="other">%s mylių</item>
</plurals>
+ <string name="tts_one_foot">viena pėda</string>
<plurals name="tts_feet">
<item quantity="one">%s pėda</item>
<item quantity="few">%s pėdos</item>
<item quantity="other">%s pėdų</item>
</plurals>
+ <string name="tts_one_oclock">one o\'clock</string>
+ <string name="tts_oclock">%s o\'clock</string>
+ <string name="clipboard_copy_ok">Nukopijuota į mainų sritį</string>
<plurals name="days_ago">
- <item quantity="one">vakar</item>
+ <item quantity="one">%d dieną atgal</item>
<item quantity="few">%d dienas atgal</item>
<item quantity="other">%d dienų atgal</item>
</plurals>
@@ -1181,4 +1156,8 @@
<item quantity="few">%s mėgiamos</item>
<item quantity="other">%s mėgiamų</item>
</plurals>
+ <string name="percent_favorite_points">%\ mėgiamos</string>
+ <string name="cgeo_shortcut">c:geo nuoroda</string>
+ <string name="create_shortcut">Sukurti nuorodą</string>
+ <string name="send">Siųsti</string>
</resources>
diff --git a/main/res/values-nb/strings.xml b/main/res/values-nb/strings.xml
index 6fe79e1..1de6492 100644
--- a/main/res/values-nb/strings.xml
+++ b/main/res/values-nb/strings.xml
@@ -9,7 +9,6 @@
<string name="about">Om c:geo</string>
<string name="latitude">Breddegrad</string>
<string name="longitude">Lengdegrad</string>
- <string name="action_bar_share_title">Del linken til cachen</string>
<string name="settings_titlebar">c:geo-innstillinger</string>
<string name="all_types">Alle cachetyper</string>
<string name="traditional">Tradisjonell cache</string>
@@ -18,6 +17,7 @@
<string name="letterbox">Letterbox hybrid</string>
<string name="event">Eventcache</string>
<string name="mega">Megaevent-cache</string>
+ <string name="giga">Gigaevent</string>
<string name="earth">Earthcache</string>
<string name="cito">\"Cache in trash out\"-event</string>
<string name="webcam">Webkameracache</string>
@@ -78,22 +78,9 @@
<string name="log_saving">Lagrer logg…</string>
<string name="log_saving_and_uploading">Sender logg og laster opp bilde…</string>
<string name="log_clear">Tøm</string>
- <string name="log_post">Last opp loggen</string>
- <string name="log_post_rate">Last opp loggen og rangér</string>
- <string name="log_post_no_rate">Last opp loggen uten å rangere</string>
<string name="log_post_not_possible">Laster loggsiden…</string>
<string name="log_add">Legg til</string>
- <string name="log_rating">Rangering</string>
<string name="log_no_rating">Ingen rangering</string>
- <string name="log_stars_1">1 stjerne</string>
- <string name="log_stars_15">1,5 stjerner</string>
- <string name="log_stars_2">2 stjerner</string>
- <string name="log_stars_25">2,5 stjerner</string>
- <string name="log_stars_3">3 stjerner</string>
- <string name="log_stars_35">3,5 stjerner</string>
- <string name="log_stars_4">4 stjerner</string>
- <string name="log_stars_45">4,5 stjerner</string>
- <string name="log_stars_5">5 stjerner</string>
<string name="log_stars_1_description">Dårlig</string>
<string name="log_stars_15_description">Ganske dårlig</string>
<string name="log_stars_2_description">Under gjennomsnitt</string>
@@ -112,7 +99,6 @@
<string name="log_smilies">Smilefjes</string>
<string name="log_image">Bilde</string>
<string name="log_image_attach">Legg ved bilde</string>
- <string name="log_image_edit">Rediger bilde</string>
<string name="log_image_stored">Eksisterende</string>
<string name="log_image_camera">Nytt</string>
<string name="log_image_caption">Bildetekst</string>
@@ -121,6 +107,13 @@
<string name="log_password_title">Passord for logg:</string>
<string name="log_hint_log_password">Angi passordet for logg</string>
<string name="log_oc_team_comment">Kommentar fra OC-teamet</string>
+ <string-array name="log_image_scales">
+ <item>Ingen skalering</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<string name="translate_to_sys_lang">Oversett til %s</string>
<string name="translate_to_english">Oversett til engelsk</string>
<string name="translate_length_warning">Oversettelse kan mislykkes med store mengder tekst.</string>
@@ -213,6 +206,7 @@
<string name="info_select_logimage_cancelled">Valg av bilde ble avbrutt.</string>
<string name="info_stored_image">Nytt bilde lagret til:</string>
<string name="info_storing_static_maps">Forsøker å lagre statisk kart</string>
+ <string name="info_cache_saved">Cachen er nå lagret lokalt</string>
<string name="loc_last">Sist sett</string>
<string name="loc_net">Nettverk</string>
<string name="loc_gps">GPS</string>
@@ -220,6 +214,7 @@
<string name="loc_trying">Prøver å lokalisere</string>
<string name="loc_no_addr">Ukjent adresse</string>
<string name="loc_gps_disabled">GPS deaktivert</string>
+ <string name="menu_centerposition">Midtstill kartet på min posisjon</string>
<string name="menu_about">Om c:geo</string>
<string name="menu_helpers">Verktøyprogrammer</string>
<string name="menu_settings">Instillinger</string>
@@ -241,12 +236,15 @@
<string name="caches_more_caches_currently">for øyeblikket</string>
<string name="caches_downloading">Laster ned cacher…\nETA: </string>
<string name="caches_eta_ltm">Mindre enn ett minutt</string>
+ <plurals name="caches_eta_mins">
+ <item quantity="one">%d minutt</item>
+ <item quantity="other">%d minutter</item>
+ </plurals>
<string name="caches_store_offline">Lagre for offline-bruk</string>
<string name="caches_store_selected">Lagre valgte</string>
<string name="caches_history">Historikk</string>
<string name="caches_on_map">Vis på kartet</string>
<string name="caches_sort">Sorter</string>
- <string name="caches_sort_title">Sorter etter</string>
<string name="caches_sort_distance">Avstand</string>
<string name="caches_sort_difficulty">Vanskelighet</string>
<string name="caches_sort_terrain">Terreng</string>
@@ -268,13 +266,11 @@
<string name="caches_select_invert">Inverter merking</string>
<string name="caches_nearby">I nærheten</string>
<string name="caches_manage">Administrer</string>
- <string name="caches_drop_selected">Fjern valgte</string>
- <string name="caches_drop_selected_ask">Vil du slette de valgte cachene fra enheten?</string>
- <string name="caches_drop_all">Fjern alle</string>
- <string name="caches_drop_all_ask">Vil du slette alle cacher fra enheten?</string>
- <string name="caches_drop_stored">Fjern lagrede</string>
- <string name="caches_drop_progress">Fjerner cacher</string>
- <string name="caches_drop_all_and_list">Fjern alle cacher og fjern liste</string>
+ <string name="caches_remove_all">Fjern alle</string>
+ <string name="caches_remove_all_confirm">Vil du fjerne alle %s cacher fra gjeldende liste?</string>
+ <string name="caches_remove_selected">Fjern valgte</string>
+ <string name="caches_remove_selected_confirm">Vil du slette de %s merkede cachene fra enheten?</string>
+ <string name="caches_remove_progress">Fjerner cacher</string>
<string name="caches_delete_events">Slett gamle eventer</string>
<string name="caches_refresh_selected">Oppdater valgte</string>
<string name="caches_refresh_all">Oppdater alle</string>
@@ -301,11 +297,10 @@
<string name="caches_removing_from_history">Fjerner fra historikken…</string>
<string name="caches_clear_offlinelogs">Fjern offline-logger</string>
<string name="caches_clear_offlinelogs_progress">Fjerner offline-logger</string>
- <string name="list_menu">Liste</string>
<string name="list_menu_create">Opprett ny liste</string>
<string name="list_menu_drop">Fjern liste</string>
- <string name="list_menu_change">Endre liste</string>
<string name="list_menu_rename">Endre navn på listen</string>
+ <string name="list_menu_import">Importer</string>
<string name="list_title">Velg en liste</string>
<string name="list_inbox">Lagret</string>
<string name="list_all_lists">Alle cacher</string>
@@ -366,6 +361,8 @@
<string name="init_oc_us_description">Gi c:geo tilgang til å bruke opencaching.us for å søke etter cacher og vise/filtrere dine funnede cacher.</string>
<string name="settings_activate_oc_ro">Aktiver</string>
<string name="init_oc_ro_description">Gi c:geo tilgang til å bruke opencaching.ro for å søke etter cacher og vise/filtrere dine funnede cacher.</string>
+ <string name="settings_activate_oc_uk">Aktiver</string>
+ <string name="init_oc_uk_description">Gi c:geo tilgang til å bruke opencaching.org.uk for å søke etter cacher og vise/filtrere dine funnede cacher.</string>
<string name="init_gcvote">GCVote.com</string>
<string name="init_twitter">Twitter</string>
<string name="settings_activate_twitter">Aktiver</string>
@@ -395,8 +392,8 @@
<string name="init_signature_template_log">Loggtekst</string>
<string name="init_ratingwanted">GCvote-rangering</string>
<string name="init_summary_ratingwanted">Last rangering for cachen fra GCvote.com</string>
- <string name="init_friendlogswanted">Vis venners logger</string>
- <string name="init_summary_friendlogswanted">Vis flere logger fra venner</string>
+ <string name="init_friends_and_own_logs_wanted">Vis venners / egne</string>
+ <string name="init_summary_friends_and_own_logs_wanted">Vis ekstra loggbokside for venners og egne logger</string>
<string name="init_openlastdetailspage">Sist brukte fane</string>
<string name="init_summary_openlastdetailspage">Åpne detaljsiden til cacher på den siste brukte fanen</string>
<string name="init_autoload">Last full beskrivelse automatisk</string>
@@ -485,6 +482,9 @@
<string name="init_maintenance">Vedlikehold</string>
<string name="init_maintenance_directories_note">c:geo lagrer bilder, loggbilder og andre filer knyttet til en cache i en egen mappe. I noen situasjoner (som importering/eksportering av databasen) vil denne mappen inneholde utdaterte filer som kan slettes her.</string>
<string name="init_maintenance_directories">Slett utdaterte filer</string>
+ <string name="init_create_memory_dump">Opprett minnedump</string>
+ <string name="init_memory_dump">Minnedump</string>
+ <string name="init_memory_dumped">Minne dumpet til %s</string>
<string name="settings_open_website">Åpne nettside</string>
<string name="settings_settings">Innstillinger</string>
<string name="settings_information">Informasjon</string>
@@ -531,6 +531,10 @@
<string name="auth_dialog_completed_twitter">c:geo har nå fått godkjenning til å kvitre på Twitter.</string>
<string name="auth_ocde">opencaching.de</string>
<string name="auth_dialog_completed_oc">c:geo har nå fått godkjenning til å kommunisere med %s.</string>
+ <plurals name="cache_counts">
+ <item quantity="one">Én cache</item>
+ <item quantity="other">%1$d cacher</item>
+ </plurals>
<string name="cache_offline">Offline</string>
<string name="cache_offline_refresh">Oppdater</string>
<string name="cache_offline_drop">Fjern</string>
@@ -546,7 +550,6 @@
<string name="cache_premium">Premium</string>
<string name="cache_attributes">Attributer</string>
<string name="cache_inventory">Inventar</string>
- <string name="cache_log_offline">Offline logg</string>
<string name="cache_log_images_title">Bilder i loggene</string>
<string name="cache_log_image_default_title">Bilder</string>
<string name="cache_personal_note">Personlig cachenotat</string>
@@ -557,8 +560,6 @@
<string name="cache_personal_note_uploading">Laster opp personlig cachenotat</string>
<string name="cache_personal_note_upload_done">Personlig cachenotat er lastet opp</string>
<string name="cache_personal_note_upload_cancelled">Personlig cachenotat ble avbrutt under opplasting</string>
- <string name="cache_personal_note_unstored">Cachen er ikke lagret</string>
- <string name="cache_personal_note_store">Cachen vil bli lagret for å skrive personlig cachenotat.</string>
<string name="cache_description">Beskrivelse</string>
<string name="cache_description_long">Full beskrivelse</string>
<string name="cache_description_table_note">Beskrivelsen inneholder tabellformatering og må åpnes på %s for å vises riktig.</string>
@@ -575,10 +576,14 @@
<string name="cache_list_unknown">Ikke i en liste</string>
<string name="cache_images">Bilder</string>
<string name="cache_waypoints">Veipunkter</string>
+ <plurals name="waypoints">
+ <item quantity="one">1 veipunkt</item>
+ <item quantity="other">%d veipunkter</item>
+ </plurals>
<string name="cache_waypoints_add">Legg til veipunkter</string>
<string name="cache_hint">Hint</string>
<string name="cache_logs">Loggbok</string>
- <string name="cache_logsfriends">Loggbok (venner)</string>
+ <string name="cache_logs_friends_and_own">Venners/egne logger</string>
<string name="cache_dialog_loading_details">Laster cachens detaljer…</string>
<string name="cache_dialog_loading_details_status_loadpage">Laster siden</string>
<string name="cache_dialog_loading_details_status_details">Behandler detaljer</string>
@@ -624,14 +629,13 @@
<string name="cache_menu_refresh">Oppdater</string>
<string name="cache_menu_share">Del cachen</string>
<string name="cache_menu_move_list">Flytt til annen liste</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">Cache Beacon</string>
<string name="cache_menu_pebble">Pebble</string>
<string name="cache_status">Status</string>
<string name="cache_status_offline_log">Logg lagret</string>
<string name="cache_status_found">Funnet</string>
+ <string name="cache_not_status_found">Ikke funnet</string>
<string name="cache_status_archived">Arkivert</string>
<string name="cache_status_disabled">Deaktivert</string>
<string name="cache_status_premium">Kun for premium-medlemmer</string>
@@ -743,10 +747,7 @@
<string name="map_view_map">Kart</string>
<string name="map_modes">Kartinnstillinger</string>
<string name="map_trail_show">Vis spor</string>
- <string name="map_trail_hide">Skjul spor</string>
<string name="map_circles_show">Vis sirkler</string>
- <string name="map_circles_hide">Skjul sirkler</string>
- <string name="map_mycaches_show">Vis egne og funnede cacher</string>
<string name="map_mycaches_hide">Skjul egne og funnede cacher</string>
<string name="map_theme_builtin">Standard</string>
<string name="map_theme_select">Velg karttema</string>
@@ -826,10 +827,10 @@
<string name="user_menu_open_contact">Åpne kontaktinfo</string>
<string name="navigation">Navigasjon</string>
<string name="compass_title">Kompass</string>
+ <string name="compass_sensors">Aktive sensorer</string>
<string name="use_gps">Bruk GPS</string>
<string name="use_compass">Bruk kompass</string>
<string name="destination_select">Velg destinasjon</string>
- <string name="destination_set">Sett destinasjon</string>
<string name="navigation_direct_navigation">Direkte navigering</string>
<string name="navigation_target">Mål</string>
<string name="err_nav_no_coordinates">Kan ikke starte navigering uten koordinater</string>
@@ -1100,7 +1101,6 @@
<string name="website">web-side: <a href="http://cgeo.org/">cgeo.org</a></string>
<string name="facebook">facebook: <a href="http://www.facebook.com/pages/cgeo/297269860090">c:geo page</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Bruksanvisning: <a href="">c:geo in a Nutshell</a></string>
<string name="market">Android: <a href="">c:geo i Google Play</a></string>
<string name="about_twitter">Ønsker du at <b>c:geo</b> skal poste en status på Twitter hver gang du logger ett funn via <b>c:geo</b>?</string>
<string name="status_new_release" tools:ignore="UnusedResources">Ny versjon tilgjengelig. \nKlikk for å installere.</string>
@@ -1117,40 +1117,18 @@
<string name="tts_one_kilometer">en kilometer</string>
<string name="tts_one_meter">en meter</string>
<string name="tts_one_mile">En enkelsk mil</string>
- <string name="tts_one_foot">En fot</string>
- <string name="tts_one_oclock">klokken ett</string>
- <string name="tts_oclock">klokken %s</string>
- <string name="clipboard_copy_ok">Kopiert til utklippstavlen</string>
- <string name="percent_favorite_points">%\ favoritter</string>
- <string name="cgeo_shortcut">c:geo-snartvei</string>
- <string name="create_shortcut">Opprett snarvei</string>
- <string-array name="log_image_scales">
- <item>Ingen skalering</item>
- <item>512 px</item>
- <item>640 px</item>
- <item>800 px</item>
- <item>1024 px</item>
- </string-array>
- <plurals name="caches_eta_mins">
- <item quantity="one">minutt</item>
- <item quantity="other">minutter</item>
- </plurals>
- <plurals name="cache_counts">
- <item quantity="one">Én cache</item>
- <item quantity="other">%1$d cacher</item>
- </plurals>
- <plurals name="waypoints">
- <item quantity="one">1 veipunkt</item>
- <item quantity="other">%d veipunkter</item>
- </plurals>
<plurals name="tts_miles">
<item quantity="one">%s engelsk mil</item>
<item quantity="other">%s engelske mil</item>
</plurals>
+ <string name="tts_one_foot">En fot</string>
<plurals name="tts_feet">
<item quantity="one">%s fot</item>
<item quantity="other">%s fot</item>
</plurals>
+ <string name="tts_one_oclock">klokken ett</string>
+ <string name="tts_oclock">klokken %s</string>
+ <string name="clipboard_copy_ok">Kopiert til utklippstavlen</string>
<plurals name="days_ago">
<item quantity="one">i går</item>
<item quantity="other">%d dager siden</item>
@@ -1159,4 +1137,8 @@
<item quantity="one">%s favoritt</item>
<item quantity="other">%s favoritt</item>
</plurals>
+ <string name="percent_favorite_points">%\ favoritter</string>
+ <string name="cgeo_shortcut">c:geo-snartvei</string>
+ <string name="create_shortcut">Opprett snarvei</string>
+ <string name="send">Send</string>
</resources>
diff --git a/main/res/values-nl/strings.xml b/main/res/values-nl/strings.xml
index 3568423..ff4f8c2 100644
--- a/main/res/values-nl/strings.xml
+++ b/main/res/values-nl/strings.xml
@@ -9,7 +9,6 @@
<string name="about">Over c:geo</string>
<string name="latitude">Breedtegraad</string>
<string name="longitude">Lengtegraad</string>
- <string name="action_bar_share_title">Deel link naar cache</string>
<string name="settings_titlebar">c:geo Instellingen</string>
<string name="all_types">Alle cache types</string>
<string name="traditional">Traditionele cache</string>
@@ -18,6 +17,7 @@
<string name="letterbox">Letterbox hybrid</string>
<string name="event">Event cache</string>
<string name="mega">Mega-event cache</string>
+ <string name="giga">Giga-Event Cache</string>
<string name="earth">Earthcache</string>
<string name="cito">Cache in trash out event</string>
<string name="webcam">Webcam cache</string>
@@ -29,13 +29,13 @@
<string name="gps">Gps adventures exhibit</string>
<string name="block">Groundspeak Block Party</string>
<string name="unknown">Onbekend type</string>
- <string name="cache_size_micro">micro</string>
- <string name="cache_size_small">small</string>
- <string name="cache_size_regular">regular</string>
- <string name="cache_size_large">large</string>
- <string name="cache_size_other">other</string>
+ <string name="cache_size_micro">Micro</string>
+ <string name="cache_size_small">Small</string>
+ <string name="cache_size_regular">Regular</string>
+ <string name="cache_size_large">Large</string>
+ <string name="cache_size_other">Other</string>
<string name="cache_size_virtual">Virtual</string>
- <string name="cache_size_notchosen">not chosen</string>
+ <string name="cache_size_notchosen">Niet gekozen</string>
<string name="cache_size_unknown">Onbekend</string>
<string name="cache_size_nano">Nano</string>
<string name="cache_size_very_large">Erg Groot</string>
@@ -78,22 +78,9 @@
<string name="log_saving">Log opslaan…</string>
<string name="log_saving_and_uploading">Verzenden van log en uploaden foto…</string>
<string name="log_clear">Wissen</string>
- <string name="log_post">Verzend log</string>
- <string name="log_post_rate">Verzend log &amp; beoordeel</string>
- <string name="log_post_no_rate">Verzend log zonder beoordeling</string>
<string name="log_post_not_possible">Laden Log Pagina…</string>
<string name="log_add">Toevoegen</string>
- <string name="log_rating">Beoordeling</string>
<string name="log_no_rating">Geen beoordeling</string>
- <string name="log_stars_1">1 ster</string>
- <string name="log_stars_15">1.5 ster</string>
- <string name="log_stars_2">2 sterren</string>
- <string name="log_stars_25">2.5 sterren</string>
- <string name="log_stars_3">3 sterren</string>
- <string name="log_stars_35">3.5 sterren</string>
- <string name="log_stars_4">4 sterren</string>
- <string name="log_stars_45">4.5 sterren</string>
- <string name="log_stars_5">5 sterren</string>
<string name="log_stars_1_description">Slecht</string>
<string name="log_stars_15_description">Redelijk slecht</string>
<string name="log_stars_2_description">Beneden gemiddeld</string>
@@ -112,7 +99,6 @@
<string name="log_smilies">Smilies</string>
<string name="log_image">Foto</string>
<string name="log_image_attach">Foto koppelen</string>
- <string name="log_image_edit">Foto bewerken</string>
<string name="log_image_stored">Bestaande</string>
<string name="log_image_camera">Nieuw</string>
<string name="log_image_caption">Bijschrift</string>
@@ -121,6 +107,13 @@
<string name="log_password_title">Log wachtwoord:</string>
<string name="log_hint_log_password">Voer Login Wachtwoord</string>
<string name="log_oc_team_comment">OC Team commentaar</string>
+ <string-array name="log_image_scales">
+ <item>Niet schalen</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<string name="translate_to_sys_lang">Vertaal naar %s</string>
<string name="translate_to_english">Vertaal naar engels</string>
<string name="translate_length_warning">Vertaling kan mislukken bij grote stukken tekst.</string>
@@ -213,6 +206,7 @@
<string name="info_select_logimage_cancelled">Foto selectie of opname is geannuleerd.</string>
<string name="info_stored_image">Nieuwe foto opgeslagen in:</string>
<string name="info_storing_static_maps">Proberen statische kaarten op te slaan</string>
+ <string name="info_cache_saved">De cache is lokaal opgeslagen</string>
<string name="loc_last">Laatst bekende</string>
<string name="loc_net">Netwerk</string>
<string name="loc_gps">GPS</string>
@@ -220,6 +214,7 @@
<string name="loc_trying">Proberen te lokaliseren</string>
<string name="loc_no_addr">Adres onbekend</string>
<string name="loc_gps_disabled">GPS uitgeschakeld</string>
+ <string name="menu_centerposition">Centreer op mijn positie</string>
<string name="menu_about">Over c:geo</string>
<string name="menu_helpers">Hulpprogramma\'s</string>
<string name="menu_settings">Instellingen</string>
@@ -241,12 +236,15 @@
<string name="caches_more_caches_currently">op dit moment</string>
<string name="caches_downloading">Caches aan het downloaden…\nGeschatte tijd: </string>
<string name="caches_eta_ltm">Minder dan een minuut</string>
+ <plurals name="caches_eta_mins">
+ <item quantity="one">%d minuut</item>
+ <item quantity="other">%d minuten</item>
+ </plurals>
<string name="caches_store_offline">Opslaan voor Offline gebruik</string>
<string name="caches_store_selected">Geselecteerden opslaan</string>
<string name="caches_history">Geschiedenis</string>
<string name="caches_on_map">Toon op kaart</string>
<string name="caches_sort">Sorteren</string>
- <string name="caches_sort_title">Sorteer op</string>
<string name="caches_sort_distance">Afstand</string>
<string name="caches_sort_difficulty">Moeilijkheid</string>
<string name="caches_sort_terrain">Terrein</string>
@@ -268,13 +266,11 @@
<string name="caches_select_invert">Selectie omkeren</string>
<string name="caches_nearby">Nabij</string>
<string name="caches_manage">Beheer</string>
- <string name="caches_drop_selected">Drop geselecteerde</string>
- <string name="caches_drop_selected_ask">Wil je de geselecteerde caches verwijderen van het apparaat?</string>
- <string name="caches_drop_all">Alles verwijderen</string>
- <string name="caches_drop_all_ask">Wil je alle caches van het apparaat verwijderen?</string>
- <string name="caches_drop_stored">Verwijder opgeslagen</string>
- <string name="caches_drop_progress">Caches worden verwijderd</string>
- <string name="caches_drop_all_and_list">Alle verwijderen en lijst verwijderen</string>
+ <string name="caches_remove_all">Verwijder alles</string>
+ <string name="caches_remove_all_confirm">Wil je alle %s caches uit de huidige lijst verwijderen?</string>
+ <string name="caches_remove_selected">Selectie verwijderen</string>
+ <string name="caches_remove_selected_confirm">Wil je de geselecteerde %s caches verwijderen van uw apparaat?</string>
+ <string name="caches_remove_progress">Caches worden verwijderd</string>
<string name="caches_delete_events">Verwijder afgelopen evenementen</string>
<string name="caches_refresh_selected">Ververs geselecteerden</string>
<string name="caches_refresh_all">Ververs alle</string>
@@ -301,11 +297,10 @@
<string name="caches_removing_from_history">Verwijderen uit geschiedenis…</string>
<string name="caches_clear_offlinelogs">Verwijderen offline logs</string>
<string name="caches_clear_offlinelogs_progress">Offline logs worden verwijderd</string>
- <string name="list_menu">Lijst</string>
<string name="list_menu_create">Maak nieuwe lijst</string>
<string name="list_menu_drop">Verwijder huidige lijst</string>
- <string name="list_menu_change">Pas lijst aan</string>
<string name="list_menu_rename">Hernoem huidige lijst</string>
+ <string name="list_menu_import">Importeer</string>
<string name="list_title">Selecteer een lijst</string>
<string name="list_inbox">Opgeslagen</string>
<string name="list_all_lists">Alle caches</string>
@@ -373,6 +368,9 @@
<string name="init_oc_ro">Opencaching.ro</string>
<string name="settings_activate_oc_ro">Activeren</string>
<string name="init_oc_ro_description">c:geo Autoriseren met opencaching.ro naar caches te zoeken en je gevonden caches te benaderen/filteren.</string>
+ <string name="init_oc_uk">Opencaching.org.uk</string>
+ <string name="settings_activate_oc_uk">Activeren</string>
+ <string name="init_oc_uk_description">c:geo authoriseren met opencaching.org.uk om naar caches te zoeken en het filteren van gevonden caches.</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="settings_activate_twitter">Activeren</string>
@@ -402,8 +400,8 @@
<string name="init_signature_template_log">Log tekst</string>
<string name="init_ratingwanted">GCvote.com waardering</string>
<string name="init_summary_ratingwanted">Laad cachewaardering van GCvote.com</string>
- <string name="init_friendlogswanted">Lange omschrijving</string>
- <string name="init_summary_friendlogswanted">Laad extra logbook pagina voor logs van vrienden</string>
+ <string name="init_friends_and_own_logs_wanted">Toon eigen/van vrienden</string>
+ <string name="init_summary_friends_and_own_logs_wanted">Toon additionele logboek pagina voor eigen en vrienden logs</string>
<string name="init_openlastdetailspage">Laad details met laatst gebruikte pagina</string>
<string name="init_summary_openlastdetailspage">Laad details met laatst gebruikte pagina</string>
<string name="init_autoload">Lange omschrijving</string>
@@ -492,6 +490,9 @@
<string name="init_maintenance">Onderhoud</string>
<string name="init_maintenance_directories_note">c:geo slaat diverse bestanden die bij een cache horen op in een afzonderlijke map. In sommige gevallen (zoals bij importeren/exporteren van de database) kan deze map verouderde bestanden bevatten. Deze kunnen hier verwijderd worden.</string>
<string name="init_maintenance_directories">Verweesde bestanden verwijderen</string>
+ <string name="init_create_memory_dump">Geheugendump maken</string>
+ <string name="init_memory_dump">Geheugendump</string>
+ <string name="init_memory_dumped">Geheugen gedumpt naar %s</string>
<string name="settings_open_website">Open website</string>
<string name="settings_settings">Instellingen</string>
<string name="settings_information">Informatie</string>
@@ -541,7 +542,12 @@
<string name="auth_ocnl">opencaching.nl</string>
<string name="auth_ocus">opencaching.us</string>
<string name="auth_ocro">opencaching.ro</string>
+ <string name="auth_ocuk">opencaching.org.uk</string>
<string name="auth_dialog_completed_oc">c:geo is nu gekoppeld met %s.</string>
+ <plurals name="cache_counts">
+ <item quantity="one">Een cache</item>
+ <item quantity="other">%1$d Caches</item>
+ </plurals>
<string name="cache_offline">Offline</string>
<string name="cache_offline_refresh">Verversen</string>
<string name="cache_offline_drop">Laten vervallen</string>
@@ -557,7 +563,6 @@
<string name="cache_premium">Premium</string>
<string name="cache_attributes">Attributen</string>
<string name="cache_inventory">Inventaris</string>
- <string name="cache_log_offline">Offline log</string>
<string name="cache_log_images_title">Logafbeelding</string>
<string name="cache_log_image_default_title">Foto</string>
<string name="cache_personal_note">Persoonlijke notitie</string>
@@ -568,8 +573,6 @@
<string name="cache_personal_note_uploading">Uploading persoonlijke notitie</string>
<string name="cache_personal_note_upload_done">Persoonlijke notitie geupload</string>
<string name="cache_personal_note_upload_cancelled">Persoonlijk notitie uploaden geannulleerd</string>
- <string name="cache_personal_note_unstored">Cache niet opgeslagen</string>
- <string name="cache_personal_note_store">De cache zal eerst opgeslagen worden om persoonlijke notities toe te kunnen voegen.</string>
<string name="cache_description">Omschrijving</string>
<string name="cache_description_long">Lange omschrijving</string>
<string name="cache_description_table_note">Omschrijving bevat een tabel-layout welke misschien op %s bekeken moet worden.</string>
@@ -586,10 +589,14 @@
<string name="cache_list_unknown">Niet in een lijst</string>
<string name="cache_images">Afbeeldingen</string>
<string name="cache_waypoints">Waypoints</string>
+ <plurals name="waypoints">
+ <item quantity="one">1 Waypoint</item>
+ <item quantity="other">%d Waypoints</item>
+ </plurals>
<string name="cache_waypoints_add">Waypoint toevoegen</string>
<string name="cache_hint">Hint</string>
<string name="cache_logs">Logboek</string>
- <string name="cache_logsfriends">Logboek (vrienden)</string>
+ <string name="cache_logs_friends_and_own">Vrienden/Eigen Logs</string>
<string name="cache_dialog_loading_details">Cache details laden…</string>
<string name="cache_dialog_loading_details_status_loadpage">Pagina laden</string>
<string name="cache_dialog_loading_details_status_details">Verwerken details</string>
@@ -635,15 +642,14 @@
<string name="cache_menu_refresh">Verversen</string>
<string name="cache_menu_share">Deel cache</string>
<string name="cache_menu_move_list">Verplaats naar andere lijst</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">Cache baken</string>
<string name="cache_menu_navigon">Navigon</string>
<string name="cache_menu_pebble">Pebble</string>
<string name="cache_status">Status</string>
<string name="cache_status_offline_log">Log opgeslagen</string>
<string name="cache_status_found">Gevonden</string>
+ <string name="cache_not_status_found">Niet gevonden</string>
<string name="cache_status_archived">Gearchiveerd</string>
<string name="cache_status_disabled">Uitgeschakeld</string>
<string name="cache_status_premium">Alleen voor premium leden</string>
@@ -755,10 +761,7 @@
<string name="map_view_map">Kaart weergave</string>
<string name="map_modes">Kaartinstellingen</string>
<string name="map_trail_show">Toon spoor</string>
- <string name="map_trail_hide">Verberg spoor</string>
<string name="map_circles_show">Laat cirkels zien</string>
- <string name="map_circles_hide">Verberg cirkels</string>
- <string name="map_mycaches_show">Tonen eigen/gevonden caches</string>
<string name="map_mycaches_hide">Verbergen eigen/gevonden caches</string>
<string name="map_theme_builtin">Standaard</string>
<string name="map_theme_select">Selecteer mapthema</string>
@@ -838,10 +841,10 @@
<string name="user_menu_open_contact">Open contactkaart</string>
<string name="navigation">Navigatie</string>
<string name="compass_title">Kompas</string>
+ <string name="compass_sensors">Actieve sensoren</string>
<string name="use_gps">Gebruik alleen GPS</string>
<string name="use_compass">Gebruik GPS en kompas</string>
<string name="destination_select">Selecteer bestemming</string>
- <string name="destination_set">Zet bestemming</string>
<string name="navigation_direct_navigation">Directe navigatie</string>
<string name="navigation_target">Doel</string>
<string name="err_nav_no_coordinates">Kan navigatie niet starten zonder coördinaten</string>
@@ -1112,7 +1115,6 @@
<string name="website">Website: <a href="">cgeo.org</a></string>
<string name="facebook">Facebook: <a href="">c:geo page</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Handleiding: <a href="">c:geo in een notendop</a></string>
<string name="market">Android: <a href="">c:geo op Google Play</a></string>
<string name="about_twitter">Moet <b>c:geo</b> elke cache vondst publiceren naar Twitter?</string>
<string name="faq">FAQ: <a href=""> faq.cgeo.org</a></string>
@@ -1128,50 +1130,28 @@
<string name="tts_stop">Stop met praten</string>
<string name="err_tts_lang_not_supported">De huidige taal wordt niet ondersteund door tekst naar spraak.</string>
<string name="tts_one_kilometer">één kilometer</string>
- <string name="tts_one_meter">één meter</string>
- <string name="tts_one_mile">één mijl</string>
- <string name="tts_one_foot">één voet</string>
- <string name="tts_one_oclock">één uur</string>
- <string name="tts_oclock">%s uur</string>
- <string name="clipboard_copy_ok">Gekopieerd naar klembord</string>
- <string name="percent_favorite_points">%\ favorieten</string>
- <string name="cgeo_shortcut">c:geo snelkoppeling</string>
- <string name="create_shortcut">Maak snelkoppeling</string>
- <string-array name="log_image_scales">
- <item>Niet schalen</item>
- <item>512 px</item>
- <item>640 px</item>
- <item>800 px</item>
- <item>1024 px</item>
- </string-array>
- <plurals name="caches_eta_mins">
- <item quantity="one">minuut</item>
- <item quantity="other">minuten</item>
- </plurals>
- <plurals name="cache_counts">
- <item quantity="one">Een cache</item>
- <item quantity="other">%1$d Caches</item>
- </plurals>
- <plurals name="waypoints">
- <item quantity="one">1 Waypoint</item>
- <item quantity="other">%d Waypoints</item>
- </plurals>
<plurals name="tts_kilometers">
<item quantity="one">%s kilometer</item>
<item quantity="other">%s kilometer</item>
</plurals>
+ <string name="tts_one_meter">één meter</string>
<plurals name="tts_meters">
<item quantity="one">%s meter</item>
<item quantity="other">%s meter</item>
</plurals>
+ <string name="tts_one_mile">één mijl</string>
<plurals name="tts_miles">
<item quantity="one">%s mijl</item>
<item quantity="other">%s mijl</item>
</plurals>
+ <string name="tts_one_foot">één voet</string>
<plurals name="tts_feet">
<item quantity="one">%s voet</item>
<item quantity="other">%s voeten</item>
</plurals>
+ <string name="tts_one_oclock">één uur</string>
+ <string name="tts_oclock">%s uur</string>
+ <string name="clipboard_copy_ok">Gekopieerd naar klembord</string>
<plurals name="days_ago">
<item quantity="one">Gisteren</item>
<item quantity="other">%d dagen geleden</item>
@@ -1180,4 +1160,8 @@
<item quantity="one">%s favoriet</item>
<item quantity="other">%s favorieten</item>
</plurals>
+ <string name="percent_favorite_points">%\ favorieten</string>
+ <string name="cgeo_shortcut">c:geo snelkoppeling</string>
+ <string name="create_shortcut">Maak snelkoppeling</string>
+ <string name="send">Verzenden</string>
</resources>
diff --git a/main/res/values-pl/strings.xml b/main/res/values-pl/strings.xml
index 26b5e23..82a841f 100644
--- a/main/res/values-pl/strings.xml
+++ b/main/res/values-pl/strings.xml
@@ -9,7 +9,6 @@
<string name="about">O c:geo</string>
<string name="latitude">Szerokość geograficzna</string>
<string name="longitude">Długość geograficzna</string>
- <string name="action_bar_share_title">Podziel się linkiem do skrzynki</string>
<string name="settings_titlebar">c:geo Ustawienia</string>
<string name="all_types">Wszystkie typy skrzynek</string>
<string name="traditional">Tradycyjna</string>
@@ -18,6 +17,7 @@
<string name="letterbox">Hybrydowa Letterbox</string>
<string name="event">Wydarzenie</string>
<string name="mega">Mega-Wydarzenie</string>
+ <string name="giga">Giga-Wydarzenie</string>
<string name="earth">Earthcache</string>
<string name="cito">CITO</string>
<string name="webcam">Skrzynka Webcam</string>
@@ -78,22 +78,9 @@
<string name="log_saving">Zapisuję w dzienniku…</string>
<string name="log_saving_and_uploading">Zapisuję w dzienniku i wysyłam zdjęcie…</string>
<string name="log_clear">Wyczyść</string>
- <string name="log_post">Wpisz do dziennika</string>
- <string name="log_post_rate">Wpisz do dziennika &amp; oceń</string>
- <string name="log_post_no_rate">Wpisz do dziennika &amp; nie oceniaj</string>
<string name="log_post_not_possible">Ładuję dziennik…</string>
<string name="log_add">Dodaj</string>
- <string name="log_rating">Ocena</string>
<string name="log_no_rating">Bez oceny</string>
- <string name="log_stars_1">1 gwiazdka</string>
- <string name="log_stars_15">1,5 gwiazdki</string>
- <string name="log_stars_2">2 gwiazdki</string>
- <string name="log_stars_25">2,5 gwiazdki</string>
- <string name="log_stars_3">3 gwiazdki</string>
- <string name="log_stars_35">3,5 gwiazdki</string>
- <string name="log_stars_4">4 gwiazdki</string>
- <string name="log_stars_45">4,5 gwiazdki</string>
- <string name="log_stars_5">5 gwiazdek</string>
<string name="log_stars_1_description">Słaba</string>
<string name="log_stars_15_description">Raczej słaba</string>
<string name="log_stars_2_description">Poniżej średniej</string>
@@ -112,7 +99,6 @@
<string name="log_smilies">Uśmiechy</string>
<string name="log_image">Obraz</string>
<string name="log_image_attach">Załącz obraz</string>
- <string name="log_image_edit">Edytuj obraz</string>
<string name="log_image_stored">Zapisany</string>
<string name="log_image_camera">Nowy</string>
<string name="log_image_caption">Podpis</string>
@@ -121,6 +107,13 @@
<string name="log_password_title">Hasło do logu:</string>
<string name="log_hint_log_password">Wpisz hasło do logu</string>
<string name="log_oc_team_comment">Komentarz zespołu OC</string>
+ <string-array name="log_image_scales">
+ <item>Brak skalowania</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<string name="translate_to_sys_lang">Przetłumacz na %s</string>
<string name="translate_to_english">Przetłumacz na angielski</string>
<string name="translate_length_warning">Tłumaczenie może nie udać się przy dużej ilości tekstu.</string>
@@ -213,7 +206,7 @@
<string name="info_select_logimage_cancelled">Wybór obrazu został anulowany.</string>
<string name="info_stored_image">Nowy obraz zapisany w:</string>
<string name="info_storing_static_maps">Próbuję zapisać mapy statyczne</string>
- <string name="loc_last">Ostatnia znana pozycja</string>
+ <string name="loc_last">Ostatnia pozycja</string>
<string name="loc_net">Sieć</string>
<string name="loc_gps">GPS</string>
<string name="loc_sat">Sat</string>
@@ -246,7 +239,6 @@
<string name="caches_history">Historia</string>
<string name="caches_on_map">Pokaż na mapie</string>
<string name="caches_sort">Sortuj</string>
- <string name="caches_sort_title">Sortuj według</string>
<string name="caches_sort_distance">Odległość</string>
<string name="caches_sort_difficulty">Trudność</string>
<string name="caches_sort_terrain">Teren</string>
@@ -268,13 +260,6 @@
<string name="caches_select_invert">Odwróć zaznaczenie</string>
<string name="caches_nearby">Najbliższe</string>
<string name="caches_manage">Zarządzaj</string>
- <string name="caches_drop_selected">Usuń wybrane</string>
- <string name="caches_drop_selected_ask">Czy na pewno chcesz usunąć wybrane skrzynki z pamięci?</string>
- <string name="caches_drop_all">Usuń wszystkie</string>
- <string name="caches_drop_all_ask">Czy na pewno chcesz usunąć wszystkie skrzynki z pamięci?</string>
- <string name="caches_drop_stored">Usuń zapisane</string>
- <string name="caches_drop_progress">Usuwanie skrzynek</string>
- <string name="caches_drop_all_and_list">Usuń wszystkie skrzynki i listę</string>
<string name="caches_delete_events">Usuń minione wydarzenia</string>
<string name="caches_refresh_selected">Odśwież wybrane</string>
<string name="caches_refresh_all">Odśwież wszystkie</string>
@@ -299,12 +284,10 @@
<string name="caches_filter_popularity">Ulubione</string>
<string name="caches_filter_popularity_ratio">Ulubione [%]</string>
<string name="caches_removing_from_history">Usuwam z Historii…</string>
- <string name="caches_clear_offlinelogs">Usuń logi offline</string>
- <string name="caches_clear_offlinelogs_progress">Usuwanie logów offline</string>
- <string name="list_menu">Lista</string>
+ <string name="caches_clear_offlinelogs">Usuń wpisy offline</string>
+ <string name="caches_clear_offlinelogs_progress">Usuwanie wpisów offline</string>
<string name="list_menu_create">Utwórz nową listę</string>
<string name="list_menu_drop">Usuń aktualną listę</string>
- <string name="list_menu_change">Zmień listę</string>
<string name="list_menu_rename">Zmień nazwę aktualnej listy</string>
<string name="list_title">Wybierz listę</string>
<string name="list_inbox">Zapisane</string>
@@ -355,7 +338,7 @@
<string name="settings_activate_ox">Aktywuj</string>
<string name="settings_gc_legal_note">Używając serwisu geocaching.com, akceptujesz postanowienia licencyjne Groundspeak.</string>
<string name="settings_info_facebook_login_title">Facebook Login</string>
- <string name="settings_info_facebook_login">Nie możesz zmusić c:geo aby zalogował się do geocaching.com przy pomocy Twojego konta Facebook. Jednakże istnieje proste rozwiązanie …</string>
+ <string name="settings_info_facebook_login">Nie możesz zmusić c:geo aby zalogował się do geocaching.com przy pomocy Twojego konta Facebook. Jednakże istnieje proste rozwiązanie…</string>
<string name="settings_authorize">Autoryzuj c:geo</string>
<string name="settings_reauthorize">Autoryzuj c:geo ponownie</string>
<string name="init_oc">Opencaching.de</string>
@@ -399,8 +382,8 @@
<string name="init_signature_template_log">Wpis</string>
<string name="init_ratingwanted">Załaduj ocenę skrzynki z GCvote.com</string>
<string name="init_summary_ratingwanted">Załaduj ocenę skrzynki z GCvote.com</string>
- <string name="init_friendlogswanted">Załaduj dodatkowy dziennik dla wpisów od przyjaciół</string>
- <string name="init_summary_friendlogswanted">Załaduj dodatkowy dziennik dla wpisów od przyjaciół</string>
+ <string name="init_friends_and_own_logs_wanted">Pokaż przyjaciół/własne</string>
+ <string name="init_summary_friends_and_own_logs_wanted">Wyświetl dodatkowy dziennik dla wpisów własnych i przyjaciół</string>
<string name="init_openlastdetailspage">Otwórz szczegóły ostatnio używanej strony</string>
<string name="init_summary_openlastdetailspage">Otwórz szczegóły ostatnio używanej strony</string>
<string name="init_autoload">Automatyczne ładowanie długich opisów</string>
@@ -501,7 +484,7 @@
<string name="feature_description">Podane funkcje <b>online</b> na tej stronie są wspierane przez c:geo (w porównaniu do funkcji offline):</string>
<string name="feature_personal_notes">Notatka osobista</string>
<string name="feature_online_logging">Wpisy online</string>
- <string name="feature_log_images">Załączanie zdjęć do logów</string>
+ <string name="feature_log_images">Załączanie zdjęć do wpisów</string>
<string name="feature_watch_list">Listy obserwowanych skrzynek</string>
<string name="feature_own_coordinates">Przechowywanie zmodyfikowanych współrzędnych</string>
<string name="feature_search_keyword">Szukanie po słowie kluczowym</string>
@@ -536,6 +519,11 @@
<string name="auth_ocde">opencaching.de</string>
<string name="auth_ocpl">opencaching.pl</string>
<string name="auth_dialog_completed_oc">c:geo został zautoryzowany by komunikować się z %s.</string>
+ <plurals name="cache_counts">
+ <item quantity="one">Jedna skrzynka</item>
+ <item quantity="few">%1$d skrzynki</item>
+ <item quantity="other">%1$d skrzynek</item>
+ </plurals>
<string name="cache_offline">Offline</string>
<string name="cache_offline_refresh">Odśwież</string>
<string name="cache_offline_drop">Usuń</string>
@@ -551,7 +539,6 @@
<string name="cache_premium">Premium</string>
<string name="cache_attributes">Atrybuty</string>
<string name="cache_inventory">Inwentarz</string>
- <string name="cache_log_offline">Wpis offline</string>
<string name="cache_log_images_title">Zdjęcie z wpisu</string>
<string name="cache_log_image_default_title">Zdjęcie</string>
<string name="cache_personal_note">Notatka osobista</string>
@@ -562,8 +549,6 @@
<string name="cache_personal_note_uploading">Wysyłam osobistą notatkę</string>
<string name="cache_personal_note_upload_done">Notatka osobista wysłana</string>
<string name="cache_personal_note_upload_cancelled">Wysyłanie notatki osobistej anulowane</string>
- <string name="cache_personal_note_unstored">Skrzynka nie jest zapisana</string>
- <string name="cache_personal_note_store">Skrzynka będzie najpierw zapisana aby umożliwić dodawanie notatek osobistych.</string>
<string name="cache_description">Opis</string>
<string name="cache_description_long">Długi opis</string>
<string name="cache_description_table_note">Opis zawiera formatowanie w formie tabeli, które w celu poprawnego wyświetlania może wymagać odwiedzenia %s.</string>
@@ -580,10 +565,15 @@
<string name="cache_list_unknown">Nie znajduje się na liście</string>
<string name="cache_images">Zdjęcia</string>
<string name="cache_waypoints">Punkty nawigacji</string>
+ <plurals name="waypoints">
+ <item quantity="one">1 punkt</item>
+ <item quantity="few">%d punkty</item>
+ <item quantity="other">%d punktów nawigacji</item>
+ </plurals>
<string name="cache_waypoints_add">Dodaj punkt nawigacji</string>
<string name="cache_hint">Wskazówka</string>
<string name="cache_logs">Dziennik</string>
- <string name="cache_logsfriends">Dziennik (Przyjaciele)</string>
+ <string name="cache_logs_friends_and_own">Wpisy przyjaciół/własne</string>
<string name="cache_dialog_loading_details">Ładuję szczegóły skrzynki…</string>
<string name="cache_dialog_loading_details_status_loadpage">Ładuję stronę</string>
<string name="cache_dialog_loading_details_status_details">Przetwarzam szczegóły</string>
@@ -629,15 +619,14 @@
<string name="cache_menu_refresh">Odśwież</string>
<string name="cache_menu_share">Podziel się skrzynką</string>
<string name="cache_menu_move_list">Przenieś do innej listy</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">Cache Beacon</string>
<string name="cache_menu_navigon">Navigon</string>
<string name="cache_menu_pebble">Zegarek Pebble</string>
<string name="cache_status">Status</string>
<string name="cache_status_offline_log">Zapamiętany wpis</string>
<string name="cache_status_found">Znaleziona</string>
+ <string name="cache_not_status_found">Nie znaleziono</string>
<string name="cache_status_archived">Zarchiwizowana</string>
<string name="cache_status_disabled">Niedostępna</string>
<string name="cache_status_premium">Tylko dla użytkowników Premium</string>
@@ -749,10 +738,7 @@
<string name="map_view_map">Widok mapy</string>
<string name="map_modes">Tryb mapy</string>
<string name="map_trail_show">Pokaż szlak</string>
- <string name="map_trail_hide">Ukryj szlak</string>
<string name="map_circles_show">Pokaż okręgi</string>
- <string name="map_circles_hide">Ukryj okręgi</string>
- <string name="map_mycaches_show">Pokazuj własne/znalezione skrzynki</string>
<string name="map_mycaches_hide">Ukryj własne/znalezione skrzynki</string>
<string name="map_theme_builtin">Domyślny</string>
<string name="map_theme_select">Wybierz motyw mapy</string>
@@ -835,7 +821,6 @@
<string name="use_gps">Użyj tylko GPS</string>
<string name="use_compass">Użyj GPS i kompasu</string>
<string name="destination_select">Wybierz cel</string>
- <string name="destination_set">Ustaw cel</string>
<string name="navigation_direct_navigation">Bezpośrednia nawigacja</string>
<string name="navigation_target">Cel</string>
<string name="err_nav_no_coordinates">Nie można rozpocząć nawigacji - brak współrzędnych</string>
@@ -1106,7 +1091,6 @@
<string name="website">Website: <a href="">cgeo.org</a></string>
<string name="facebook">Facebook: <a href="">c:geo strona</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Podręcznik: <a href="">c:geo skrócona instrukcja obsługi</a></string>
<string name="market">Android: <a href="">c:geo w Google Play</a></string>
<string name="about_twitter">Czy chczesz aby <b>c:geo</b> publikował nowy status na Twitter za każdym razem kiedy znajdziesz skrzynkę?</string>
<string name="faq">FAQ: <a href="">faq.cgeo.org</a></string>
@@ -1122,57 +1106,32 @@
<string name="tts_stop">Przestań mówić</string>
<string name="err_tts_lang_not_supported">Aktualny język nie jest wspierany przez text-to-speech.</string>
<string name="tts_one_kilometer">jeden kilometr</string>
- <string name="tts_one_meter">jeden metr</string>
- <string name="tts_one_mile">jedna mila</string>
- <string name="tts_one_foot">jedna stopa</string>
- <string name="tts_one_oclock">pierwsza</string>
- <string name="tts_oclock">%s</string>
- <string name="clipboard_copy_ok">Skopiowano do schowka</string>
- <string name="percent_favorite_points">%\ ulubionych</string>
- <string name="cgeo_shortcut">skrót do c:geo</string>
- <string name="create_shortcut">Utwórz skrót</string>
- <string-array name="log_image_scales">
- <item>Brak skalowania</item>
- <item>512 px</item>
- <item>640 px</item>
- <item>800 px</item>
- <item>1024 px</item>
- </string-array>
- <plurals name="caches_eta_mins">
- <item quantity="one">minuta</item>
- <item quantity="few">minuty</item>
- <item quantity="other">minut</item>
- </plurals>
- <plurals name="cache_counts">
- <item quantity="one">Jedna skrzynka</item>
- <item quantity="few">%1$d skrzynki</item>
- <item quantity="other">%1$d skrzynek</item>
- </plurals>
- <plurals name="waypoints">
- <item quantity="one">1 punkt</item>
- <item quantity="few">%d punkty</item>
- <item quantity="other">%d punktów nawigacji</item>
- </plurals>
<plurals name="tts_kilometers">
<item quantity="one">%s kilometr</item>
<item quantity="few">%s kilometry</item>
<item quantity="other">%s kilometrów</item>
</plurals>
+ <string name="tts_one_meter">jeden metr</string>
<plurals name="tts_meters">
<item quantity="one">%s metr</item>
<item quantity="few">%s metry</item>
<item quantity="other">%s metrów</item>
</plurals>
+ <string name="tts_one_mile">jedna mila</string>
<plurals name="tts_miles">
<item quantity="one">%s mila</item>
<item quantity="few">%s mile</item>
<item quantity="other">%s mil</item>
</plurals>
+ <string name="tts_one_foot">jedna stopa</string>
<plurals name="tts_feet">
<item quantity="one">%s stopa</item>
<item quantity="few">%s stopy</item>
<item quantity="other">%s stóp</item>
</plurals>
+ <string name="tts_one_oclock">pierwsza</string>
+ <string name="tts_oclock">%s</string>
+ <string name="clipboard_copy_ok">Skopiowano do schowka</string>
<plurals name="days_ago">
<item quantity="one">wczoraj</item>
<item quantity="few">%d dni temu</item>
@@ -1183,4 +1142,7 @@
<item quantity="few">%s ulubione</item>
<item quantity="other">%s ulubionych</item>
</plurals>
+ <string name="percent_favorite_points">%\ ulubionych</string>
+ <string name="cgeo_shortcut">skrót do c:geo</string>
+ <string name="create_shortcut">Utwórz skrót</string>
</resources>
diff --git a/main/res/values-pt/strings.xml b/main/res/values-pt/strings.xml
index 8d781b5..3b44a88 100644
--- a/main/res/values-pt/strings.xml
+++ b/main/res/values-pt/strings.xml
@@ -9,7 +9,6 @@
<string name="about">Sobre c:geo</string>
<string name="latitude">Latitude</string>
<string name="longitude">Longitude</string>
- <string name="action_bar_share_title">Partilhar ligação para a cache</string>
<string name="settings_titlebar">c:geo Definições</string>
<string name="all_types">Todos os tipos</string>
<string name="traditional">Cache tradicional</string>
@@ -78,22 +77,9 @@
<string name="log_saving">A gravar o registo…</string>
<string name="log_saving_and_uploading">A enviar o registo e a imagem…</string>
<string name="log_clear">Limpar</string>
- <string name="log_post">Publicar o registo</string>
- <string name="log_post_rate">Publicar registo &amp; Votar</string>
- <string name="log_post_no_rate">Publicar registo &amp; Não votar</string>
<string name="log_post_not_possible">A carregar página de registo…</string>
<string name="log_add">Adicionar</string>
- <string name="log_rating">Pontuação</string>
<string name="log_no_rating">Não votar</string>
- <string name="log_stars_1">1 estrela</string>
- <string name="log_stars_15">1.5 estrelas</string>
- <string name="log_stars_2">2 estrelas</string>
- <string name="log_stars_25">2.5 estrelas</string>
- <string name="log_stars_3">3 estrelas</string>
- <string name="log_stars_35">3.5 estrelas</string>
- <string name="log_stars_4">4 estrelas</string>
- <string name="log_stars_45">4.5 estrelas</string>
- <string name="log_stars_5">5 estrelas</string>
<string name="log_stars_1_description">Terrível</string>
<string name="log_stars_15_description">Muito má</string>
<string name="log_stars_2_description">Má</string>
@@ -112,7 +98,6 @@
<string name="log_smilies">Smilies</string>
<string name="log_image">Imagem</string>
<string name="log_image_attach">Anexar Imagem</string>
- <string name="log_image_edit">Editar Imagem</string>
<string name="log_image_stored">Existente</string>
<string name="log_image_camera">Nova</string>
<string name="log_image_caption">Título</string>
@@ -121,6 +106,13 @@
<string name="log_password_title">Password do registo:</string>
<string name="log_hint_log_password">Inserira a password do registo</string>
<string name="log_oc_team_comment">Comentário da OC Team</string>
+ <string-array name="log_image_scales">
+ <item>Não dimensionar</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<string name="translate_to_sys_lang">Traduzir para %s</string>
<string name="translate_to_english">Traduzir para inglês</string>
<string name="translate_length_warning">A tradução pode falhar se o texto fôr muito grande.</string>
@@ -241,12 +233,15 @@
<string name="caches_more_caches_currently">actualmente</string>
<string name="caches_downloading">Downloading caches…\nETE: </string>
<string name="caches_eta_ltm">Menos de um minuto</string>
+ <plurals name="caches_eta_mins">
+ <item quantity="one">%d minuto</item>
+ <item quantity="other">%d minutos</item>
+ </plurals>
<string name="caches_store_offline">Arquivar para uso offline</string>
<string name="caches_store_selected">Arquivar selecionadas</string>
<string name="caches_history">Histórico</string>
<string name="caches_on_map">Mostrar no mapa</string>
<string name="caches_sort">Ordenar</string>
- <string name="caches_sort_title">Ordenar por</string>
<string name="caches_sort_distance">Distância</string>
<string name="caches_sort_difficulty">Dificuldade</string>
<string name="caches_sort_terrain">Terreno</string>
@@ -268,13 +263,6 @@
<string name="caches_select_invert">Inverter selecção</string>
<string name="caches_nearby">Por perto</string>
<string name="caches_manage">Gerir</string>
- <string name="caches_drop_selected">Apagar seleccionada</string>
- <string name="caches_drop_selected_ask">Quer apagar as caches seleccionadas do dispositivo?</string>
- <string name="caches_drop_all">Apagar todas</string>
- <string name="caches_drop_all_ask">Quer remover todas as caches do dispositivo?</string>
- <string name="caches_drop_stored">Apagar do arquivo</string>
- <string name="caches_drop_progress">A remover caches</string>
- <string name="caches_drop_all_and_list">Apagar todas e remover lista</string>
<string name="caches_delete_events">Eliminar eventos passados</string>
<string name="caches_refresh_selected">Actualizar seleccionada</string>
<string name="caches_refresh_all">Actualizar todas</string>
@@ -301,10 +289,8 @@
<string name="caches_removing_from_history">A remover do histórico…</string>
<string name="caches_clear_offlinelogs">Limpar registos offline</string>
<string name="caches_clear_offlinelogs_progress">A limpar registos offline</string>
- <string name="list_menu">Listas</string>
<string name="list_menu_create">Criar nova lista</string>
<string name="list_menu_drop">Apagar lista actual</string>
- <string name="list_menu_change">Mudar de lista</string>
<string name="list_menu_rename">Mudar o nome da lista corrente.</string>
<string name="list_title">Escolha uma lista</string>
<string name="list_inbox">Arquivadas</string>
@@ -355,7 +341,7 @@
<string name="settings_activate_ox">Activar</string>
<string name="settings_gc_legal_note">Quando você usa do serviço do geocaching.com, você aceita os termos de uso da Groundspeak.</string>
<string name="settings_info_facebook_login_title">Facebook Login</string>
- <string name="settings_info_facebook_login" tools:ignore="Typos">Não consegue que c:geo faça o login em geocaching.com com a sua conta do Facebook. Mas existe uma solução simples…</string>
+ <string name="settings_info_facebook_login">Não consegue que c:geo faça o login em geocaching.com com a sua conta do Facebook. Mas existe uma solução simples…</string>
<string name="settings_authorize">Autorizar c:geo</string>
<string name="settings_reauthorize">Reautorizar c:geo</string>
<string name="init_oc">Opencaching.de</string>
@@ -402,8 +388,6 @@
<string name="init_signature_template_log">Texto de registo</string>
<string name="init_ratingwanted">Carregar a pontuação da cache de GCvote.com</string>
<string name="init_summary_ratingwanted">Carregar a pontuação da cache de GCvote.com</string>
- <string name="init_friendlogswanted">Carregar página adicional de registos de amigos</string>
- <string name="init_summary_friendlogswanted">Carregar página adicional de registos de amigos</string>
<string name="init_openlastdetailspage">Abrir detalhes da última página vizualizada</string>
<string name="init_summary_openlastdetailspage">Abrir detalhes da última página vizualizada</string>
<string name="init_autoload">Carregar automaticamente a descrição longa</string>
@@ -539,6 +523,10 @@
<string name="auth_ocde">opencaching.de</string>
<string name="auth_ocpl">Opencaching.pl</string>
<string name="auth_dialog_completed_oc">c:geo está agora autorizado a interagir com %s.</string>
+ <plurals name="cache_counts">
+ <item quantity="one">Uma cache</item>
+ <item quantity="other">%1$d Caches</item>
+ </plurals>
<string name="cache_offline">Arquivo</string>
<string name="cache_offline_refresh">Actualizar</string>
<string name="cache_offline_drop">Apagar</string>
@@ -554,7 +542,6 @@
<string name="cache_premium">Premium</string>
<string name="cache_attributes">Atributos</string>
<string name="cache_inventory">Inventário</string>
- <string name="cache_log_offline">Registo Offline</string>
<string name="cache_log_images_title">Imagem do registo</string>
<string name="cache_log_image_default_title">Foto</string>
<string name="cache_personal_note">Nota pessoal</string>
@@ -565,8 +552,6 @@
<string name="cache_personal_note_uploading">A enviar nota pessoal</string>
<string name="cache_personal_note_upload_done">Nota pessoal enviada</string>
<string name="cache_personal_note_upload_cancelled">Envio de nota pessoal cancelado</string>
- <string name="cache_personal_note_unstored">Cache não guaradada</string>
- <string name="cache_personal_note_store">A cache vai ser guardada primeiro para permitir notas pessoais.</string>
<string name="cache_description">Descrição</string>
<string name="cache_description_long">Descrição longa</string>
<string name="cache_description_table_note">A descrição contém a formatação da tabela que pode ser necessário para ser vista correctamente em %s.</string>
@@ -583,10 +568,13 @@
<string name="cache_list_unknown">Não está numa lista</string>
<string name="cache_images">Imagens</string>
<string name="cache_waypoints">Pontos de referência</string>
+ <plurals name="waypoints">
+ <item quantity="one">1 Waypoint</item>
+ <item quantity="other">%d Waypoints</item>
+ </plurals>
<string name="cache_waypoints_add">Adicionar ponto de referência</string>
<string name="cache_hint">Pista</string>
<string name="cache_logs">Logbook</string>
- <string name="cache_logsfriends">Logbook (Amigos)</string>
<string name="cache_dialog_loading_details">A carregar os detalhes da cache…</string>
<string name="cache_dialog_loading_details_status_loadpage">A carregar a página</string>
<string name="cache_dialog_loading_details_status_details">A processar os detalhes</string>
@@ -632,10 +620,8 @@
<string name="cache_menu_refresh">Actualizar</string>
<string name="cache_menu_share">Partilhar cache</string>
<string name="cache_menu_move_list">Mover para outra lista</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">Cache Beacon</string>
<string name="cache_menu_navigon">Navigon</string>
<string name="cache_menu_pebble">Seixo</string>
<string name="cache_status">Estado</string>
@@ -752,10 +738,7 @@
<string name="map_view_map">Vista de mapa</string>
<string name="map_modes">Modos de mapa</string>
<string name="map_trail_show">Mostrar caminho</string>
- <string name="map_trail_hide">Esconder caminho</string>
<string name="map_circles_show">Mostrar círculos</string>
- <string name="map_circles_hide">Esconder círculos</string>
- <string name="map_mycaches_show">Mostrar caches encontradas e minhas</string>
<string name="map_mycaches_hide">Esconder caches encontradas e minhas</string>
<string name="map_theme_builtin">Padrão</string>
<string name="map_theme_select">Selecione o tema de mapa</string>
@@ -838,7 +821,6 @@
<string name="use_gps">Utilizar GPS</string>
<string name="use_compass">Utilizar Bússola</string>
<string name="destination_select">Seleccionar destino</string>
- <string name="destination_set">Definir destino</string>
<string name="navigation_direct_navigation">Navegação directa</string>
<string name="navigation_target">Destino</string>
<string name="err_nav_no_coordinates">Não pode iniciar a navegação sem coordenadas</string>
@@ -1109,7 +1091,6 @@
<string name="website">Site na internet: <a href="">cgeo.org</a></string>
<string name="facebook">Facebook: <a href="">página do c:geo</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Manual: <a href="">o essencial do c:geo</a></string>
<string name="market">Android: <a href="">c:geo no Google Play</a></string>
<string name="about_twitter">O <b>c:geo</b> deve publicar no Twitter de cada vez que uma cache foi registrada?</string>
<string name="faq">FAQ: <a href="">faq.cgeo.org</a></string>
@@ -1125,52 +1106,33 @@
<string name="tts_stop">Páre de falar</string>
<string name="err_tts_lang_not_supported">A linguagem corrente não é suportada pelo texto em fala.</string>
<string name="tts_one_kilometer">um quilômetro</string>
- <string name="tts_one_meter">um metro</string>
- <string name="tts_one_mile">uma milha</string>
- <string name="tts_one_foot">um pé</string>
- <string name="tts_one_oclock">uma hora</string>
- <string name="tts_oclock">%s horas</string>
- <string name="clipboard_copy_ok">Copiado para a área de transferência</string>
- <string name="percent_favorite_points">%\ favoritos</string>
- <string name="cgeo_shortcut">Atalho c:geo</string>
- <string name="create_shortcut">Criar atalho</string>
- <string-array name="log_image_scales">
- <item>Não dimensionar</item>
- <item>512 px</item>
- <item>640 px</item>
- <item>800 px</item>
- <item>1024 px</item>
- </string-array>
- <plurals name="caches_eta_mins">
- <item quantity="one">minuto</item>
- <item quantity="other">minutos</item>
- </plurals>
- <plurals name="cache_counts">
- <item quantity="one">Uma cache</item>
- <item quantity="other">%1$d Caches</item>
- </plurals>
- <plurals name="waypoints">
- <item quantity="one">1 Waypoint</item>
- <item quantity="other">%d Waypoints</item>
- </plurals>
<plurals name="tts_kilometers">
<item quantity="one">%s quilômetros</item>
<item quantity="other">%s quilômetros</item>
</plurals>
+ <string name="tts_one_meter">um metro</string>
<plurals name="tts_meters">
<item quantity="one">%s metro</item>
<item quantity="other">%s metros</item>
</plurals>
+ <string name="tts_one_mile">uma milha</string>
<plurals name="tts_miles">
<item quantity="one">%s milha</item>
<item quantity="other">%s milhas</item>
</plurals>
+ <string name="tts_one_foot">um pé</string>
<plurals name="tts_feet">
<item quantity="one">%s pé</item>
<item quantity="other">%s pés</item>
</plurals>
+ <string name="tts_one_oclock">uma hora</string>
+ <string name="tts_oclock">%s horas</string>
+ <string name="clipboard_copy_ok">Copiado para a área de transferência</string>
<plurals name="days_ago">
<item quantity="one">ontem</item>
<item quantity="other">%d dias atrás</item>
</plurals>
+ <string name="percent_favorite_points">%\ favoritos</string>
+ <string name="cgeo_shortcut">Atalho c:geo</string>
+ <string name="create_shortcut">Criar atalho</string>
</resources>
diff --git a/main/res/values-ro/strings.xml b/main/res/values-ro/strings.xml
index ecb96ec..b764550 100644
--- a/main/res/values-ro/strings.xml
+++ b/main/res/values-ro/strings.xml
@@ -9,7 +9,6 @@
<string name="about">Despre c:geo</string>
<string name="latitude">Latitudine</string>
<string name="longitude">Longitudine</string>
- <string name="action_bar_share_title">Distribuie adresa cutiei</string>
<string name="settings_titlebar">Configuraţii c:geo</string>
<string name="all_types">Toate tipurile de cutii</string>
<string name="traditional">Tradiţională</string>
@@ -79,22 +78,9 @@
<string name="log_saving">Trimitere jurnal…</string>
<string name="log_saving_and_uploading">Trimitre jurnal şi încarcare poze…</string>
<string name="log_clear">Şterge</string>
- <string name="log_post">Trimite Însemnare</string>
- <string name="log_post_rate">Trimite Însemnare &amp; Votează</string>
- <string name="log_post_no_rate">Trimite Însemnare &amp; Fără Vot</string>
<string name="log_post_not_possible">Încărcare pagină însemnări…</string>
<string name="log_add">Adaugă</string>
- <string name="log_rating">Vot</string>
<string name="log_no_rating">Fără voturi</string>
- <string name="log_stars_1">1 stea</string>
- <string name="log_stars_15">1,5 stele</string>
- <string name="log_stars_2">2 stele</string>
- <string name="log_stars_25">2,5 stele</string>
- <string name="log_stars_3">3 stele</string>
- <string name="log_stars_35">3,5 stele</string>
- <string name="log_stars_4">4 stele</string>
- <string name="log_stars_45">4,5 stele</string>
- <string name="log_stars_5">5 stele</string>
<string name="log_stars_1_description">Foarte slabă</string>
<string name="log_stars_15_description">Slabă</string>
<string name="log_stars_2_description">Slăbuţă</string>
@@ -113,7 +99,6 @@
<string name="log_smilies">Smilies</string>
<string name="log_image">Imagine</string>
<string name="log_image_attach">Ataşează imagine</string>
- <string name="log_image_edit">Modifică imagine</string>
<string name="log_image_stored">Existentă</string>
<string name="log_image_camera">Nouă</string>
<string name="log_image_caption">Titlu</string>
@@ -122,6 +107,13 @@
<string name="log_password_title">Parolă:</string>
<string name="log_hint_log_password">Introdu parola pentru jurnal</string>
<string name="log_oc_team_comment">Comentariu din partea echipei OC</string>
+ <string-array name="log_image_scales">
+ <item>Fără redimensionare</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<string name="translate_to_sys_lang">Tradu în limba %s</string>
<string name="translate_to_english">Tradu în limba engleză</string>
<string name="translate_length_warning">Traducerea poate fi incompletă în cazul unui text mare.</string>
@@ -221,6 +213,7 @@
<string name="loc_trying">Încerc să determin poziţia</string>
<string name="loc_no_addr">Adresă necunoscută</string>
<string name="loc_gps_disabled">GPS inactiv</string>
+ <string name="menu_centerposition">Centrează pe poziţia mea</string>
<string name="menu_about">Despre c:geo</string>
<string name="menu_helpers">Programe utilitare</string>
<string name="menu_settings">Setări</string>
@@ -247,7 +240,6 @@
<string name="caches_history">Istoric</string>
<string name="caches_on_map">Arată pe hartă</string>
<string name="caches_sort">Sortare</string>
- <string name="caches_sort_title">Sortare după</string>
<string name="caches_sort_distance">Distanţă</string>
<string name="caches_sort_difficulty">Dificultate</string>
<string name="caches_sort_terrain">Teren</string>
@@ -269,13 +261,6 @@
<string name="caches_select_invert">Inversează selecţia</string>
<string name="caches_nearby">În apropiere</string>
<string name="caches_manage">Gestionează</string>
- <string name="caches_drop_selected">Şterge cutiile selectate</string>
- <string name="caches_drop_selected_ask">Vrei să ştergi cutiile selectate din dispozitiv?</string>
- <string name="caches_drop_all">Şterge tot</string>
- <string name="caches_drop_all_ask">Vrei să ştergi toate cutiile din lista curenă?</string>
- <string name="caches_drop_stored">Şterge cutiile stocate</string>
- <string name="caches_drop_progress">Ştergere cutii…</string>
- <string name="caches_drop_all_and_list">Şterge lista şi toate cutiile</string>
<string name="caches_delete_events">Şterge evenimentele trecute</string>
<string name="caches_refresh_selected">Reîncarcă cutiile selectate</string>
<string name="caches_refresh_all">Reîncarcă toate cutiile</string>
@@ -283,7 +268,6 @@
<string name="caches_move_all">Mută toate cutiile</string>
<string name="caches_map_locus">Locus</string>
<string name="caches_map_locus_export">Exportă către Locus</string>
- <string name="caches_map_mapswithme">MapsWithMe</string>
<string name="caches_recaptcha_title">reCAPTCHA</string>
<string name="caches_recaptcha_explanation">Tastează textul din imagine. Aceasta permite descărcarea coordonatelor cutiilor, acest lucru poate fi dezactivat în Opţiuni.</string>
<string name="caches_recaptcha_hint">Textul din imagine</string>
@@ -303,10 +287,8 @@
<string name="caches_removing_from_history">Şterge din istoric…</string>
<string name="caches_clear_offlinelogs">Şterge însemnări stocate local</string>
<string name="caches_clear_offlinelogs_progress">Ştergere însemnări stocate local</string>
- <string name="list_menu">Liste</string>
<string name="list_menu_create">Crează listă nouă</string>
<string name="list_menu_drop">Şterge lista curentă</string>
- <string name="list_menu_change">Schimbă lista</string>
<string name="list_menu_rename">Redenumeşte lista curentă</string>
<string name="list_title">Alege o listă</string>
<string name="list_inbox">Salvate</string>
@@ -404,8 +386,8 @@
<string name="init_signature_template_log">Text însemnare</string>
<string name="init_ratingwanted">Voturi GCvote</string>
<string name="init_summary_ratingwanted">Încarcă voturi de la GCvote.com</string>
- <string name="init_friendlogswanted">Arată însemnările prietenilor</string>
- <string name="init_summary_friendlogswanted">Afişează o pagină suplimentară cu însemnări de la prieteni</string>
+ <string name="init_friends_and_own_logs_wanted">Arată ale mele/ale prietenilor</string>
+ <string name="init_summary_friends_and_own_logs_wanted">Afişează pagină de jurnal separată pentru însemnările proprii şi ale prietenilor</string>
<string name="init_openlastdetailspage">Ultima pagină cu detalii</string>
<string name="init_summary_openlastdetailspage">Arată detaliile de pe ultima pagină afişată</string>
<string name="init_autoload">Descriere completă</string>
@@ -494,6 +476,9 @@
<string name="init_maintenance">Întreţinere</string>
<string name="init_maintenance_directories_note">c:geo salvează imagini, imagini din însemnări şi alte fişiere legate de o geocutie într-un dosar separat. Este posibil ca în unele cazuri (precum import/export al bazei de date) acest dosar să conţină fişiere vechi ce pot fi şterse aici.</string>
<string name="init_maintenance_directories">Şterge fişierele devenite inutile</string>
+ <string name="init_create_memory_dump">Creează un extras de memorie copie după memoria folosită de aplicaţie</string>
+ <string name="init_memory_dump">Extras de memorie</string>
+ <string name="init_memory_dumped">Extras de memorie salvat în %s</string>
<string name="settings_open_website">Intră pe site</string>
<string name="settings_settings">Opţiuni</string>
<string name="settings_information">Informaţii</string>
@@ -558,7 +543,6 @@
<string name="cache_premium">Premium</string>
<string name="cache_attributes">Atribute</string>
<string name="cache_inventory">Inventar</string>
- <string name="cache_log_offline">Însemnare stocată local</string>
<string name="cache_log_images_title">Imagini însemnare</string>
<string name="cache_log_image_default_title">Foto</string>
<string name="cache_personal_note">Notă personală</string>
@@ -569,8 +553,6 @@
<string name="cache_personal_note_uploading">Încărcare notă personală</string>
<string name="cache_personal_note_upload_done">Nota personală a fost încărcată</string>
<string name="cache_personal_note_upload_cancelled">Încărcarea notei personale a fost anulată</string>
- <string name="cache_personal_note_unstored">Cutia nu este salvată</string>
- <string name="cache_personal_note_store">Cutia va fi mai întâi salvată pentru a permite adăugarea de note personale.</string>
<string name="cache_description">Descriere</string>
<string name="cache_description_long">Descriere completă</string>
<string name="cache_description_table_note">Descrierea conţine tabele sau formatări care ar trebui vizualizate aici %s pentru a fi afişate corect.</string>
@@ -590,7 +572,7 @@
<string name="cache_waypoints_add">Adaugă punct</string>
<string name="cache_hint">Indiciu</string>
<string name="cache_logs">Jurnal</string>
- <string name="cache_logsfriends">Jurnal (Prieteni)</string>
+ <string name="cache_logs_friends_and_own">Însemnări proprii/de la prieteni</string>
<string name="cache_dialog_loading_details">Încărcare detaliile cutiei…</string>
<string name="cache_dialog_loading_details_status_loadpage">Încărcare pagină</string>
<string name="cache_dialog_loading_details_status_details">Prelucrare detalii</string>
@@ -636,16 +618,14 @@
<string name="cache_menu_refresh">Împrospătează</string>
<string name="cache_menu_share">Distribuie geocutie</string>
<string name="cache_menu_move_list">Mută în altă listă</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">Cutie Baliză</string>
<string name="cache_menu_navigon">Navigon</string>
<string name="cache_menu_pebble">Ceas \"Pebble\"</string>
- <string name="cache_menu_mapswithme">MapsWithMe</string>
<string name="cache_status">Stare</string>
<string name="cache_status_offline_log">Jurnal salvat</string>
<string name="cache_status_found">Găsit</string>
+ <string name="cache_not_status_found">Nu a fost găsită</string>
<string name="cache_status_archived">Arhivată</string>
<string name="cache_status_disabled">Inactivă</string>
<string name="cache_status_premium">Doar membrii Premium</string>
@@ -757,10 +737,7 @@
<string name="map_view_map">Hărţi</string>
<string name="map_modes">Opţiuni hărţi</string>
<string name="map_trail_show">Arată traseu</string>
- <string name="map_trail_hide">Ascunde traseu</string>
<string name="map_circles_show">Arată cercurile</string>
- <string name="map_circles_hide">Ascunde cercurile</string>
- <string name="map_mycaches_show">Arată geocutiile mele/găsite</string>
<string name="map_mycaches_hide">Ascunde geocutiile mele/găsite</string>
<string name="map_theme_builtin">Implicit</string>
<string name="map_theme_select">Alege un stil pentru hartă</string>
@@ -843,7 +820,6 @@
<string name="use_gps">Foloseşte doar GPS-ul</string>
<string name="use_compass">Foloseşte GPS-ul şi busola</string>
<string name="destination_select">Alege destinaţia</string>
- <string name="destination_set">Alege destinaţia</string>
<string name="navigation_direct_navigation">Navigare directă</string>
<string name="navigation_target">Ţintă</string>
<string name="err_nav_no_coordinates">Nu se poate porni navigarea fără coordonate</string>
@@ -1114,7 +1090,6 @@
<string name="website">Site: <a href="">cgeo.org</a></string>
<string name="facebook">Facebook: <a href="">pagina c:geo</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Manual: <a href="">c:geo într-o coajă de nucă</a></string>
<string name="market">Android: <a href="">c:geo pe Google Play</a></string>
<string name="about_twitter">Ar trebui ca <b>c:geo</b> să publice un statut nou pe Twitter de fiecare dată când scrii o însemnare pentru o geocutie?</string>
<string name="faq">FAQ: <a href="">faq.cgeo.org</a></string>
@@ -1139,11 +1114,5 @@
<string name="percent_favorite_points">%\ favorite</string>
<string name="cgeo_shortcut">legătură la c:geo</string>
<string name="create_shortcut">Crează scurtătură</string>
- <string-array name="log_image_scales">
- <item>Fără redimensionare</item>
- <item>512 px</item>
- <item>640 px</item>
- <item>800 px</item>
- <item>1024 px</item>
- </string-array>
+ <string name="send">Trimite</string>
</resources>
diff --git a/main/res/values-sk/strings.xml b/main/res/values-sk/strings.xml
index b321f83..a0f1b4a 100644
--- a/main/res/values-sk/strings.xml
+++ b/main/res/values-sk/strings.xml
@@ -9,7 +9,6 @@
<string name="about">O aplikácii</string>
<string name="latitude">Zemepisná šírka</string>
<string name="longitude">Zemepisná dĺžka</string>
- <string name="action_bar_share_title">Zdieľať odkaz ku skrýši</string>
<string name="settings_titlebar">c:geo Nastavenie</string>
<string name="all_types">Všetky typy</string>
<string name="traditional">Tradičná skrýša</string>
@@ -18,6 +17,7 @@
<string name="letterbox">Letterbox Hybrid</string>
<string name="event">Stretnutie</string>
<string name="mega">Mega-Event Cache</string>
+ <string name="giga">Giga-Event Cache</string>
<string name="earth">Earthcache</string>
<string name="cito">\"Upracme si\" stretnutie</string>
<string name="webcam">Web kamerová</string>
@@ -78,22 +78,9 @@
<string name="log_saving">Ukladanie logu</string>
<string name="log_saving_and_uploading">Odosielanie logu a nahrávanie obrázku…</string>
<string name="log_clear">Vyčistiť</string>
- <string name="log_post">Odoslať log</string>
- <string name="log_post_rate">Odoslať log a hlasovať</string>
- <string name="log_post_no_rate">Odoslať log a nehlasovať</string>
<string name="log_post_not_possible">Načítanie stránky s logmi…</string>
<string name="log_add">Pridať</string>
- <string name="log_rating">Hlasovať</string>
<string name="log_no_rating">Nehlasovať</string>
- <string name="log_stars_1">1 hviezdička</string>
- <string name="log_stars_15">1,5 hviezdičky</string>
- <string name="log_stars_2">2 hviezdičky</string>
- <string name="log_stars_25">2,5 hviezdičky</string>
- <string name="log_stars_3">3 hviezdičky</string>
- <string name="log_stars_35">3,5 hviezdičky</string>
- <string name="log_stars_4">4 hviezdičky</string>
- <string name="log_stars_45">4,5 hviezdičky</string>
- <string name="log_stars_5">5 hviezdičiek</string>
<string name="log_stars_1_description">slabé</string>
<string name="log_stars_15_description">dosť slabé</string>
<string name="log_stars_2_description">podpriemerné</string>
@@ -112,7 +99,6 @@
<string name="log_smilies">Smajlíci</string>
<string name="log_image">Obrázok</string>
<string name="log_image_attach">Pripojiť obrázok</string>
- <string name="log_image_edit">Upraviť obrázok</string>
<string name="log_image_stored">Existujúci</string>
<string name="log_image_camera">Nový</string>
<string name="log_image_caption">Titulok</string>
@@ -121,6 +107,13 @@
<string name="log_password_title">Prihlásiť heslo:</string>
<string name="log_hint_log_password">Zadajte svoje logovacie heslo</string>
<string name="log_oc_team_comment">Komentár tímu OC</string>
+ <string-array name="log_image_scales">
+ <item>Bez zmeny mierky</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<string name="translate_to_sys_lang">Preložiť do jazyka %s</string>
<string name="translate_to_english">Preložiť do angličtiny</string>
<string name="translate_length_warning">Pre veľké texty môže preklad zlyhať.</string>
@@ -213,6 +206,7 @@
<string name="info_select_logimage_cancelled">Výber obrázka alebo fotenie bolo zrušené.</string>
<string name="info_stored_image">Nový obrázok uložený do:</string>
<string name="info_storing_static_maps">ukladanie statických máp</string>
+ <string name="info_cache_saved">Cache bola uložená v zariadení</string>
<string name="loc_last">posledná známa</string>
<string name="loc_net">sieť</string>
<string name="loc_gps">GPS</string>
@@ -220,6 +214,7 @@
<string name="loc_trying">zisťovanie pozície</string>
<string name="loc_no_addr">neznáma adresa</string>
<string name="loc_gps_disabled">GPS zakázaná</string>
+ <string name="menu_centerposition">Vycentrovať na moju polohu</string>
<string name="menu_about">O aplikácii</string>
<string name="menu_helpers">Pomocné programy</string>
<string name="menu_settings">Nastavenia</string>
@@ -246,7 +241,6 @@
<string name="caches_history">História</string>
<string name="caches_on_map">Zobraziť na mape</string>
<string name="caches_sort">Zoradiť</string>
- <string name="caches_sort_title">Zoradiť podľa</string>
<string name="caches_sort_distance">vzdialenosti</string>
<string name="caches_sort_difficulty">náročnosti</string>
<string name="caches_sort_terrain">terénu</string>
@@ -268,13 +262,11 @@
<string name="caches_select_invert">Inverzný výber</string>
<string name="caches_nearby">V okolí</string>
<string name="caches_manage">Správa</string>
- <string name="caches_drop_selected">Zmazať vybrané</string>
- <string name="caches_drop_selected_ask">Naozaj chcete zmazať vybraté skrýše zo zariadenia?</string>
- <string name="caches_drop_all">Zmazať všetky</string>
- <string name="caches_drop_all_ask">Naozaj chcete zmazať všetky skrýše zo zariadenia?</string>
- <string name="caches_drop_stored">Zmazať uložené</string>
- <string name="caches_drop_progress">Odstraňovanie skrýš</string>
- <string name="caches_drop_all_and_list">Zmazať všetky a odstrániť zoznam</string>
+ <string name="caches_remove_all">Odstrániť všetky</string>
+ <string name="caches_remove_all_confirm">Chcete odstrániť všetky %s cache z aktuálneho zoznamu?</string>
+ <string name="caches_remove_selected">Odstrániť vybraté</string>
+ <string name="caches_remove_selected_confirm">Chcete odstrániť %s vybraté cache z vášho zariadenia?</string>
+ <string name="caches_remove_progress">Odstraňovanie cache</string>
<string name="caches_delete_events">Odstrániť minulé záznamy</string>
<string name="caches_refresh_selected">Obnoviť vybraté</string>
<string name="caches_refresh_all">Obnoviť všetky</string>
@@ -301,11 +293,10 @@
<string name="caches_removing_from_history">Odstraňovanie z histórie…</string>
<string name="caches_clear_offlinelogs">Vymazať offline záznamy</string>
<string name="caches_clear_offlinelogs_progress">Vymazanie logov v režime offline</string>
- <string name="list_menu">Zoznam</string>
<string name="list_menu_create">Vytvoriť nový zoznam</string>
<string name="list_menu_drop">Zahodiť aktuálny zoznam</string>
- <string name="list_menu_change">Zmeniť zoznam</string>
<string name="list_menu_rename">Premenovať tento zoznam</string>
+ <string name="list_menu_import">Import</string>
<string name="list_title">Výber zoznamu</string>
<string name="list_inbox">Uložené</string>
<string name="list_all_lists">Všetky skrýše</string>
@@ -373,6 +364,8 @@
<string name="init_oc_ro">Opencaching.ro</string>
<string name="settings_activate_oc_ro">Aktivovať</string>
<string name="init_oc_ro_description">Povoliť c:geo s opencaching.ro na vyhľadávanie keší a zoznam/filter nájdených keší.</string>
+ <string name="settings_activate_oc_uk">Aktivovať</string>
+ <string name="init_oc_uk_description">Povoliť c:geo s opencaching.org.uk na vyhľadávanie keší a zoznam/filter nájdených keší.</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="settings_activate_twitter">Aktivovať</string>
@@ -402,8 +395,8 @@
<string name="init_signature_template_log">Zápis do logu</string>
<string name="init_ratingwanted">Načítať hodnotenie skrýše z GCvote.com</string>
<string name="init_summary_ratingwanted">Načítať hodnotenie skrýše z GCvote.com</string>
- <string name="init_friendlogswanted">Načítať dodatočnú stránku s logmi od priateľov</string>
- <string name="init_summary_friendlogswanted">Načítať dodatočnú stránku s logmi od priateľov</string>
+ <string name="init_friends_and_own_logs_wanted">Zobraziť priateľov / vlastné</string>
+ <string name="init_summary_friends_and_own_logs_wanted">Zobraziť ďalšie stránky pre logy priateľov a vlastné logy</string>
<string name="init_openlastdetailspage">Otvoriť detaily na naposledy použitej stránke</string>
<string name="init_summary_openlastdetailspage">Otvoriť detaily na naposledy použitej stránke</string>
<string name="init_autoload">Automatické načítanie dlhého popisu</string>
@@ -492,6 +485,9 @@
<string name="init_maintenance">Údržba</string>
<string name="init_maintenance_directories_note">c:Geo ukladá obrázky, log obrázky a ďalšie súbory súvisiace s cache v samostatnom adresári. V niektorých prípadoch (ako import/export databázy) Tento adresár môže obsahovať neaktuálne súbory, ktoré môžete zmazať tu.</string>
<string name="init_maintenance_directories">Odstrániť osirelé súbory</string>
+ <string name="init_create_memory_dump">Vytvorenie výpisu pamäte</string>
+ <string name="init_memory_dump">Výpis pamäte</string>
+ <string name="init_memory_dumped">Výpis pamäte uložiť do %s</string>
<string name="settings_open_website">Otvoriť stránku</string>
<string name="settings_settings">Nastavenia</string>
<string name="settings_information">Informácia</string>
@@ -554,7 +550,6 @@
<string name="cache_premium">platený účet</string>
<string name="cache_attributes">Atribúty</string>
<string name="cache_inventory">Obsah</string>
- <string name="cache_log_offline">Offline log</string>
<string name="cache_log_images_title">Obrázok z logu</string>
<string name="cache_log_image_default_title">Fotografia</string>
<string name="cache_personal_note">Osobná poznámka</string>
@@ -565,8 +560,6 @@
<string name="cache_personal_note_uploading">Nahrať osobnú poznámku</string>
<string name="cache_personal_note_upload_done">Osobná poznámka nahraná</string>
<string name="cache_personal_note_upload_cancelled">Nahrávanie osobnej poznámky zrušené</string>
- <string name="cache_personal_note_unstored">Cache nie je uložená</string>
- <string name="cache_personal_note_store">Cache sa najskôr uložia aby sa povolila osobná poznámka.</string>
<string name="cache_description">Popis</string>
<string name="cache_description_long">Dlhý popis</string>
<string name="cache_description_table_note">Popis obsahuje formátovanie tabuľky, ktorý môže byť pre správne zobrazenie potrebné otvoriť v %s.</string>
@@ -583,10 +576,15 @@
<string name="cache_list_unknown">Nie je v zozname</string>
<string name="cache_images">Obrázky</string>
<string name="cache_waypoints">Body trasy</string>
+ <plurals name="waypoints">
+ <item quantity="one">1 bod trasy</item>
+ <item quantity="few">%d body trasy</item>
+ <item quantity="other">%d bodov trasy</item>
+ </plurals>
<string name="cache_waypoints_add">Pridať bod</string>
<string name="cache_hint">Nápoveda</string>
<string name="cache_logs">Logbook</string>
- <string name="cache_logsfriends">Logbook (priatelia)</string>
+ <string name="cache_logs_friends_and_own">Logy priateľov/vlastné</string>
<string name="cache_dialog_loading_details">Načítanie detailov skrýše…</string>
<string name="cache_dialog_loading_details_status_loadpage">Načítanie stránky</string>
<string name="cache_dialog_loading_details_status_details">Spracovanie detailov</string>
@@ -632,15 +630,14 @@
<string name="cache_menu_refresh">Obnoviť</string>
<string name="cache_menu_share">Zdielať skrýšu</string>
<string name="cache_menu_move_list">Presunúť do iného zoznamu</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">Cache Beacon</string>
<string name="cache_menu_navigon">Navigon</string>
<string name="cache_menu_pebble">Pebble</string>
<string name="cache_status">Stav</string>
<string name="cache_status_offline_log">Uložený log</string>
<string name="cache_status_found">Nájdená</string>
+ <string name="cache_not_status_found">Nebol nájdený</string>
<string name="cache_status_archived">Archivovaná</string>
<string name="cache_status_disabled">Zrušená</string>
<string name="cache_status_premium">Iba pre platiacich používateľov</string>
@@ -752,10 +749,7 @@
<string name="map_view_map">Zobrazenie mapy</string>
<string name="map_modes">Režimy mapy</string>
<string name="map_trail_show">Zobraziť záznam trasy</string>
- <string name="map_trail_hide">Skryť záznam trasy</string>
<string name="map_circles_show">Zobraziť kruhy</string>
- <string name="map_circles_hide">Skryť kruhy</string>
- <string name="map_mycaches_show">Zobraziť vlastné/nájdené cache</string>
<string name="map_mycaches_hide">Skryť vlastné/nájdené cache</string>
<string name="map_theme_builtin">Predvolené</string>
<string name="map_theme_select">Vybrať tému mapy</string>
@@ -835,10 +829,10 @@
<string name="user_menu_open_contact">Otvoriť kartu kontaktu</string>
<string name="navigation">Navigácia</string>
<string name="compass_title">Kompas</string>
+ <string name="compass_sensors">Aktívne senzory</string>
<string name="use_gps">Použiť iba GPS</string>
<string name="use_compass">Použiť GPS a kompas</string>
<string name="destination_select">Vyberte cieľ</string>
- <string name="destination_set">Nastaviť cieľ</string>
<string name="navigation_direct_navigation">Priama navigácia</string>
<string name="navigation_target">Cieľ</string>
<string name="err_nav_no_coordinates">Nemožno spustiť navigáciu bez súradníc</string>
@@ -1109,7 +1103,6 @@
<string name="website">Web: <a href="">cgeo.org</a></string>
<string name="facebook">Facebook: <a href="">c:geo page</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Manuál: <a href="">c:geo v kocke</a></string>
<string name="market">Android: <a href=""> c:geo na Google Play</a></string>
<string name="about_twitter">Chcete, aby <b>c:geo</b> napísalo na váš Twitter vždy keď zapíšete nájdenie skrýše?</string>
<string name="faq">FAQ: <a href="">faq.cgeo.org</a></string>
@@ -1125,47 +1118,32 @@
<string name="tts_stop">Prestať hovoriť</string>
<string name="err_tts_lang_not_supported">Aktuálny jazyk nepodporuje prevod textu na reč.</string>
<string name="tts_one_kilometer">jeden kilometer</string>
- <string name="tts_one_meter">jeden meter</string>
- <string name="tts_one_mile">jedna míľa</string>
- <string name="tts_one_foot">jedna stopa</string>
- <string name="tts_one_oclock">jedna hodina</string>
- <string name="tts_oclock">%s hodín</string>
- <string name="clipboard_copy_ok">Skopírované do schránky</string>
- <string name="percent_favorite_points">% \ obľúbených</string>
- <string name="cgeo_shortcut">c:Geo odkaz</string>
- <string name="create_shortcut">Vytvoriť odkaz</string>
- <string-array name="log_image_scales">
- <item>Bez zmeny mierky</item>
- <item>512 px</item>
- <item>640 px</item>
- <item>800 px</item>
- <item>1024 px</item>
- </string-array>
- <plurals name="waypoints">
- <item quantity="one">1 bod trasy</item>
- <item quantity="few">%d body trasy</item>
- <item quantity="other">%d bodov trasy</item>
- </plurals>
<plurals name="tts_kilometers">
<item quantity="one">%s kilometer</item>
<item quantity="few">%s kilometre</item>
<item quantity="other">%s kilometrov</item>
</plurals>
+ <string name="tts_one_meter">jeden meter</string>
<plurals name="tts_meters">
<item quantity="one">%s meter</item>
<item quantity="few">%s metre</item>
<item quantity="other">%s metrov</item>
</plurals>
+ <string name="tts_one_mile">jedna míľa</string>
<plurals name="tts_miles">
<item quantity="one">%s míľa</item>
<item quantity="few">%s míľ</item>
<item quantity="other">%s míľ</item>
</plurals>
+ <string name="tts_one_foot">jedna stopa</string>
<plurals name="tts_feet">
<item quantity="one">%s stopa</item>
<item quantity="few">%s stopy</item>
<item quantity="other">%s stôp</item>
</plurals>
+ <string name="tts_one_oclock">jedna hodina</string>
+ <string name="tts_oclock">%s hodín</string>
+ <string name="clipboard_copy_ok">Skopírované do schránky</string>
<plurals name="days_ago">
<item quantity="one">včera</item>
<item quantity="few">pred %d dňami</item>
@@ -1176,4 +1154,8 @@
<item quantity="few">%s obľúbené</item>
<item quantity="other">%s obľúbených</item>
</plurals>
+ <string name="percent_favorite_points">% \ obľúbených</string>
+ <string name="cgeo_shortcut">c:Geo odkaz</string>
+ <string name="create_shortcut">Vytvoriť odkaz</string>
+ <string name="send">Odoslať</string>
</resources>
diff --git a/main/res/values-sl/strings.xml b/main/res/values-sl/strings.xml
index 1237699..9f51db5 100644
--- a/main/res/values-sl/strings.xml
+++ b/main/res/values-sl/strings.xml
@@ -9,7 +9,6 @@
<string name="about">O c:geo</string>
<string name="latitude">Geog. širina</string>
<string name="longitude">Geog. dolžina</string>
- <string name="action_bar_share_title">Deli povezavo do zaklada</string>
<string name="settings_titlebar">c:geo nastavitve</string>
<string name="all_types">Vsi tipi zakladov</string>
<string name="traditional">Tradicionalni zakladi</string>
@@ -78,22 +77,9 @@
<string name="log_saving">Pošiljam…</string>
<string name="log_saving_and_uploading">Pošiljam zapis in nalagam sliko…</string>
<string name="log_clear">Počisti</string>
- <string name="log_post">Pošlji</string>
- <string name="log_post_rate">Pošlji in oceni</string>
- <string name="log_post_no_rate">Pošlji in ne oceni</string>
<string name="log_post_not_possible">Nalagam stran…</string>
<string name="log_add">Dodaj</string>
- <string name="log_rating">Ocena</string>
<string name="log_no_rating">Brez ocene</string>
- <string name="log_stars_1">1 zvezdica</string>
- <string name="log_stars_15">1.5 zvezdice</string>
- <string name="log_stars_2">2 zvezdici</string>
- <string name="log_stars_25">2.5 zvezdici</string>
- <string name="log_stars_3">3 zvezdice</string>
- <string name="log_stars_35">3.5 zvezdice</string>
- <string name="log_stars_4">4 zvezdice</string>
- <string name="log_stars_45">4.5 zvezdice</string>
- <string name="log_stars_5">5 zvezdic</string>
<string name="log_stars_1_description">Zelo slabo</string>
<string name="log_stars_15_description">Slabo</string>
<string name="log_stars_2_description">Pod povprečjem</string>
@@ -112,7 +98,6 @@
<string name="log_smilies">Smeškoti</string>
<string name="log_image">Slika</string>
<string name="log_image_attach">Dodaj sliko</string>
- <string name="log_image_edit">Uredi sliko</string>
<string name="log_image_stored">Obstoječa</string>
<string name="log_image_camera">Nova</string>
<string name="log_image_caption">Naslov</string>
@@ -121,6 +106,13 @@
<string name="log_password_title">Geslo zapisa:</string>
<string name="log_hint_log_password">Vnesite geslo zapisa</string>
<string name="log_oc_team_comment">Komentar ekipe OC</string>
+ <string-array name="log_image_scales">
+ <item>Brez skaliranja</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<string name="translate_to_sys_lang">Prevedi v: %s</string>
<string name="translate_to_english">Prevedi v: angleščino</string>
<string name="translate_length_warning">Prevod lahko spodleti zaradi velike količine besedila.</string>
@@ -229,7 +221,7 @@
<string name="menu_pocket_queries">Zbirke Pocket Query</string>
<string name="menu_scan_description">c:geo lahko skenira GC kodo, ki je izpisana kot QR koda. Za to potrebujete aplikacijo, ki ni nameščena. Ali jo želite odpreti v Google Play in jo namestiti?</string>
<string name="live_map_button">Zemljevid</string>
- <string name="caches_nearby_button">Blizu</string>
+ <string name="caches_nearby_button">V bližini</string>
<string name="advanced_search_button">Iskanje</string>
<string name="stored_caches_button">Shranjeni</string>
<string name="any_button">Destinacije</string>
@@ -246,7 +238,6 @@
<string name="caches_history">Zgodovina</string>
<string name="caches_on_map">Pokaži na zemljevidu</string>
<string name="caches_sort">Razvrsti</string>
- <string name="caches_sort_title">Razvrsti po</string>
<string name="caches_sort_distance">Razdalja</string>
<string name="caches_sort_difficulty">Težavnost</string>
<string name="caches_sort_terrain">Teren</string>
@@ -266,15 +257,8 @@
<string name="caches_select_mode">Način izbiranja</string>
<string name="caches_select_mode_exit">Izhod iz načina izbiranja</string>
<string name="caches_select_invert">Obrni izbor</string>
- <string name="caches_nearby">Blizu</string>
+ <string name="caches_nearby">V bližini</string>
<string name="caches_manage">Upravljaj</string>
- <string name="caches_drop_selected">Izbriši izbrane</string>
- <string name="caches_drop_selected_ask">Ali želite izbrisati izbrane zaklade?</string>
- <string name="caches_drop_all">Izbriši vse</string>
- <string name="caches_drop_all_ask">Ali želite izbrisati vse zaklade iz tega seznama?</string>
- <string name="caches_drop_stored">Izbriši shranjene</string>
- <string name="caches_drop_progress">Izbris zakladov</string>
- <string name="caches_drop_all_and_list">Izbriši vse in odstrani seznam</string>
<string name="caches_delete_events">Izbriši pretekla srečanja</string>
<string name="caches_refresh_selected">Osveži izbrane</string>
<string name="caches_refresh_all">Osveži vse</string>
@@ -301,10 +285,8 @@
<string name="caches_removing_from_history">Brišem iz zgodovine…</string>
<string name="caches_clear_offlinelogs">Izbriši shranjene zapise</string>
<string name="caches_clear_offlinelogs_progress">Izbris shranjenih zapisov</string>
- <string name="list_menu">Seznam</string>
<string name="list_menu_create">Ustvari nov seznam</string>
<string name="list_menu_drop">Izbriši trenutni seznam</string>
- <string name="list_menu_change">Spremeni seznam</string>
<string name="list_menu_rename">Preimenuj trenutni seznam</string>
<string name="list_title">Izberi seznam</string>
<string name="list_inbox">Shranjeni</string>
@@ -399,8 +381,6 @@
<string name="init_signature_template_log">Vsebina zapisa</string>
<string name="init_ratingwanted">GCvote ocene</string>
<string name="init_summary_ratingwanted">Naloži ocene iz GCvote.com</string>
- <string name="init_friendlogswanted">Naloži zapise prijateljev</string>
- <string name="init_summary_friendlogswanted">Naloži tudi posebno stran zapisov mojih prijateljev</string>
<string name="init_openlastdetailspage">Odpri nazadnje odprto stran</string>
<string name="init_summary_openlastdetailspage">Pri podrobnostih zaklada vedno odpri zadnjo uporabljeno stran</string>
<string name="init_autoload">Prikaži celoten opis</string>
@@ -536,6 +516,12 @@
<string name="auth_ocde">opencaching.de</string>
<string name="auth_ocpl">opencaching.pl</string>
<string name="auth_dialog_completed_oc">c:geo je sedaj povezan z %s.</string>
+ <plurals name="cache_counts">
+ <item quantity="one">%1$d zaklad</item>
+ <item quantity="two">%1$d zaklada</item>
+ <item quantity="few">%1$d zakladi</item>
+ <item quantity="other">%1$d zakladov</item>
+ </plurals>
<string name="cache_offline">Brez povezave</string>
<string name="cache_offline_refresh">Osveži</string>
<string name="cache_offline_drop">Izbriši</string>
@@ -551,7 +537,6 @@
<string name="cache_premium">Premium</string>
<string name="cache_attributes">Atributi</string>
<string name="cache_inventory">Inventar</string>
- <string name="cache_log_offline">Shranjen zapis</string>
<string name="cache_log_images_title">Slike</string>
<string name="cache_log_image_default_title">Slika</string>
<string name="cache_personal_note">Lastna opomba</string>
@@ -562,8 +547,6 @@
<string name="cache_personal_note_uploading">Nalagam lastno opombo na spletno stran</string>
<string name="cache_personal_note_upload_done">Lastna opomba je bila uspešno naložena na spletno stran</string>
<string name="cache_personal_note_upload_cancelled">Nalaganje lastne opombe je bilo preklicano</string>
- <string name="cache_personal_note_unstored">Zaklad ni shranjen</string>
- <string name="cache_personal_note_store">Za vklop opomb bo zaklad najprej shranjen na napravo.</string>
<string name="cache_description">Opis</string>
<string name="cache_description_long">Daljši opis</string>
<string name="cache_description_table_note">Opis vsebuje oblikovanje s tabelami. Za pravilen prikaz opisa bo mogoče potrebno obiskati %s.</string>
@@ -580,10 +563,15 @@
<string name="cache_list_unknown">Ni v seznamu</string>
<string name="cache_images">Slike</string>
<string name="cache_waypoints">Dodatne točke</string>
+ <plurals name="waypoints">
+ <item quantity="one">%d dodatna točka</item>
+ <item quantity="two">%d dodatni točki</item>
+ <item quantity="few">%d dodatne točke</item>
+ <item quantity="other">%d dodatnih točk</item>
+ </plurals>
<string name="cache_waypoints_add">Dodaj točko</string>
<string name="cache_hint">Namig</string>
<string name="cache_logs">Dnevnik zapisov</string>
- <string name="cache_logsfriends">Zapisi prijateljev</string>
<string name="cache_dialog_loading_details">Nalaganje podatkov zaklada…</string>
<string name="cache_dialog_loading_details_status_loadpage">Nalaganje strani</string>
<string name="cache_dialog_loading_details_status_details">Obdelujem podatke</string>
@@ -629,10 +617,8 @@
<string name="cache_menu_refresh">Osveži</string>
<string name="cache_menu_share">Deli povezavo</string>
<string name="cache_menu_move_list">Premakni v drug seznam</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">Cache Beacon</string>
<string name="cache_menu_navigon">Navigon</string>
<string name="cache_menu_pebble">Pebble</string>
<string name="cache_status">Status</string>
@@ -749,10 +735,7 @@
<string name="map_view_map">Pogled zemljevida</string>
<string name="map_modes">Možnosti</string>
<string name="map_trail_show">Pokaži sled</string>
- <string name="map_trail_hide">Skrij sled</string>
<string name="map_circles_show">Pokaži kroge</string>
- <string name="map_circles_hide">Skrij kroge</string>
- <string name="map_mycaches_show">Pokaži lastne ali najdene zaklade</string>
<string name="map_mycaches_hide">Skrij lastne ali najdene zaklade</string>
<string name="map_theme_builtin">Privzeto</string>
<string name="map_theme_select">Izberi temo zemljevida</string>
@@ -835,7 +818,6 @@
<string name="use_gps">Uporabi samo GPS</string>
<string name="use_compass">Uporabi GPS in kompas</string>
<string name="destination_select">Izbira destinacije</string>
- <string name="destination_set">Nastavi destinacijo</string>
<string name="navigation_direct_navigation">Direktna navigacija</string>
<string name="navigation_target">Cilj</string>
<string name="err_nav_no_coordinates">Ne morem začeti navigacije brez koordinat</string>
@@ -1106,7 +1088,6 @@
<string name="website">Spletna stran: <a href="">cgeo.org</a></string>
<string name="facebook">Facebook: <a href="">c:geo stran</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Priročnik: <a href="">c:geo na kratko</a></string>
<string name="market">Android: <a href="">c:geo na Google Play</a></string>
<string name="about_twitter">Naj <b>c:geo</b> objavi nov status na Twitter, ko objavite nov zapis pri zakladu?</string>
<string name="faq">Pogosto zastavljena vprašanja: <a href="">faq.cgeo.org</a></string>
@@ -1122,64 +1103,36 @@
<string name="tts_stop">Ustavi glasovno navigacijo</string>
<string name="err_tts_lang_not_supported">Trenutno izbrani jezik ni podprt s storitvijo pretvorbe besedila v govor.</string>
<string name="tts_one_kilometer">en kilometer</string>
- <string name="tts_one_meter">en meter</string>
- <string name="tts_one_mile">ena milja</string>
- <string name="tts_one_foot">en čevelj</string>
- <string name="tts_one_oclock">one o\'clock</string>
- <string name="tts_oclock">%s o\'clock</string>
- <string name="clipboard_copy_ok">Skopirano v odložišče</string>
- <string name="percent_favorite_points">%\ favoritov</string>
- <string name="cgeo_shortcut">Bližnjica c:geo</string>
- <string name="create_shortcut">Ustvari bližnjico</string>
- <string-array name="log_image_scales">
- <item>Brez skaliranja</item>
- <item>512 px</item>
- <item>640 px</item>
- <item>800 px</item>
- <item>1024 px</item>
- </string-array>
- <plurals name="caches_eta_mins">
- <item quantity="one">minuta</item>
- <item quantity="two">minuti</item>
- <item quantity="few">minute</item>
- <item quantity="other">minut</item>
- </plurals>
- <plurals name="cache_counts">
- <item quantity="one">%1$d zaklad</item>
- <item quantity="two">%1$d zaklada</item>
- <item quantity="few">%1$d zakladi</item>
- <item quantity="other">%1$d zakladov</item>
- </plurals>
- <plurals name="waypoints">
- <item quantity="one">%d dodatna točka</item>
- <item quantity="two">%d dodatni točki</item>
- <item quantity="few">%d dodatne točke</item>
- <item quantity="other">%d dodatnih točk</item>
- </plurals>
<plurals name="tts_kilometers">
<item quantity="one">%s kilometer</item>
<item quantity="two">%s kilometra</item>
<item quantity="few">%s kilometrov</item>
<item quantity="other">%s kilometrov</item>
</plurals>
+ <string name="tts_one_meter">en meter</string>
<plurals name="tts_meters">
<item quantity="one">%s meter</item>
<item quantity="two">%s metra</item>
<item quantity="few">%s metri</item>
<item quantity="other">%s metrov</item>
</plurals>
+ <string name="tts_one_mile">ena milja</string>
<plurals name="tts_miles">
<item quantity="one">%s milja</item>
<item quantity="two">%s milji</item>
<item quantity="few">%s milj</item>
<item quantity="other">%s milj</item>
</plurals>
+ <string name="tts_one_foot">en čevelj</string>
<plurals name="tts_feet">
<item quantity="one">%s čevelj</item>
<item quantity="two">%s čevlja</item>
<item quantity="few">%s čevljev</item>
<item quantity="other">%s čevljev</item>
</plurals>
+ <string name="tts_one_oclock">one o\'clock</string>
+ <string name="tts_oclock">%s o\'clock</string>
+ <string name="clipboard_copy_ok">Skopirano v odložišče</string>
<plurals name="days_ago">
<item quantity="one">Pred %d dnevom</item>
<item quantity="two">Pred %d dnevoma</item>
@@ -1192,4 +1145,7 @@
<item quantity="few">%s favoritov</item>
<item quantity="other">%s favoritov</item>
</plurals>
+ <string name="percent_favorite_points">%\ favoritov</string>
+ <string name="cgeo_shortcut">Bližnjica c:geo</string>
+ <string name="create_shortcut">Ustvari bližnjico</string>
</resources>
diff --git a/main/res/values-sv/strings.xml b/main/res/values-sv/strings.xml
index 3c94ee2..c380600 100644
--- a/main/res/values-sv/strings.xml
+++ b/main/res/values-sv/strings.xml
@@ -9,7 +9,6 @@
<string name="about">Om c:geo</string>
<string name="latitude">Latitud</string>
<string name="longitude">Longitud</string>
- <string name="action_bar_share_title">Skicka cachens länk via</string>
<string name="settings_titlebar">Inställningar för c:geo</string>
<string name="all_types">Alla typer av cacher</string>
<string name="traditional">Traditionell cache</string>
@@ -18,6 +17,7 @@
<string name="letterbox">Letterbox hybrid</string>
<string name="event">Event cache</string>
<string name="mega">Mega-event cache</string>
+ <string name="giga">Giga-Event Cache</string>
<string name="earth">Earthcache</string>
<string name="cito">Cache in trash out event</string>
<string name="webcam">Webcam cache</string>
@@ -78,22 +78,9 @@
<string name="log_saving">Sparar logg…</string>
<string name="log_saving_and_uploading">Sparar logg och laddar upp bild…</string>
<string name="log_clear">Rensa</string>
- <string name="log_post">Posta logg</string>
- <string name="log_post_rate">Posta logg &amp; ge betyget</string>
- <string name="log_post_no_rate">Posta logg utan betyg</string>
<string name="log_post_not_possible">Laddar loggningssida…</string>
<string name="log_add">Lägg till</string>
- <string name="log_rating">Betyg</string>
<string name="log_no_rating">Inget betyg</string>
- <string name="log_stars_1">1 stjärna</string>
- <string name="log_stars_15">1.5 stjärnor</string>
- <string name="log_stars_2">2 stjärnor</string>
- <string name="log_stars_25">2.5 stjärnor</string>
- <string name="log_stars_3">3 stjärnor</string>
- <string name="log_stars_35">3.5 stjärnor</string>
- <string name="log_stars_4">4 stjärnor</string>
- <string name="log_stars_45">4.5 stjärnor</string>
- <string name="log_stars_5">5 stjärnor</string>
<string name="log_stars_1_description">Dålig</string>
<string name="log_stars_15_description">Halvdålig</string>
<string name="log_stars_2_description">Under medel</string>
@@ -112,7 +99,6 @@
<string name="log_smilies">Smileys</string>
<string name="log_image">Bild</string>
<string name="log_image_attach">Lägg till bild</string>
- <string name="log_image_edit">Redigera bild</string>
<string name="log_image_stored">Från fil</string>
<string name="log_image_camera">Ny</string>
<string name="log_image_caption">Bildtext</string>
@@ -121,6 +107,13 @@
<string name="log_password_title">Logglösenord:</string>
<string name="log_hint_log_password">Ange ditt lösenord för loggning</string>
<string name="log_oc_team_comment">Meddelande från OC Team</string>
+ <string-array name="log_image_scales">
+ <item>Ingen skalning</item>
+ <item>512 px</item>
+ <item>640 px</item>
+ <item>800 px</item>
+ <item>1024 px</item>
+ </string-array>
<string name="translate_to_sys_lang">Översätt till %s</string>
<string name="translate_to_english">Översätt till engelska</string>
<string name="translate_length_warning">Översättningen kan misslyckas med långa texter.</string>
@@ -213,6 +206,7 @@
<string name="info_select_logimage_cancelled">Val av bild avbröts.</string>
<string name="info_stored_image">Ny bild sparad som:</string>
<string name="info_storing_static_maps">Försöker ladda ner statiska kartor</string>
+ <string name="info_cache_saved">Cachen har lagrats lokalt</string>
<string name="loc_last">Senast kända</string>
<string name="loc_net">Nätverk</string>
<string name="loc_gps">GPS</string>
@@ -220,6 +214,7 @@
<string name="loc_trying">Försöker hitta plats</string>
<string name="loc_no_addr">Okänd adress</string>
<string name="loc_gps_disabled">GPS avstängd</string>
+ <string name="menu_centerposition">Centrera på min plats</string>
<string name="menu_about">Om c:geo</string>
<string name="menu_helpers">Tilläggsprogram</string>
<string name="menu_settings">Inställningar</string>
@@ -241,12 +236,15 @@
<string name="caches_more_caches_currently">nu</string>
<string name="caches_downloading">Laddar ner cacher…\nTid kvar: </string>
<string name="caches_eta_ltm">mindre än en minut</string>
+ <plurals name="caches_eta_mins">
+ <item quantity="one">%d minut</item>
+ <item quantity="other">%d minuter</item>
+ </plurals>
<string name="caches_store_offline">Spara för Offline</string>
<string name="caches_store_selected">Spara valda</string>
<string name="caches_history">Senast hittade cacher</string>
<string name="caches_on_map">Visa på karta</string>
<string name="caches_sort">Sortering</string>
- <string name="caches_sort_title">Sortera efter</string>
<string name="caches_sort_distance">Avstånd</string>
<string name="caches_sort_difficulty">Svårighet</string>
<string name="caches_sort_terrain">Terräng</string>
@@ -268,13 +266,11 @@
<string name="caches_select_invert">Invertera valda</string>
<string name="caches_nearby">Nära</string>
<string name="caches_manage">Hantera</string>
- <string name="caches_drop_selected">Ta bort valda</string>
- <string name="caches_drop_selected_ask">Vill du ta bort valda cacher från enheten?</string>
- <string name="caches_drop_all">Ta bort alla</string>
- <string name="caches_drop_all_ask">Vill du ta bort alla cacher från enheten?</string>
- <string name="caches_drop_stored">Ta bort sparade</string>
- <string name="caches_drop_progress">Tar bort cacher</string>
- <string name="caches_drop_all_and_list">Ta bort listan och dess cacher</string>
+ <string name="caches_remove_all">Ta bort alla</string>
+ <string name="caches_remove_all_confirm">Vill du ta bort alla %s cacher från denna lista?</string>
+ <string name="caches_remove_selected">Ta bort valda</string>
+ <string name="caches_remove_selected_confirm">Vill du ta bort de %s markerade cacherna från enheten?</string>
+ <string name="caches_remove_progress">Tar bort cacher</string>
<string name="caches_delete_events">Ta bort gamla event</string>
<string name="caches_refresh_selected">Uppdatera valda</string>
<string name="caches_refresh_all">Uppdatera alla</string>
@@ -301,11 +297,10 @@
<string name="caches_removing_from_history">Tar bort från historik…</string>
<string name="caches_clear_offlinelogs">Rensa offline loggar</string>
<string name="caches_clear_offlinelogs_progress">Rensar offline loggar</string>
- <string name="list_menu">Listor</string>
<string name="list_menu_create">Skapa en ny lista</string>
<string name="list_menu_drop">Ta bort den här listan</string>
- <string name="list_menu_change">Byt lista</string>
<string name="list_menu_rename">Byt namn på den här listan</string>
+ <string name="list_menu_import">Importera</string>
<string name="list_title">Välj en lista</string>
<string name="list_inbox">Sparade</string>
<string name="list_all_lists">Alla cacher</string>
@@ -355,7 +350,7 @@
<string name="settings_activate_ox">Aktivera</string>
<string name="settings_gc_legal_note">Genom att använda tjänster hos geocaching.com godkänner du Groundspeaks användarvillkor.</string>
<string name="settings_info_facebook_login_title">Facebook inloggning</string>
- <string name="settings_info_facebook_login">c:geo kan inte logga inte logga in på geocaching.com med ditt Facebook konto. Men det finns en enkel lösning …</string>
+ <string name="settings_info_facebook_login">c:geo kan inte logga inte logga in på geocaching.com med ditt Facebook konto. Men det finns en enkel lösning…</string>
<string name="settings_authorize">Tillåt c:geo</string>
<string name="settings_reauthorize">Tillåt c:geo igen</string>
<string name="init_oc">Opencaching.de</string>
@@ -373,6 +368,9 @@
<string name="init_oc_ro">Opencaching.ro</string>
<string name="settings_activate_oc_ro">Aktivera</string>
<string name="init_oc_ro_description">Använd c:geo med opencaching.ro för att söka efter cacher samt för att filtrera dina funna cacher.</string>
+ <string name="init_oc_uk">Opencaching.org.uk</string>
+ <string name="settings_activate_oc_uk">Aktivera</string>
+ <string name="init_oc_uk_description">Använd c:geo med opencaching.org.uk för att söka efter cacher samt för att filtrera dina funna cacher.</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="settings_activate_twitter">Aktivera</string>
@@ -402,8 +400,8 @@
<string name="init_signature_template_log">Loggtext</string>
<string name="init_ratingwanted">GCvote.com</string>
<string name="init_summary_ratingwanted">Ladda cache betyg från GCvote.com</string>
- <string name="init_friendlogswanted">Vänners loggar</string>
- <string name="init_summary_friendlogswanted">Ladda extra sida med loggbok för dina vänner</string>
+ <string name="init_friends_and_own_logs_wanted">Visa vänners/egna</string>
+ <string name="init_summary_friends_and_own_logs_wanted">Visa en extra loggbok med dina vänners och egna loggar</string>
<string name="init_openlastdetailspage">Visning av cachedetaljer</string>
<string name="init_summary_openlastdetailspage">Visa senaste använda delsidan när detaljer öppnas</string>
<string name="init_autoload">Cachebeskrivning</string>
@@ -492,6 +490,9 @@
<string name="init_maintenance">Underhåll</string>
<string name="init_maintenance_directories_note">c:geo lagrar bilder, loggbilder och andra filer relaterade till en cache i en separat katalog. I vissa fall (som vid importering/exportering av databasen) kan denna katalog innehålla inaktuella filer, som kan tas bort här.</string>
<string name="init_maintenance_directories">Ta bort överblivna filer</string>
+ <string name="init_create_memory_dump">Skapa minnesdump</string>
+ <string name="init_memory_dump">Minnesdump</string>
+ <string name="init_memory_dumped">Minnet sparat till %s</string>
<string name="settings_open_website">Öppna hemsida</string>
<string name="settings_settings">Inställningar</string>
<string name="settings_information">Information</string>
@@ -541,7 +542,12 @@
<string name="auth_ocnl">opencaching.nl</string>
<string name="auth_ocus">opencaching.us</string>
<string name="auth_ocro">opencaching.ro</string>
+ <string name="auth_ocuk">opencaching.org.uk</string>
<string name="auth_dialog_completed_oc">c:geo är nu godkänd för att kommunicera med %s.</string>
+ <plurals name="cache_counts">
+ <item quantity="one">En cache</item>
+ <item quantity="other">%1$d cacher</item>
+ </plurals>
<string name="cache_offline">Offline</string>
<string name="cache_offline_refresh">Uppdatera</string>
<string name="cache_offline_drop">Radera</string>
@@ -557,7 +563,6 @@
<string name="cache_premium">Premium</string>
<string name="cache_attributes">Attribut</string>
<string name="cache_inventory">Innehåll</string>
- <string name="cache_log_offline">Offline logg</string>
<string name="cache_log_images_title">Loggbild</string>
<string name="cache_log_image_default_title">Foto</string>
<string name="cache_personal_note">Personlig anteckning</string>
@@ -568,8 +573,6 @@
<string name="cache_personal_note_uploading">Laddar upp personlig anteckning</string>
<string name="cache_personal_note_upload_done">Den personliga anteckning har laddats upp</string>
<string name="cache_personal_note_upload_cancelled">Uppladdningen av personliga anteckning avbruten</string>
- <string name="cache_personal_note_unstored">Cachen ej sparad</string>
- <string name="cache_personal_note_store">Cachen kommer att sparas först för att kunna hantera personlig anteckning.</string>
<string name="cache_description">Beskrivning</string>
<string name="cache_description_long">Lång beskrivning</string>
<string name="cache_description_table_note">Beskrivningen innehåller tabellformatering som eventuellt behöver läsas på %s för att se korrekt ut.</string>
@@ -586,10 +589,14 @@
<string name="cache_list_unknown">Ej i någon lista</string>
<string name="cache_images">Bilder</string>
<string name="cache_waypoints">Punkter</string>
+ <plurals name="waypoints">
+ <item quantity="one">1 Punkt</item>
+ <item quantity="other">%d Punkter</item>
+ </plurals>
<string name="cache_waypoints_add">Lägg till punkt</string>
<string name="cache_hint">Tips</string>
<string name="cache_logs">Loggbok</string>
- <string name="cache_logsfriends">Loggbok (Vänner)</string>
+ <string name="cache_logs_friends_and_own">Vänners/egna loggar</string>
<string name="cache_dialog_loading_details">Laddar detaljer om cachen…</string>
<string name="cache_dialog_loading_details_status_loadpage">Hämtar från gc.com</string>
<string name="cache_dialog_loading_details_status_details">Analyserar cacheinformation</string>
@@ -635,15 +642,14 @@
<string name="cache_menu_refresh">Uppdatera</string>
<string name="cache_menu_share">Skicka länk</string>
<string name="cache_menu_move_list">Flytta till annan lista</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">Cache Beacon</string>
<string name="cache_menu_navigon">Navigon</string>
<string name="cache_menu_pebble">Pebble</string>
<string name="cache_status">Status</string>
<string name="cache_status_offline_log">Sparad logg</string>
<string name="cache_status_found">Hittad</string>
+ <string name="cache_not_status_found">Ej hittad</string>
<string name="cache_status_archived">Arkiverad</string>
<string name="cache_status_disabled">Inaktiverad</string>
<string name="cache_status_premium">Enbart för Premium medlemmar</string>
@@ -755,10 +761,7 @@
<string name="map_view_map">Karttyp</string>
<string name="map_modes">Kartlägen</string>
<string name="map_trail_show">Visa spår</string>
- <string name="map_trail_hide">Dölj spår</string>
<string name="map_circles_show">Visa cirklar</string>
- <string name="map_circles_hide">Dölj cirklar</string>
- <string name="map_mycaches_show">Visa egna/funna cacher</string>
<string name="map_mycaches_hide">Dölj egna/funna cacher</string>
<string name="map_theme_builtin">Standard</string>
<string name="map_theme_select">Välj karttema</string>
@@ -838,10 +841,10 @@
<string name="user_menu_open_contact">Öppna kontakt</string>
<string name="navigation">Navigering</string>
<string name="compass_title">Kompass</string>
+ <string name="compass_sensors">Aktiva sensorer</string>
<string name="use_gps">Använd enbart GPS</string>
<string name="use_compass">Använd GPS och kompass</string>
<string name="destination_select">Välj målpunkt</string>
- <string name="destination_set">Sätt målpunkt</string>
<string name="navigation_direct_navigation">Direkt navigering</string>
<string name="navigation_target">Mål</string>
<string name="err_nav_no_coordinates">Kan inte starta navigering utan koordinater</string>
@@ -1112,7 +1115,6 @@
<string name="website">Hemsida: <a href="">cgeo.org</a></string>
<string name="facebook">Facebook: <a href="">c:geo</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Manual: <a href="">c:geo in a Nutshell</a></string>
<string name="market">Android: <a href="">c:geo på Google Play</a></string>
<string name="about_twitter">Ska <b>c:geo</b> publicera ny status på Twitter varje gång en cache loggas?</string>
<string name="faq">FAQ: <a href="">faq.cgeo.org</a></string>
@@ -1128,52 +1130,34 @@
<string name="tts_stop">Stoppa tal</string>
<string name="err_tts_lang_not_supported">Detta språk hanteras inte av text-to-speech.</string>
<string name="tts_one_kilometer">en kilometer</string>
- <string name="tts_one_meter">en meter</string>
- <string name="tts_one_mile">en engelsk mil</string>
- <string name="tts_one_foot">en fot</string>
- <string name="tts_one_oclock">Klockan ett</string>
- <string name="tts_oclock">Klockan %s</string>
- <string name="clipboard_copy_ok">Kopierat till urklipp</string>
- <string name="percent_favorite_points">%\ favoriter</string>
- <string name="cgeo_shortcut">c:geo genväg</string>
- <string name="create_shortcut">Skapa genväg</string>
- <string-array name="log_image_scales">
- <item>Ingen skalning</item>
- <item>512 px</item>
- <item>640 px</item>
- <item>800 px</item>
- <item>1024 px</item>
- </string-array>
- <plurals name="caches_eta_mins">
- <item quantity="one">minut</item>
- <item quantity="other">minuter</item>
- </plurals>
- <plurals name="cache_counts">
- <item quantity="one">En cache</item>
- <item quantity="other">%1$d cacher</item>
- </plurals>
- <plurals name="waypoints">
- <item quantity="one">1 Punkt</item>
- <item quantity="other">%d Punkter</item>
- </plurals>
<plurals name="tts_kilometers">
<item quantity="one">%s kilometer</item>
<item quantity="other">%s kilometer</item>
</plurals>
+ <string name="tts_one_meter">en meter</string>
<plurals name="tts_meters">
<item quantity="one">%s meter</item>
<item quantity="other">%s meter</item>
</plurals>
+ <string name="tts_one_mile">en engelsk mil</string>
<plurals name="tts_miles">
<item quantity="one">%s engelsk mil</item>
<item quantity="other">%s engelsk mil</item>
</plurals>
+ <string name="tts_one_foot">en fot</string>
<plurals name="tts_feet">
<item quantity="one">%s fot</item>
<item quantity="other">%s fot</item>
</plurals>
+ <string name="tts_one_oclock">Klockan ett</string>
+ <string name="tts_oclock">Klockan %s</string>
+ <string name="clipboard_copy_ok">Kopierat till urklipp</string>
<plurals name="days_ago">
<item quantity="one">igår</item>
<item quantity="other">%d dagar sedan</item>
</plurals>
+ <string name="percent_favorite_points">%\ favoriter</string>
+ <string name="cgeo_shortcut">c:geo genväg</string>
+ <string name="create_shortcut">Skapa genväg</string>
+ <string name="send">Skicka</string>
</resources>
diff --git a/main/res/values-v11/themes.xml b/main/res/values-v11/themes.xml
new file mode 100644
index 0000000..585f669
--- /dev/null
+++ b/main/res/values-v11/themes.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <!-- Holo Style is only available for ICS+ -->
+
+ <style name="cgeo.Widget.AppCompat.Base.ProgressBar.Medium" parent="android:Widget.Holo.ProgressBar">
+ <item name="android:minWidth">32dip</item>
+ <item name="android:maxWidth">32dip</item>
+ <item name="android:minHeight">32dip</item>
+ <item name="android:maxHeight">32dip</item>
+ </style>
+
+ <style name="cgeo_light" parent="cgeo.base.light">
+ <item name="actionBarStyle">@style/cgeo.ActionBarStyle.Light.Inverse</item>
+ <item name="android:actionBarStyle" >@style/cgeo.ActionBarStyle.Light.Inverse</item>
+ </style>
+
+ <style name="cgeo" parent="cgeo.base">
+ <item name="android:actionBarStyle">@style/cgeo.ActionBarStyle</item>
+ </style>
+
+
+</resources> \ No newline at end of file
diff --git a/main/res/values/attrs.xml b/main/res/values/attrs.xml
index ab1db9f..d4050c9 100644
--- a/main/res/values/attrs.xml
+++ b/main/res/values/attrs.xml
@@ -24,9 +24,6 @@
<attr name="input" format="integer" />
<attr name="inventory" format="integer" />
<attr name="favorite" format="integer" />
- <attr name="favorite_r" format="integer" />
- <attr name="favorite_o" format="integer" />
- <attr name="favorite_g" format="integer" />
<attr name="close" format="integer" />
<attr name="log_img_icon" format="integer" />
<attr name="actionbar_compass" format="integer" />
@@ -42,7 +39,6 @@
<!-- attributes for custom made preferences -->
- <attr name="title" format="string" />
<attr name="text" format="string" />
<attr name="url" format="string" />
<attr name="urlButton" format="string" />
diff --git a/main/res/values/changelog_master.xml b/main/res/values/changelog_master.xml
index 1e3c3d4..a188528 100644
--- a/main/res/values/changelog_master.xml
+++ b/main/res/values/changelog_master.xml
@@ -2,5 +2,36 @@
<resources>
<!-- changelog for the master branch -->
<string name="changelog_master" translatable="false">
+ <b>Next feature release:</b>\n
+ · New: Actionbar menus (<b>long press action buttons for a description</b>)\n
+ · New: Show also own logs on friends log page\n
+ · New: Navigate - WhereYouGo will invoke automatic cartridge download in WhereYouGo\n
+ · New: Filter for caches which are not found\n
+ · New: Show "Import from web" also if not yet registered\n
+ · New: Popup list of changes on first start after upgrade\n
+ · New: Android Beam (NFC Sharing)\n
+ · New: Debugging option to save memory dumps on user demand\n
+ · New: Load Greokrety inventory for OC caches\n
+ · New: Autosave caches if user modifies waypoints\n
+ · New: Show recently viewed caches when clicking search icon on main screen\n
+ · New: Add support for opencaching.org.uk\n
+ · New: Improved sorting of waypoints depending on waypoint category\n
+ · New: Have a link to \"related webpage\" in cache details\n
+ · Fix: Hiding own caches on opencaching\n
+ · Fix: Webcam caches not marked as found after posting log\n
+ · Fix: Archived caches now also hidden if hiding disabled caches is active\n
+ · Fix: Filter invalid characters in GPX files\n
+ · Fix: All caches shown as owned if no username stored\n
+ · Fix: GPX import from mail failing on some devices\n
+ · Fix: Updating cache history should not ask for list to save caches\n
+ · Fix: Speed now always shown in km or miles per hour\n
+ · Fix: USER template now shows the correct username for the site where the cache is hosted\n
+ · Fix: Keep filter active if user switches the list\n
+ · Fix: Cache names with special chars not shown\n
+ · Fix: Improve static maps resolution and scaling depending on the screen resolution\n
+ · Fix: Will attend logs not counted in log summary of OC caches\n
+ · Fix: Improved loading of listing images\n
+ \n
+ \n
</string>
</resources>
diff --git a/main/res/values/dimens.xml b/main/res/values/dimens.xml
index ab09412..9ef3b56 100644
--- a/main/res/values/dimens.xml
+++ b/main/res/values/dimens.xml
@@ -5,8 +5,4 @@
<dimen name="actionbar_separator_height">37dip</dimen>
<dimen name="actionbar_separator_width">2dip</dimen>
- <!-- Dimensions for Samsung Multi-Window support -->
- <dimen name="app_defaultsize_w">632.0dip</dimen>
- <dimen name="app_defaultsize_h">598.0dip</dimen>
-
</resources> \ No newline at end of file
diff --git a/main/res/values/preference_keys.xml b/main/res/values/preference_keys.xml
index 6036be3..72d7c61 100644
--- a/main/res/values/preference_keys.xml
+++ b/main/res/values/preference_keys.xml
@@ -15,15 +15,19 @@
<string name="preference_screen_ocnl">preference_screen_ocnl</string>
<string name="preference_screen_ocus">preference_screen_ocus</string>
<string name="preference_screen_ocro">preference_screen_ocro</string>
+ <string name="preference_screen_ocuk">preference_screen_ocuk</string>
<string name="preference_screen_ec">preference_screen_ec</string>
<string name="preference_screen_ox">preference_screen_ox</string>
<string name="preference_screen_twitter">preference_screen_twitter</string>
<string name="preference_screen_navigation_menu">fakekey_navigation_menu_screen</string>
+ <string name="preference_screen_sendtocgeo">preference_screen_sendtocgeo</string>
+ <string name="preference_screen_gcvote">preference_screen_gcvote</string>
<string name="pref_fakekey_ocde_authorization">fakekey_ocde_authorization</string>
<string name="pref_fakekey_ocpl_authorization">fakekey_ocpl_authorization</string>
<string name="pref_fakekey_ocnl_authorization">fakekey_ocnl_authorization</string>
<string name="pref_fakekey_ocus_authorization">fakekey_ocus_authorization</string>
<string name="pref_fakekey_ocro_authorization">fakekey_ocro_authorization</string>
+ <string name="pref_fakekey_ocuk_authorization">fakekey_ocuk_authorization</string>
<string name="pref_fakekey_twitter_authorization">fakekey_twitter_authorization</string>
<string name="pref_connectorGCActive">connectorGCActive</string>
<string name="pref_username">username</string>
@@ -33,6 +37,7 @@
<string name="pref_connectorOCNLActive">connectorOCNLActive</string>
<string name="pref_connectorOCUSActive">connectorOCUSActive</string>
<string name="pref_connectorOCROActive">connectorOCROActive</string>
+ <string name="pref_connectorOCUKActive">connectorOCUKActive</string>
<string name="pref_ecusername">ecusername</string>
<string name="pref_ecpassword">ecpassword</string>
<string name="pref_connectorECActive">connectorECActive</string>
@@ -133,8 +138,6 @@
<string name="pref_navigation_menu_google_walk">navigationGoogleWalk</string>
<string name="pref_navigation_menu_google_bike">navigationGoogleBike</string>
<string name="pref_navigation_menu_google_maps_directions">navigationMapsDirections</string>
- <string name="pref_navigation_menu_cache_beacon">navigationCacheBeacon</string>
- <string name="pref_navigation_menu_gcc">navigationGcc</string>
<string name="pref_navigation_menu_where_you_go">navigationWhereYouGo</string>
<string name="pref_navigation_menu_pebble">navigationPebble</string>
<string name="pref_navigation_menu_mapswithme">navigationMapsWithMe</string>
@@ -154,12 +157,17 @@
<string name="pref_ocro_tokenpublic">ocro_tokenpublic</string>
<string name="pref_temp_ocro_token_secret">ocro-temp-token-secret</string>
<string name="pref_temp_ocro_token_public">ocro-temp-token-public</string>
+ <string name="pref_ocuk_tokensecret">ocuk_tokensecret</string>
+ <string name="pref_ocuk_tokenpublic">ocuk_tokenpublic</string>
+ <string name="pref_temp_ocuk_token_secret">ocuk-temp-token-secret</string>
+ <string name="pref_temp_ocuk_token_public">ocuk-temp-token-public</string>
<string name="pref_fakekey_gc_website">fakekey_gc_website</string>
<string name="pref_fakekey_ocde_website">fakekey_ocde_website</string>
<string name="pref_fakekey_ocpl_website">fakekey_ocpl_website</string>
<string name="pref_fakekey_ocnl_website">fakekey_ocnl_website</string>
<string name="pref_fakekey_ocus_website">fakekey_ocus_website</string>
<string name="pref_fakekey_ocro_website">fakekey_ocro_website</string>
+ <string name="pref_fakekey_ocuk_website">fakekey_ocuk_website</string>
<string name="pref_fakekey_ec_website">fakekey_ec_website</string>
<string name="pref_fakekey_ox_website">fakekey_ox_website</string>
<string name="pref_fakekey_gcvote_website">fakekey_gcvote_website</string>
@@ -167,5 +175,8 @@
<string name="pref_twitter_cache_message">twitter_cache_message</string>
<string name="pref_twitter_trackable_message">twitter_trackable_message</string>
<string name="pref_ec_icons">ec_icons</string>
-
-</resources> \ No newline at end of file
+ <string name="pref_memory_dump">memory_dump</string>
+ <string name="pref_appearance">pref_appearance</string>
+ <string name="pref_changelog_last_checksum">changelog_last_checksum</string>
+ <string name="pref_caches_history">caches_history</string>
+</resources>
diff --git a/main/res/values/strings.xml b/main/res/values/strings.xml
index 2aa3d00..ade4bf6 100644
--- a/main/res/values/strings.xml
+++ b/main/res/values/strings.xml
@@ -13,7 +13,6 @@
<string name="longitude">Longitude</string>
<!-- actionbar -->
- <string name="action_bar_share_title">Share link to cache</string>
<string name="settings_titlebar">c:geo Settings</string>
<!-- caches -->
@@ -91,22 +90,9 @@
<string name="log_saving">Sending log…</string>
<string name="log_saving_and_uploading">Sending log and uploading image…</string>
<string name="log_clear">Clear</string>
- <string name="log_post">Submit Log</string>
- <string name="log_post_rate">Submit Log &amp; Rate</string>
- <string name="log_post_no_rate">Submit Log &amp; Do not Rate</string>
<string name="log_post_not_possible">Loading Log Page…</string>
<string name="log_add">Add</string>
- <string name="log_rating">Rating</string>
<string name="log_no_rating">No rating</string>
- <string name="log_stars_1">1 Star</string>
- <string name="log_stars_15">1.5 Stars</string>
- <string name="log_stars_2">2 Stars</string>
- <string name="log_stars_25">2.5 Stars</string>
- <string name="log_stars_3">3 Stars</string>
- <string name="log_stars_35">3.5 Stars</string>
- <string name="log_stars_4">4 Stars</string>
- <string name="log_stars_45">4.5 Stars</string>
- <string name="log_stars_5">5 Stars</string>
<string name="log_stars_1_description">Poor</string>
<string name="log_stars_15_description">Fairly poor</string>
<string name="log_stars_2_description">Below average</string>
@@ -125,7 +111,6 @@
<string name="log_smilies">Smilies</string>
<string name="log_image">Image</string>
<string name="log_image_attach">Attach Image</string>
- <string name="log_image_edit">Edit Image</string>
<string name="log_image_stored">Existing</string>
<string name="log_image_camera">New</string>
<string name="log_image_caption">Caption</string>
@@ -238,6 +223,7 @@
<string name="info_select_logimage_cancelled">Image selection or capture was cancelled.</string>
<string name="info_stored_image">New image saved to:</string>
<string name="info_storing_static_maps">Trying to store static maps</string>
+ <string name="info_cache_saved">The cache has been stored locally</string>
<!-- location service -->
<string name="loc_last">Last known</string>
@@ -247,6 +233,8 @@
<string name="loc_trying">Trying to Locate</string>
<string name="loc_no_addr">Unknown address</string>
<string name="loc_gps_disabled">GPS disabled</string>
+ <string name="menu_centerposition">Center on my position</string>
+
<!-- standard menu -->
<string name="menu_about">About c:geo</string>
@@ -276,8 +264,8 @@
<string name="caches_eta_ltm">Less than a minute</string>
<plurals name="caches_eta_mins">
- <item quantity="one">minute</item>
- <item quantity="other">minutes</item>
+ <item quantity="one">%d minute</item>
+ <item quantity="other">%d minutes</item>
</plurals>
<string name="caches_store_offline">Store Offline</string>
@@ -285,7 +273,6 @@
<string name="caches_history">History</string>
<string name="caches_on_map">Show on map</string>
<string name="caches_sort">Sort</string>
- <string name="caches_sort_title">Sort by</string>
<string name="caches_sort_distance">Distance</string>
<string name="caches_sort_difficulty">Difficulty</string>
<string name="caches_sort_terrain">Terrain</string>
@@ -307,13 +294,11 @@
<string name="caches_select_invert">Invert selection</string>
<string name="caches_nearby">Nearby</string>
<string name="caches_manage">Manage</string>
- <string name="caches_drop_selected">Drop selected</string>
- <string name="caches_drop_selected_ask">Do you want to remove the selected caches from your device?</string>
- <string name="caches_drop_all">Drop all</string>
- <string name="caches_drop_all_ask">Do you want to remove all caches from current list?</string>
- <string name="caches_drop_stored">Drop stored</string>
- <string name="caches_drop_progress">Removing caches</string>
- <string name="caches_drop_all_and_list">Drop all and remove list</string>
+ <string name="caches_remove_all">Remove all</string>
+ <string name="caches_remove_all_confirm">Do you want to remove all %s caches from current list?</string>
+ <string name="caches_remove_selected">Remove selected</string>
+ <string name="caches_remove_selected_confirm">Do you want to remove the selected %s caches from your device?</string>
+ <string name="caches_remove_progress">Removing caches</string>
<string name="caches_delete_events">Delete past events</string>
<string name="caches_refresh_selected">Refresh selected</string>
<string name="caches_refresh_all">Refresh all</string>
@@ -321,7 +306,6 @@
<string name="caches_move_all">Move all</string>
<string name="caches_map_locus">Locus</string>
<string name="caches_map_locus_export">Export to Locus</string>
- <string name="caches_map_mapswithme">MapsWithMe</string>
<string name="caches_recaptcha_title">reCAPTCHA</string>
<string name="caches_recaptcha_explanation">Please enter the text you see in the image. This enables downloading of cache coordinates, which can be disabled in Settings.</string>
<string name="caches_recaptcha_hint">Text from image</string>
@@ -343,11 +327,10 @@
<string name="caches_clear_offlinelogs_progress">Clearing offline logs</string>
<!-- caches lists -->
- <string name="list_menu">List</string>
<string name="list_menu_create">Create new list</string>
<string name="list_menu_drop">Drop current list</string>
- <string name="list_menu_change">Change list</string>
<string name="list_menu_rename">Rename current list</string>
+ <string name="list_menu_import">Import</string>
<string name="list_title">Pick a list</string>
<string name="list_inbox">Stored</string>
<string name="list_all_lists">All caches</string>
@@ -404,7 +387,7 @@
<string name="settings_activate_ox">Activate</string>
<string name="settings_gc_legal_note">With using the service of geocaching.com, you accept the Groundspeak Terms of Use.</string>
<string name="settings_info_facebook_login_title">Facebook Login</string>
- <string name="settings_info_facebook_login">You can\'t make c:geo login to geocaching.com with your Facebook account. But there is a simple workaround …</string>
+ <string name="settings_info_facebook_login">You can\'t make c:geo login to geocaching.com with your Facebook account. But there is a simple workaround…</string>
<string name="settings_authorize">Authorize c:geo</string>
<string name="settings_reauthorize">Authorize c:geo again</string>
<string name="init_oc">Opencaching.de</string>
@@ -422,6 +405,9 @@
<string name="init_oc_ro">Opencaching.ro</string>
<string name="settings_activate_oc_ro">Activate</string>
<string name="init_oc_ro_description">Authorize c:geo with opencaching.ro to search for caches and access/filter your found caches.</string>
+ <string name="init_oc_uk">Opencaching.org.uk</string>
+ <string name="settings_activate_oc_uk">Activate</string>
+ <string name="init_oc_uk_description">Authorize c:geo with opencaching.org.uk to search for caches and access/filter your found caches.</string>
<string name="init_gcvote">GCvote.com</string>
<string name="init_twitter">Twitter</string>
<string name="settings_activate_twitter">Activate</string>
@@ -451,8 +437,8 @@
<string name="init_signature_template_log">Log text</string>
<string name="init_ratingwanted">GCvote Rating</string>
<string name="init_summary_ratingwanted">Load cache rating from GCvote.com</string>
- <string name="init_friendlogswanted">Show Friends\' Logs</string>
- <string name="init_summary_friendlogswanted">Display additional logbook page for logs from friends</string>
+ <string name="init_friends_and_own_logs_wanted">Show Friends\'/Own</string>
+ <string name="init_summary_friends_and_own_logs_wanted">Display additional logbook page for friends\' and own logs</string>
<string name="init_openlastdetailspage">Last Details Page</string>
<string name="init_summary_openlastdetailspage">Open details with last used page</string>
<string name="init_autoload">Long Description</string>
@@ -480,7 +466,7 @@
<string name="init_units">Use Imperial Units</string>
<string name="init_summary_units">Use Imperial Units instead of Metric Units</string>
<string name="init_log_offline">Offline Logging</string>
- <string name="init_summary_log_offline">Enable Offline Logging (Wont\'t show online log screen when logging, won\'t upload logs)</string>
+ <string name="init_summary_log_offline">Enable Offline Logging (Won\'t show online log screen when logging, won\'t upload logs)</string>
<string name="init_choose_list">Ask for List</string>
<string name="init_summary_choose_list">Ask which list to store caches in</string>
<string name="init_livelist">Show Direction</string>
@@ -541,6 +527,9 @@
<string name="init_maintenance">Maintenance</string>
<string name="init_maintenance_directories_note">c:geo stores images, log images and other files related to a cache in a separate directory. In some cases (like importing/exporting the database) this directory may contain outdated files, which can be deleted here.</string>
<string name="init_maintenance_directories">Delete orphaned files</string>
+ <string name="init_create_memory_dump">Create memory dump</string>
+ <string name="init_memory_dump">Memory dump</string>
+ <string name="init_memory_dumped">Memory dumped to %s</string>
<string name="settings_open_website">Open website</string>
<string name="settings_settings">Settings</string>
<string name="settings_information">Information</string>
@@ -598,6 +587,7 @@
<string name="auth_ocnl">opencaching.nl</string>
<string name="auth_ocus">opencaching.us</string>
<string name="auth_ocro">opencaching.ro</string>
+ <string name="auth_ocuk">opencaching.org.uk</string>
<string name="auth_dialog_completed_oc">c:geo is now authorized to interact with %s.</string>
<!-- cache -->
@@ -621,7 +611,6 @@
<string name="cache_premium">Premium</string>
<string name="cache_attributes">Attributes</string>
<string name="cache_inventory">Inventory</string>
- <string name="cache_log_offline">Offline Log</string>
<string name="cache_log_images_title">Log images</string>
<string name="cache_log_image_default_title">Photo</string>
<string name="cache_personal_note">Personal note</string>
@@ -632,8 +621,6 @@
<string name="cache_personal_note_uploading">Uploading personal note</string>
<string name="cache_personal_note_upload_done">Personal note uploaded</string>
<string name="cache_personal_note_upload_cancelled">Personal note upload cancelled</string>
- <string name="cache_personal_note_unstored">Cache not stored</string>
- <string name="cache_personal_note_store">The cache will be stored first to allow a personal note.</string>
<string name="cache_description">Description</string>
<string name="cache_description_long">Long Description</string>
<string name="cache_description_table_note">Description contains table formatting which may need to be viewed at %s to be seen correctly.</string>
@@ -659,7 +646,7 @@
<string name="cache_waypoints_add">Add Waypoint</string>
<string name="cache_hint">Hint</string>
<string name="cache_logs">Logbook</string>
- <string name="cache_logsfriends">Logbook (Friends)</string>
+ <string name="cache_logs_friends_and_own">Friends/Own Logs</string>
<string name="cache_dialog_loading_details">Loading cache details…</string>
<string name="cache_dialog_loading_details_status_loadpage">Loading page</string>
<string name="cache_dialog_loading_details_status_details">Processing details</string>
@@ -705,16 +692,14 @@
<string name="cache_menu_refresh">Refresh</string>
<string name="cache_menu_share">Share cache</string>
<string name="cache_menu_move_list">Move to different list</string>
- <string name="cache_menu_gcc">GCC</string>
<string name="cache_menu_whereyougo">WhereYouGo</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
- <string name="cache_menu_cachebeacon">Cache Beacon</string>
<string name="cache_menu_navigon">Navigon</string>
<string name="cache_menu_pebble">Pebble</string>
- <string name="cache_menu_mapswithme">MapsWithMe</string>
<string name="cache_status">Status</string>
<string name="cache_status_offline_log">Saved Log</string>
<string name="cache_status_found">Found</string>
+ <string name="cache_not_status_found">Not Found</string>
<string name="cache_status_archived">Archived</string>
<string name="cache_status_disabled">Disabled</string>
<string name="cache_status_premium">Premium Members only</string>
@@ -847,10 +832,7 @@
<string name="map_view_map">Map view</string>
<string name="map_modes">Map settings</string>
<string name="map_trail_show">Show trail</string>
- <string name="map_trail_hide">Hide trail</string>
<string name="map_circles_show">Show circles</string>
- <string name="map_circles_hide">Hide circles</string>
- <string name="map_mycaches_show">Show own/found caches</string>
<string name="map_mycaches_hide">Hide own/found caches</string>
<string name="map_theme_builtin">Default</string>
<string name="map_theme_select">Select map theme</string>
@@ -939,10 +921,10 @@
<!-- navigation -->
<string name="navigation">Navigation</string>
<string name="compass_title">Compass</string>
+ <string name="compass_sensors">Active Sensors</string>
<string name="use_gps">Use GPS only</string>
<string name="use_compass">Use GPS and Compass</string>
<string name="destination_select">Select destination</string>
- <string name="destination_set">Set destination</string>
<string name="navigation_direct_navigation">Direct Navigation</string>
<string name="navigation_target">Target</string>
<string name="err_nav_no_coordinates">Cannot start navigation with no coordinates</string>
@@ -1226,7 +1208,6 @@
<string name="website">Website: <a href="">cgeo.org</a></string>
<string name="facebook">Facebook: <a href="">c:geo page</a></string>
<string name="twitter">Twitter: <a href="">@android_GC</a></string>
- <string name="nutshellmanual">Manual: <a href="">c:geo in a Nutshell</a></string>
<string name="market">Android: <a href="">c:geo on Google Play</a></string>
<string name="about_twitter">Should <b>c:geo</b> publish a new status on Twitter every time you log a cache?</string>
<string name="faq">FAQ: <a href="">faq.cgeo.org</a></string>
@@ -1285,4 +1266,6 @@
<!-- shortcuts -->
<string name="cgeo_shortcut">c:geo shortcut</string>
<string name="create_shortcut">Create shortcut</string>
+ <string name="send">Send</string>
+
</resources>
diff --git a/main/res/values/strings_not_translatable.xml b/main/res/values/strings_not_translatable.xml
index 026c724..3adaa1b 100644
--- a/main/res/values/strings_not_translatable.xml
+++ b/main/res/values/strings_not_translatable.xml
@@ -43,51 +43,33 @@
<string name="contributors" translatable="false">
· <a href="http://carnero.cc/">carnero</a> as the father of c:geo\n
\n
- · 0xErnie (localization DE)\n
- · <a href="mailto:bazsy@freemail.hu">Balazs Szabo (Bazsy1983)</a> (loc. HU)\n
- · Bananeweizen (code, loc. DE)\n
- · blafoo (code, localization DE)\n
- · Bonemaro (tester)\n
- · BudBundi (localization DE, tester)\n
+ · Bananeweizen (code)\n
+ · blafoo (code)\n
· campbeb (code)\n
- · Charles (localization FR)\n
- · Denny (localization DA)\n
· Eisbehr (code)\n
- · F. Coello (localization ES)\n
· Filipe C. (code)\n
- · <a href="http://www.hunterthornsberry.com">Hunter275</a> (tester)\n
· <a href="http://iirojappinen.com/">Iiro Jäppinen</a> (graphic)\n
- · inkantis (localization PL)\n
· <a href="http://www.jaytech.cz/">Jan Žatecký</a> (graphic)\n
· <a href="http://joachim-wilke.de/">JoWi24</a> (code)\n
· <a href="http://github.com/koem">Karsten Priegnitz</a> (code, artwork computation)\n
- · <a href="http://www.geocaching.com/profile/?guid=231070d8-b6f4-4d14-8d5a-b8bdcb19b78e">KiwiStone</a> (code, localization DE)\n
- · <a href="http://www.geocaching.com/email/?guid=d11a3e3d-7db0-4d43-87f2-7893238844a6">Lineflyer</a> (tester, support, localization DE)\n
- · Ludovic Valente (localization FR)\n
- · marco-jacob (code, loc. DE)\n
- · MichielK (code, loc. NL)\n
- · <a href="http://www.linkedin.com/in/mieczyslawtorchala">Mieczyslaw Torchala</a> (localization PL)\n
+ · <a href="http://www.geocaching.com/profile/?guid=231070d8-b6f4-4d14-8d5a-b8bdcb19b78e">KiwiStone</a> (code)\n
+ · <a href="http://www.geocaching.com/email/?guid=d11a3e3d-7db0-4d43-87f2-7893238844a6">Lineflyer</a> (tester, support)\n
+ · marco-dev (code)\n
+ · MichielK (code)\n
· mucek4 (code, open source project leader)\n
- · ncorreia (code, localization PT)\n
- · Pascal (localization NL)\n
- · Pavol Babinčák (code, loc. SK)\n
- · Peter (localization HU)\n
+ · ncorreia (code)\n
+ · Pavol Babinčák (code)\n
· <a href="https://github.com/Portree-Kid">Portree Kid</a> (code)\n
- · <a href="mailto:regiprogi@gmail.com">R3Gi</a> (localization CZ)\n
· Rainer S. (code)\n
- · Ray (code, loc. JA)\n
- · <a href="http://seromenho.com/">Ricardo Seromenho</a> (localization PT)\n
- · RoadRunner- (code, loc. DE)\n
- · <a href="http://www.blueskysoftware.it/">RomNexus6</a> (localization IT)\n
- · <a href="http://www.sammyshp.de/">SammysHP</a> (code, localization DE)\n
- · <a href="http://www.rfc1149.net/sam.html">Samuel Tardieu</a> (code, localization FR)\n
- · serenity (localization DE)\n
- · Shan, a.k.a. ShakurNO (localization NO)\n
- · Shizo87 (tester)\n
+ · Ray (code)\n
+ · RoadRunner- (code)\n
+ · <a href="http://www.sammyshp.de/">SammysHP</a> (code)\n
+ · <a href="http://www.rfc1149.net/sam.html">Samuel Tardieu</a> (code)\n
+ · Arne Schwabe (code)\n
· stephanme/Geoteufel (code)\n
- · thiasB (code, loc. DE EN)\n
- · YraFyra (code, loc. SV)\n
- · zenobios (code, loc. DE EN)\n
+ · thiasB (code)\n
+ · YraFyra (code)\n
+ · zenobios (code)\n
\n
· Special thanks to all our translation contributors on <a href="https://crowdin.net/project/cgeo">Crowdin.net</a>!\n
\n
@@ -102,4 +84,7 @@
<!-- cache menu -->
<string name="cache_menu_sygic" translatable="false">Sygic</string>
+ <string name="caches_map_mapswithme" translatable="false">Maps.me</string>
+ <string name="cache_menu_mapswithme" translatable="false">Maps.me</string>
+
</resources>
diff --git a/main/res/values/styles.xml b/main/res/values/styles.xml
index c566122..be1e1a4 100644
--- a/main/res/values/styles.xml
+++ b/main/res/values/styles.xml
@@ -54,23 +54,13 @@
<item name="android:gravity">center</item>
</style>
- <style name="action_bar_icon_cgeo">
- <item name="android:layout_width">@dimen/actionbar_height</item>
- <item name="android:layout_height">@dimen/actionbar_height</item>
- <item name="android:padding">4dip</item>
- <item name="android:scaleType">center</item>
- <item name="android:focusable">true</item>
- <item name="android:src">@drawable/actionbar_cgeo</item>
- <item name="android:background">@drawable/actionbar_button</item>
- </style>
-
<style name="action_bar_action">
<item name="android:layout_width">@dimen/actionbar_height</item>
<item name="android:layout_height">@dimen/actionbar_height</item>
<item name="android:padding">2dip</item>
<item name="android:scaleType">center</item>
<item name="android:focusable">true</item>
- <item name="android:src">@drawable/actionbar_home</item>
+ <item name="android:src">@drawable/actionbar_cgeo</item>
<item name="android:background">@drawable/actionbar_button</item>
</style>
@@ -140,7 +130,7 @@
<item name="android:layout_marginRight">10dip</item>
<item name="android:layout_marginBottom">5dip</item>
<item name="android:textColor">@color/text_dark</item>
- <item name="android:textColorHint">@color/text_hint_dark</item>
+ <item name="android:textColorHint">?text_color_hint</item>
<item name="android:background">@drawable/input_bcg_dark</item>
</style>
@@ -310,7 +300,7 @@
<!-- author of a log item -->
<style name="logitem_author">
- <item name="android:id">@+id/author</item>
+ <item name="android:id">@id/author</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_alignParentLeft">true</item>
diff --git a/main/res/values/themes.xml b/main/res/values/themes.xml
index ed64ef5..749cd48 100644
--- a/main/res/values/themes.xml
+++ b/main/res/values/themes.xml
@@ -1,105 +1,122 @@
<?xml version="1.0" encoding="utf-8"?>
-<resources>
+<resources xmlns:tools="http://schemas.android.com/tools">
- <style name="cgeo_main" parent="android:style/Theme.Wallpaper.NoTitleBar">
+ <style name="cgeo_main.ActionBarStyle" parent="cgeo.ActionBarStyle">
+ <item name="android:background">@drawable/actionbar_dark_bg_main</item>
+ <item name="background">@drawable/actionbar_dark_bg_main</item>
+ </style>
+
+
+ <style name="cgeo_main.base" parent="@style/Theme.AppCompat">
+
+ <!-- copy the style elements of the Wallpaper theme since AppCombat has no Wallpaper theme -->
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowShowWallpaper">true</item>
<!-- system elements -->
<item name="android:windowContentOverlay">@null</item>
+ <item name="actionBarStyle">@style/cgeo_main.ActionBarStyle</item>
+
+ <!-- KitKat's transperent navigation -->
+ <item name="android:fitsSystemWindows">true</item>
+ <item name="android:windowTranslucentNavigation" tools:ignore="NewApi">true</item>
</style>
- <style name="cgeo" parent="android:style/Theme.NoTitleBar">
- <!-- system elements -->
+ <style name="cgeo_main" parent="cgeo_main.base">
+ <item name="actionBarStyle">@style/cgeo_main.ActionBarStyle</item>
+ <item name="android:actionBarStyle" tools:ignore="NewApi">@style/cgeo_main.ActionBarStyle</item>
+ </style>
+
+ <style name="cgeo.Widget.AppCompat.Base.ProgressBar.Medium" parent="android:Widget.ProgressBar">
+ <item name="android:minWidth">32dip</item>
+ <item name="android:maxWidth">32dip</item>
+ <item name="android:minHeight">32dip</item>
+ <item name="android:maxHeight">32dip</item>
+ </style>
+
+
+ <style name="cgeo.ActionBarStyle" parent="Widget.AppCompat.Base.ActionBar">
+ <item name="indeterminateProgressStyle">@style/cgeo.Widget.AppCompat.Base.ProgressBar.Medium</item>
+ <item name="android:indeterminateProgressStyle" tools:ignore="NewApi">@style/cgeo.Widget.AppCompat.Base.ProgressBar.Medium</item>
+ </style>
+
+
+ <style name="cgeo.ActionBarStyle.Light.Inverse" parent="Widget.AppCompat.Light.Base.ActionBar.Solid.Inverse">
+ <item name="indeterminateProgressStyle">@style/cgeo.Widget.AppCompat.Base.ProgressBar.Medium</item>
+ <item name="android:indeterminateProgressStyle" tools:ignore="NewApi">@style/cgeo.Widget.AppCompat.Base.ProgressBar.Medium</item>
+ </style>
+
+ <style name="cgeo.base" parent="@style/Theme.AppCompat">
+ <item name="android:buttonStyle">@style/button</item>
+ <item name="android:editTextStyle">@style/edittext</item>
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="actionBarStyle">@style/cgeo.ActionBarStyle</item>
+
+ <!-- own values: colors -->
+ <item name="just_color">@color/just_black</item>
+ <item name="text_color_link">@color/link</item>
+ <item name="button_color_enabled">@color/button_enabled</item>
+ <item name="button_color_disabled">@color/button_disabled</item>
+ </style>
+
+ <!-- Identical to cgeo.base aside from different parent style and bug fixes-->
+ <style name="cgeo.base.light" parent="@style/Theme.AppCompat.Light.DarkActionBar">
+
+ <!-- For some reason we get the non inversed texts here (bug in abc?), explicitly set text styles -->
+ <item name="titleTextStyle">@style/TextAppearance.AppCompat.Widget.ActionMode.Title.Inverse</item>
+ <item name="subtitleTextStyle">@style/TextAppearance.AppCompat.Widget.ActionMode.Subtitle.Inverse</item>
+
+
<item name="android:buttonStyle">@style/button</item>
<item name="android:editTextStyle">@style/edittext</item>
<item name="android:windowContentOverlay">@null</item>
+ <item name="actionBarStyle">@style/cgeo.ActionBarStyle.Light.Inverse</item>
<!-- own values: colors -->
<item name="just_color">@color/just_black</item>
<item name="text_color_link">@color/link</item>
<item name="button_color_enabled">@color/button_enabled</item>
<item name="button_color_disabled">@color/button_disabled</item>
+
</style>
- <style name="dark" parent="cgeo">
+ <style name="cgeo" parent="cgeo.base">
+ </style>
- <!-- own values: colors -->
- <item name="text_color">@color/text_dark</item>
- <item name="text_color_headline">@color/text_headline_dark</item>
- <item name="text_color_grey">@color/text_grey_dark</item>
- <item name="text_color_hint">@color/text_hint_dark</item>
- <item name="background_color">@color/background_dark</item>
- <item name="background_color_notice">@color/background_dark_notice</item>
- <item name="background_color_transparent">@color/background_dark_transparent</item>
- <item name="separator_color">@color/separator_dark</item>
+ <style name="cgeo_light" parent="cgeo.base.light">
- <!-- own values: drawables -->
- <item name="button">@drawable/action_button_dark</item>
- <item name="input">@drawable/input_bcg_dark</item>
- <item name="inventory">@drawable/inventory_background_dark</item>
- <item name="favorite">@drawable/favorite_background_dark</item>
- <item name="favorite_r">@drawable/favorite_background_red_dark</item>
- <item name="favorite_o">@drawable/favorite_background_orange_dark</item>
- <item name="favorite_g">@drawable/favorite_background_green_dark</item>
- <item name="close">@drawable/map_close_dark</item>
- <item name="log_img_icon">@drawable/log_img_dark</item>
- <item name="actionbar_compass">@drawable/actionbar_compass_dark</item>
- <item name="progressSpinnerLarge">@android:style/Widget.ProgressBar.Large</item>
+ </style>
- <!-- own values: other -->
- <item name="compass">0</item>
+ <!-- Gingerbreads' Dialog style without the colors but with white backgound -->
+ <style name="DialogWindowTitle">
+ <item name="android:maxLines">1</item>
+ <item name="android:scrollHorizontally">true</item>
+ <item name="android:textAppearance">@android:style/TextAppearance.DialogWindowTitle</item>
</style>
- <style name="light" parent="cgeo">
+ <style name="DialogFixGingerbread">
+ <item name="android:windowFrame">@null</item>
+ <item name="android:windowTitleStyle">@style/DialogWindowTitle</item>
+ <item name="android:windowIsFloating">true</item>
- <!-- own values: colors -->
<item name="android:windowBackground">@color/just_white</item>
- <item name="text_color">@color/text_light</item>
- <item name="text_color_headline">@color/text_headline_light</item>
- <item name="text_color_grey">@color/text_grey_light</item>
- <item name="text_color_hint">@color/text_hint_light</item>
- <item name="background_color">@color/background_light</item>
- <item name="background_color_notice">@color/background_light_notice</item>
- <item name="background_color_transparent">@color/background_light_transparent</item>
- <item name="separator_color">@color/separator_light</item>
-
- <!-- own values: drawables -->
- <item name="button">@drawable/action_button_light</item>
- <item name="input">@drawable/input_bcg_light</item>
- <item name="inventory">@drawable/inventory_background_light</item>
- <item name="favorite">@drawable/favorite_background_light</item>
- <item name="favorite_r">@drawable/favorite_background_red_light</item>
- <item name="favorite_o">@drawable/favorite_background_orange_light</item>
- <item name="favorite_g">@drawable/favorite_background_green_light</item>
- <item name="close">@drawable/map_close_light</item>
- <item name="log_img_icon">@drawable/log_img_light</item>
- <item name="actionbar_compass">@drawable/actionbar_compass_light</item>
- <item name="progressSpinnerLarge">@android:style/Widget.ProgressBar.Large.Inverse</item>
-
- <!-- own values: other -->
- <item name="compass">1</item>
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
+ <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
</style>
- <style name="cgeo_popup" parent="android:style/Theme.Dialog">
- <!-- system elements -->
- <item name="android:buttonStyle">@style/button</item>
- <item name="android:editTextStyle">@style/edittext</item>
- <item name="android:windowNoTitle">true</item>
- </style>
- <!-- TODO: Popup probably doesn't need all these fields set. Should delete unnecessary ones. -->
- <style name="popup_dark" parent="cgeo_popup">
+ <style name="dark" parent="cgeo">
<!-- own values: colors -->
- <item name="just_color">@color/just_black</item>
<item name="text_color">@color/text_dark</item>
<item name="text_color_headline">@color/text_headline_dark</item>
<item name="text_color_grey">@color/text_grey_dark</item>
<item name="text_color_hint">@color/text_hint_dark</item>
- <item name="text_color_link">@color/link</item>
- <item name="button_color_enabled">@color/button_enabled</item>
- <item name="button_color_disabled">@color/button_disabled</item>
<item name="background_color">@color/background_dark</item>
<item name="background_color_notice">@color/background_dark_notice</item>
<item name="background_color_transparent">@color/background_dark_transparent</item>
@@ -110,9 +127,6 @@
<item name="input">@drawable/input_bcg_dark</item>
<item name="inventory">@drawable/inventory_background_dark</item>
<item name="favorite">@drawable/favorite_background_dark</item>
- <item name="favorite_r">@drawable/favorite_background_red_dark</item>
- <item name="favorite_o">@drawable/favorite_background_orange_dark</item>
- <item name="favorite_g">@drawable/favorite_background_green_dark</item>
<item name="close">@drawable/map_close_dark</item>
<item name="log_img_icon">@drawable/log_img_dark</item>
<item name="actionbar_compass">@drawable/actionbar_compass_dark</item>
@@ -122,11 +136,9 @@
<item name="compass">0</item>
</style>
- <!-- TODO: Popup probably doesn't need all these fields set. Should delete unnecessary ones. -->
- <style name="popup_light" parent="cgeo_popup">
+ <style name="light" parent="cgeo_light">
<!-- own values: colors -->
- <item name="android:windowBackground">@color/just_white</item>
<item name="text_color">@color/text_light</item>
<item name="text_color_headline">@color/text_headline_light</item>
<item name="text_color_grey">@color/text_grey_light</item>
@@ -141,9 +153,6 @@
<item name="input">@drawable/input_bcg_light</item>
<item name="inventory">@drawable/inventory_background_light</item>
<item name="favorite">@drawable/favorite_background_light</item>
- <item name="favorite_r">@drawable/favorite_background_red_light</item>
- <item name="favorite_o">@drawable/favorite_background_orange_light</item>
- <item name="favorite_g">@drawable/favorite_background_green_light</item>
<item name="close">@drawable/map_close_light</item>
<item name="log_img_icon">@drawable/log_img_light</item>
<item name="actionbar_compass">@drawable/actionbar_compass_light</item>
@@ -152,8 +161,35 @@
<!-- own values: other -->
<item name="compass">1</item>
</style>
+
- <style name="settings" parent="android:Theme">
+ <style name="cgeo.Translucent.Light" parent="light">
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowAnimationStyle">@android:style/Animation</item>
+ </style>
+
+
+ <style name="cgeo.Translucent" parent="dark">
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowAnimationStyle">@android:style/Animation</item>
+
+ </style>
+
+ <style name="cgeo_popup" parent="cgeo.Translucent.Light">
+ <item name="android:windowNoTitle">true</item>
+ </style>
+
+ <style name="popup_dark" parent="cgeo.Translucent">
+ </style>
+
+ <style name="popup_light" parent="cgeo_popup">
+ </style>
+
+ <style name="settings" parent="@style/Theme.AppCompat">
<item name="settings_cloud">@drawable/settings_cloud_white</item>
<item name="settings_details">@drawable/settings_details_white</item>
<item name="settings_eye">@drawable/settings_eye_white</item>
@@ -165,7 +201,7 @@
<item name="settings_info_icon">@drawable/settings_info_icon_white</item>
</style>
- <style name="settings.light" parent="android:Theme.Light">
+ <style name="settings.light" parent="@style/Theme.AppCompat.Light">
<item name="settings_cloud">@drawable/settings_cloud_black</item>
<item name="settings_details">@drawable/settings_details_black</item>
<item name="settings_eye">@drawable/settings_eye_black</item>
@@ -176,5 +212,5 @@
<item name="settings_sdcard">@drawable/settings_sdcard_black</item>
<item name="settings_info_icon">@drawable/settings_info_icon_black</item>
</style>
-
+
</resources> \ No newline at end of file
diff --git a/main/res/xml/preferences.xml b/main/res/xml/preferences.xml
index d550dc8..6226ebf 100644
--- a/main/res/xml/preferences.xml
+++ b/main/res/xml/preferences.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:cgeo="http://schemas.android.com/apk/res/cgeo.geocaching"
+ xmlns:app="http://schemas.android.com/apk/res/cgeo.geocaching"
android:key="@string/preference_screen_main" >
<PreferenceScreen
@@ -16,10 +16,10 @@
android:defaultValue="true"
android:key="@string/pref_connectorGCActive"
android:title="@string/settings_activate_gc"
- cgeo:text="@string/settings_gc_legal_note"
- cgeo:title="@string/settings_title_gc"
- cgeo:url="@string/settings_gc_legal_note_url"
- cgeo:urlButton="@string/settings_goto_url_button" />
+ app:text="@string/settings_gc_legal_note"
+ app:title="@string/settings_title_gc"
+ app:url="@string/settings_gc_legal_note_url"
+ app:urlButton="@string/settings_goto_url_button" />
<EditTextPreference
android:dependency="@string/pref_connectorGCActive"
@@ -63,13 +63,13 @@
<PreferenceCategory android:title="@string/settings_information" >
<cgeo.geocaching.settings.CapabilitiesPreference
android:title="@string/settings_features"
- cgeo:connector="GC" />
+ app:connector="GC" />
<cgeo.geocaching.settings.InfoPreference
android:text="@string/settings_info_facebook_login"
android:title="@string/settings_info_facebook_login_title"
- cgeo:url="@string/settings_facebook_login_url"
- cgeo:urlButton="@string/settings_goto_url_button" />
+ app:url="@string/settings_facebook_login_url"
+ app:urlButton="@string/settings_goto_url_button" />
<Preference
android:key="@string/pref_fakekey_gc_website"
@@ -97,7 +97,7 @@
<PreferenceCategory android:title="@string/settings_information" >
<cgeo.geocaching.settings.CapabilitiesPreference
android:title="@string/settings_features"
- cgeo:connector="OC" />
+ app:connector="OC" />
<Preference
android:key="@string/pref_fakekey_ocde_website"
@@ -125,7 +125,7 @@
<PreferenceCategory android:title="@string/settings_information" >
<cgeo.geocaching.settings.CapabilitiesPreference
android:title="@string/settings_features"
- cgeo:connector="OP" />
+ app:connector="OP" />
<Preference
android:key="@string/pref_fakekey_ocpl_website"
@@ -153,7 +153,7 @@
<PreferenceCategory android:title="@string/settings_information" >
<cgeo.geocaching.settings.CapabilitiesPreference
android:title="@string/settings_features"
- cgeo:connector="OB" />
+ app:connector="OB" />
<Preference
android:key="@string/pref_fakekey_ocnl_website"
@@ -181,7 +181,7 @@
<PreferenceCategory android:title="@string/settings_information" >
<cgeo.geocaching.settings.CapabilitiesPreference
android:title="@string/settings_features"
- cgeo:connector="OU" />
+ app:connector="OU" />
<Preference
android:key="@string/pref_fakekey_ocus_website"
@@ -209,14 +209,44 @@
<PreferenceCategory android:title="@string/settings_information" >
<cgeo.geocaching.settings.CapabilitiesPreference
android:title="@string/settings_features"
- cgeo:connector="OR" />
+ app:connector="OR" />
<Preference
android:key="@string/pref_fakekey_ocro_website"
android:title="@string/settings_open_website" />
</PreferenceCategory>
</PreferenceScreen>
- <PreferenceScreen android:title="@string/settings_title_ec" android:key="@string/preference_screen_ec">
+ <PreferenceScreen
+ android:key="@string/preference_screen_ocuk"
+ android:title="@string/init_oc_uk" >
+ <PreferenceCategory android:title="@string/settings_settings" >
+ <CheckBoxPreference
+ android:defaultValue="false"
+ android:key="@string/pref_connectorOCUKActive"
+ android:title="@string/settings_activate_oc_uk" />
+
+ <cgeo.geocaching.settings.TextPreference
+ android:dependency="@string/pref_connectorOCUKActive"
+ android:layout="@layout/text_preference"
+ android:text="@string/init_oc_uk_description" />
+
+ <cgeo.geocaching.settings.OAuthPreference
+ android:dependency="@string/pref_connectorOCUKActive"
+ android:key="@string/pref_fakekey_ocuk_authorization" />
+ </PreferenceCategory>
+ <PreferenceCategory android:title="@string/settings_information" >
+ <cgeo.geocaching.settings.CapabilitiesPreference
+ android:title="@string/settings_features"
+ app:connector="OK" />
+
+ <Preference
+ android:key="@string/pref_fakekey_ocuk_website"
+ android:title="@string/settings_open_website" />
+ </PreferenceCategory>
+ </PreferenceScreen>
+ <PreferenceScreen
+ android:key="@string/preference_screen_ec"
+ android:title="@string/settings_title_ec" >
<PreferenceCategory android:title="@string/settings_settings" >
<CheckBoxPreference
android:defaultValue="false"
@@ -259,14 +289,16 @@
<PreferenceCategory android:title="@string/settings_information" >
<cgeo.geocaching.settings.CapabilitiesPreference
android:title="@string/settings_features"
- cgeo:connector="EC" />
+ app:connector="EC" />
<Preference
android:key="@string/pref_fakekey_ec_website"
android:title="@string/settings_open_website" />
</PreferenceCategory>
</PreferenceScreen>
- <PreferenceScreen android:title="@string/settings_title_ox" android:key="@string/preference_screen_ox">
+ <PreferenceScreen
+ android:key="@string/preference_screen_ox"
+ android:title="@string/settings_title_ox" >
<PreferenceCategory android:title="@string/settings_settings" >
<CheckBoxPreference
android:defaultValue="false"
@@ -276,20 +308,23 @@
<PreferenceCategory android:title="@string/settings_information" >
<cgeo.geocaching.settings.CapabilitiesPreference
android:title="@string/settings_features"
- cgeo:connector="OX" />
+ app:connector="OX" />
<Preference
android:key="@string/pref_fakekey_ox_website"
android:title="@string/settings_open_website" />
</PreferenceCategory>
</PreferenceScreen>
- <PreferenceScreen android:title="@string/init_gcvote" >
+ <PreferenceScreen
+ android:key="@string/preference_screen_gcvote"
+ android:title="@string/init_gcvote" >
<PreferenceCategory android:title="@string/settings_settings" >
- <CheckBoxPreference
- android:defaultValue="true"
- android:key="@string/pref_ratingwanted"
- android:summary="@string/init_summary_ratingwanted"
- android:title="@string/init_ratingwanted" />
+ <CheckBoxPreference
+ android:defaultValue="true"
+ android:key="@string/pref_ratingwanted"
+ android:summary="@string/init_summary_ratingwanted"
+ android:title="@string/init_ratingwanted" />
+
<cgeo.geocaching.settings.EditPasswordPreference
android:dialogTitle="@string/init_password"
android:hint="@string/init_password"
@@ -305,7 +340,9 @@
android:title="@string/settings_open_website" />
</PreferenceCategory>
</PreferenceScreen>
- <PreferenceScreen android:title="@string/init_sendToCgeo" >
+ <PreferenceScreen
+ android:key="@string/preference_screen_sendtocgeo"
+ android:title="@string/init_sendToCgeo" >
<PreferenceCategory android:title="@string/settings_settings" >
<EditTextPreference
android:dialogTitle="@string/init_sendToCgeo_name"
@@ -320,8 +357,8 @@
<cgeo.geocaching.settings.InfoPreference
android:text="@string/init_sendToCgeo_description"
android:title="@string/settings_info_send2cgeo_title"
- cgeo:url="@string/settings_send2cgeo_url"
- cgeo:urlButton="@string/settings_goto_url_button" />
+ app:url="@string/settings_send2cgeo_url"
+ app:urlButton="@string/settings_goto_url_button" />
<Preference
android:key="@string/pref_fakekey_sendtocgeo_website"
@@ -368,6 +405,7 @@
</PreferenceCategory>
</PreferenceScreen>
<PreferenceScreen
+ android:key="@string/pref_appearance"
android:icon="?attr/settings_eye"
android:title="@string/settings_title_appearance" >
<CheckBoxPreference
@@ -407,8 +445,8 @@
<CheckBoxPreference
android:defaultValue="true"
android:key="@string/pref_friendlogswanted"
- android:summary="@string/init_summary_friendlogswanted"
- android:title="@string/init_friendlogswanted" />
+ android:summary="@string/init_summary_friends_and_own_logs_wanted"
+ android:title="@string/init_friends_and_own_logs_wanted" />
<CheckBoxPreference
android:defaultValue="false"
android:key="@string/pref_opendetailslastpage"
@@ -443,8 +481,8 @@
<cgeo.geocaching.settings.InfoPreference
android:text="@string/settings_info_offline_maps"
android:title="@string/settings_info_offline_maps_title"
- cgeo:url="@string/settings_offline_maps_url"
- cgeo:urlButton="@string/settings_goto_url_button" />
+ app:url="@string/settings_offline_maps_url"
+ app:urlButton="@string/settings_goto_url_button" />
<Preference
android:key="@string/pref_mapDirectory"
@@ -453,8 +491,8 @@
<cgeo.geocaching.settings.InfoPreference
android:text="@string/settings_info_themes"
android:title="@string/settings_info_themes_title"
- cgeo:url="@string/settings_themes_url"
- cgeo:urlButton="@string/settings_goto_url_button" />
+ app:url="@string/settings_themes_url"
+ app:urlButton="@string/settings_goto_url_button" />
<Preference
android:key="@string/pref_renderthemepath"
@@ -649,16 +687,6 @@
<CheckBoxPreference
android:defaultValue="true"
android:enabled="false"
- android:key="@string/pref_navigation_menu_cache_beacon"
- android:title="@string/cache_menu_cachebeacon" />
- <CheckBoxPreference
- android:defaultValue="true"
- android:enabled="false"
- android:key="@string/pref_navigation_menu_gcc"
- android:title="@string/cache_menu_gcc" />
- <CheckBoxPreference
- android:defaultValue="true"
- android:enabled="false"
android:key="@string/pref_navigation_menu_where_you_go"
android:title="@string/cache_menu_whereyougo" />
<CheckBoxPreference
@@ -726,7 +754,10 @@
android:defaultValue="false"
android:key="@string/pref_debug"
android:title="@string/init_debug" />
+ <Preference
+ android:key="@string/pref_memory_dump"
+ android:title="@string/init_create_memory_dump" />
</PreferenceCategory>
</PreferenceScreen>
-</PreferenceScreen> \ No newline at end of file
+</PreferenceScreen>
diff --git a/main/src/cgeo/calendar/CalendarAddon.java b/main/src/cgeo/calendar/CalendarAddon.java
index 117fb9a..4a672fa 100644
--- a/main/src/cgeo/calendar/CalendarAddon.java
+++ b/main/src/cgeo/calendar/CalendarAddon.java
@@ -18,6 +18,11 @@ import android.net.Uri;
import java.util.Date;
public class CalendarAddon {
+
+ private CalendarAddon() {
+ // utility class
+ }
+
public static boolean isAvailable() {
return ProcessUtils.isIntentAvailable(ICalendar.INTENT, Uri.parse(ICalendar.URI_SCHEME + "://" + ICalendar.URI_HOST));
}
diff --git a/main/src/cgeo/contacts/ContactsAddon.java b/main/src/cgeo/contacts/ContactsAddon.java
index f2498ea..7165a77 100644
--- a/main/src/cgeo/contacts/ContactsAddon.java
+++ b/main/src/cgeo/contacts/ContactsAddon.java
@@ -8,6 +8,11 @@ import android.content.Intent;
import android.net.Uri;
public class ContactsAddon {
+
+ private ContactsAddon() {
+ // utility class
+ }
+
public static void openContactCard(Activity context, String userName) {
final Parameters params = new Parameters(
IContacts.PARAM_NAME, userName
diff --git a/main/src/cgeo/geocaching/AboutActivity.java b/main/src/cgeo/geocaching/AboutActivity.java
index 8d3d978..f6d204b 100644
--- a/main/src/cgeo/geocaching/AboutActivity.java
+++ b/main/src/cgeo/geocaching/AboutActivity.java
@@ -14,10 +14,12 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
+import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
+import android.view.ViewGroup;
import android.widget.ScrollView;
import android.widget.TextView;
@@ -28,14 +30,16 @@ import java.util.Scanner;
public class AboutActivity extends AbstractViewPagerActivity<AboutActivity.Page> {
+ private static final String EXTRA_ABOUT_STARTPAGE = "cgeo.geocaching.extra.about.startpage";
+
class LicenseViewCreator extends AbstractCachingPageViewCreator<ScrollView> {
@InjectView(R.id.license) protected TextView licenseLink;
@InjectView(R.id.license_text) protected TextView licenseText;
@Override
- public ScrollView getDispatchedView() {
- final ScrollView view = (ScrollView) getLayoutInflater().inflate(R.layout.about_license_page, null);
+ public ScrollView getDispatchedView(final ViewGroup parentView) {
+ final ScrollView view = (ScrollView) getLayoutInflater().inflate(R.layout.about_license_page, parentView, false);
ButterKnife.inject(this, view);
setClickListener(licenseLink, "http://www.apache.org/licenses/LICENSE-2.0.html");
licenseText.setText(getRawResourceString(R.raw.license));
@@ -48,8 +52,8 @@ public class AboutActivity extends AbstractViewPagerActivity<AboutActivity.Page>
@InjectView(R.id.contributors) protected TextView contributors;
@Override
- public ScrollView getDispatchedView() {
- final ScrollView view = (ScrollView) getLayoutInflater().inflate(R.layout.about_contributors_page, null);
+ public ScrollView getDispatchedView(final ViewGroup parentView) {
+ final ScrollView view = (ScrollView) getLayoutInflater().inflate(R.layout.about_contributors_page, parentView, false);
ButterKnife.inject(this, view);
contributors.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
return view;
@@ -63,8 +67,8 @@ public class AboutActivity extends AbstractViewPagerActivity<AboutActivity.Page>
@InjectView(R.id.changelog_release) protected TextView changeLogRelease;
@Override
- public ScrollView getDispatchedView() {
- final ScrollView view = (ScrollView) getLayoutInflater().inflate(R.layout.about_changes_page, null);
+ public ScrollView getDispatchedView(final ViewGroup parentView) {
+ final ScrollView view = (ScrollView) getLayoutInflater().inflate(R.layout.about_changes_page, parentView, false);
ButterKnife.inject(this, view);
changeLogRelease.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
final String changeLogMasterString = getString(R.string.changelog_master);
@@ -84,19 +88,17 @@ public class AboutActivity extends AbstractViewPagerActivity<AboutActivity.Page>
@InjectView(R.id.website) protected TextView website;
@InjectView(R.id.facebook) protected TextView facebook;
@InjectView(R.id.twitter) protected TextView twitter;
- @InjectView(R.id.nutshellmanual) protected TextView nutshellmanual;
@InjectView(R.id.market) protected TextView market;
@InjectView(R.id.faq) protected TextView faq;
@Override
- public ScrollView getDispatchedView() {
- final ScrollView view = (ScrollView) getLayoutInflater().inflate(R.layout.about_help_page, null);
+ public ScrollView getDispatchedView(final ViewGroup parentView) {
+ final ScrollView view = (ScrollView) getLayoutInflater().inflate(R.layout.about_help_page, parentView, false);
ButterKnife.inject(this, view);
setClickListener(support, "mailto:support@cgeo.org?subject=" + Uri.encode("cgeo " + Version.getVersionName(AboutActivity.this)));
setClickListener(website, "http://www.cgeo.org/");
setClickListener(facebook, "http://www.facebook.com/pages/cgeo/297269860090");
setClickListener(twitter, "http://twitter.com/android_gc");
- setClickListener(nutshellmanual, "http://manual.cgeo.org/");
setClickListener(faq, "http://faq.cgeo.org/");
market.setOnClickListener(new View.OnClickListener() {
@@ -116,8 +118,8 @@ public class AboutActivity extends AbstractViewPagerActivity<AboutActivity.Page>
@InjectView(R.id.donate) protected TextView donateButton;
@Override
- public ScrollView getDispatchedView() {
- final ScrollView view = (ScrollView) getLayoutInflater().inflate(R.layout.about_version_page, null);
+ public ScrollView getDispatchedView(final ViewGroup parentView) {
+ final ScrollView view = (ScrollView) getLayoutInflater().inflate(R.layout.about_version_page, parentView, false);
ButterKnife.inject(this, view);
version.setText(Version.getVersionName(AboutActivity.this));
setClickListener(donateButton, "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AQBS7UP76CXW2");
@@ -142,7 +144,13 @@ public class AboutActivity extends AbstractViewPagerActivity<AboutActivity.Page>
@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState, R.layout.viewpager_activity);
- createViewPager(0, null);
+
+ int startPage = Page.VERSION.ordinal();
+ final Bundle extras = getIntent().getExtras();
+ if (extras != null) {
+ startPage = extras.getInt(EXTRA_ABOUT_STARTPAGE, startPage);
+ }
+ createViewPager(startPage, null);
reinitializeViewPager();
}
@@ -210,4 +218,10 @@ public class AboutActivity extends AbstractViewPagerActivity<AboutActivity.Page>
return result;
}
+ public static void showChangeLog(final Context fromActivity) {
+ final Intent intent = new Intent(fromActivity, AboutActivity.class);
+ intent.putExtra(EXTRA_ABOUT_STARTPAGE, Page.CHANGELOG.ordinal());
+ fromActivity.startActivity(intent);
+ }
+
}
diff --git a/main/src/cgeo/geocaching/AbstractDialogFragment.java b/main/src/cgeo/geocaching/AbstractDialogFragment.java
new file mode 100644
index 0000000..4025347
--- /dev/null
+++ b/main/src/cgeo/geocaching/AbstractDialogFragment.java
@@ -0,0 +1,356 @@
+package cgeo.geocaching;
+
+import butterknife.ButterKnife;
+
+import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.ActivityMixin;
+import cgeo.geocaching.enumerations.CacheSize;
+import cgeo.geocaching.enumerations.LoadFlags;
+import cgeo.geocaching.gcvote.GCVote;
+import cgeo.geocaching.gcvote.GCVoteRating;
+import cgeo.geocaching.geopoint.Geopoint;
+import cgeo.geocaching.geopoint.Units;
+import cgeo.geocaching.sensors.GeoDirHandler;
+import cgeo.geocaching.sensors.IGeoData;
+import cgeo.geocaching.settings.Settings;
+import cgeo.geocaching.ui.CacheDetailsCreator;
+import cgeo.geocaching.ui.LoggingUI;
+import cgeo.geocaching.utils.Log;
+import cgeo.geocaching.utils.RxUtils;
+
+import rx.Observable;
+import rx.Subscription;
+import rx.android.observables.AndroidObservable;
+import rx.functions.Action1;
+import rx.functions.Func0;
+import rx.subscriptions.Subscriptions;
+
+import android.annotation.TargetApi;
+import android.content.DialogInterface;
+import android.content.res.Resources;
+import android.os.Build;
+import android.os.Bundle;
+import android.support.v4.app.DialogFragment;
+import android.support.v7.widget.PopupMenu;
+import android.view.ContextMenu;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+public abstract class AbstractDialogFragment extends DialogFragment implements CacheMenuHandler.ActivityInterface, PopupMenu.OnMenuItemClickListener, MenuItem.OnMenuItemClickListener {
+ protected CgeoApplication app = null;
+ protected Resources res = null;
+ protected String geocode;
+ protected CacheDetailsCreator details;
+
+ private Subscription resumeSubscription = Subscriptions.empty();
+ private TextView cacheDistance = null;
+
+
+ protected static final String GEOCODE_ARG= "GEOCODE";
+ protected static final String WAYPOINT_ARG= "WAYPOINT";
+
+ protected Geocache cache;
+
+
+ @Override
+ public void onCreate(final Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ res = getResources();
+ app = (CgeoApplication) getActivity().getApplication();
+ setHasOptionsMenu(true);
+ }
+
+ protected void initCustomActionBar(final View v)
+ {
+ final ImageView defaultNavigationImageView = ButterKnife.findById(v, R.id.defaultNavigation);
+ defaultNavigationImageView.setOnLongClickListener(new View.OnLongClickListener() {
+ @Override
+ public boolean onLongClick(final View v) {
+ startDefaultNavigation2();
+ return true;
+ }
+ });
+ defaultNavigationImageView.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(final View v) {
+ navigateTo();
+ }
+ });
+
+ final View overflowActionBar = v.findViewById(R.id.overflowActionBar);
+ overflowActionBar.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(final View v) {
+ showPopup(v);
+ }
+ });
+ /* Use a context menu instead popup where the popup menu is not working */
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
+ registerForContextMenu(overflowActionBar);
+ }
+
+ }
+
+ final public void setTitle(final CharSequence title) {
+ final TextView titleview = (TextView) getView().findViewById(R.id.actionbar_title);
+ if (titleview != null) {
+ titleview.setText(title);
+
+ }
+ }
+
+ @Override
+ public void onStart() {
+ super.onStart();
+ geocode = getArguments().getString(GEOCODE_ARG);
+ }
+
+
+ protected void showPopup(final View view)
+ {
+ // For reason I totally not understand the PopupMenu from Appcompat is broken beyond
+ // repair. Chicken out here and show the old menu on Gingerbread.
+ // The "correct" way of implementing this is stil in
+ // showPopupCompat(view)
+
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
+ view.showContextMenu();
+ } else {
+ showPopupHoneycomb(view);
+ }
+ }
+
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB)
+ private void showPopupHoneycomb(final View view) {
+ final android.widget.PopupMenu popupMenu = new android.widget.PopupMenu(getActivity(), view);
+ CacheMenuHandler.addMenuItems(new MenuInflater(getActivity()), popupMenu.getMenu(), cache);
+ popupMenu.setOnMenuItemClickListener(
+ new android.widget.PopupMenu.OnMenuItemClickListener() {
+ @Override
+ public boolean onMenuItemClick(final MenuItem item) {
+ return AbstractDialogFragment.this.onMenuItemClick(item);
+ }
+ }
+ );
+ popupMenu.show();
+ }
+
+ protected void showPopupCompat(final View view)
+ {
+ final PopupMenu popupMenu = new PopupMenu(getActivity(), view);
+
+ // Directly instantiate SupportMenuInflater instead of getActivity().getMenuinflator
+ // getMenuinflator will throw a NPE since it tries to get the not displayed ActionBar
+ // menuinflator = getActivity().getMenuInflater();
+ // MenuInflater menuinflator = new SupportMenuInflater(getActivity());
+ CacheMenuHandler.addMenuItems(popupMenu.getMenuInflater(), popupMenu.getMenu(), cache);
+ popupMenu.setOnMenuItemClickListener(this);
+ popupMenu.show();
+ }
+
+
+ protected void init()
+ {
+ cache = DataStore.loadCache(geocode, LoadFlags.LOAD_CACHE_OR_DB);
+
+ if (cache == null) {
+ ((AbstractActivity) getActivity()).showToast(res.getString(R.string.err_detail_cache_find));
+
+ getActivity().finish();
+ return;
+ }
+
+ geocode = cache.getGeocode();
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ this.resumeSubscription = geoUpdate.start(GeoDirHandler.UPDATE_GEODATA);
+ init();
+ }
+
+
+ @Override
+ public void onPause() {
+ resumeSubscription.unsubscribe();
+ super.onPause();
+ }
+
+
+ private void aquireGCVote() {
+ if (!Settings.isRatingWanted()) {
+ return;
+ }
+ if (!cache.supportsGCVote()) {
+ return;
+ }
+ AndroidObservable.bindActivity(getActivity(), Observable.defer(new Func0<Observable<GCVoteRating>>() {
+ @Override
+ public Observable<GCVoteRating> call() {
+ final GCVoteRating rating = GCVote.getRating(cache.getGuid(), geocode);
+ return rating != null ? Observable.just(rating) : Observable.<GCVoteRating>empty();
+ }
+ })).subscribeOn(RxUtils.networkScheduler).subscribe(new Action1<GCVoteRating>() {
+ @Override
+ public void call(final GCVoteRating rating) {
+ cache.setRating(rating.getRating());
+ cache.setVotes(rating.getVotes());
+ DataStore.saveChangedCache(cache);
+ details.addRating(cache);
+ }
+ });
+ }
+
+ protected final void addCacheDetails() {
+ assert cache != null;
+ // cache type
+ final String cacheType = cache.getType().getL10n();
+ final String cacheSize = cache.getSize() != CacheSize.UNKNOWN ? " (" + cache.getSize().getL10n() + ")" : "";
+ details.add(R.string.cache_type, cacheType + cacheSize);
+
+ details.add(R.string.cache_geocode, cache.getGeocode());
+ details.addCacheState(cache);
+
+ details.addDistance(cache, cacheDistance);
+ cacheDistance = details.getValueView();
+
+ details.addDifficulty(cache);
+ details.addTerrain(cache);
+ details.addEventDate(cache);
+
+ // rating
+ if (cache.getRating() > 0) {
+ details.addRating(cache);
+ } else {
+ aquireGCVote();
+ }
+
+ // favorite count
+ details.add(R.string.cache_favorite, cache.getFavoritePoints() + "×");
+
+ // more details
+ final Button buttonMore = (Button) getView().findViewById(R.id.more_details);
+
+ buttonMore.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(final View arg0) {
+ CacheDetailActivity.startActivity(getActivity(), geocode);
+ getActivity().finish();
+ }
+ });
+
+ /* Only working combination as it seems */
+ registerForContextMenu(buttonMore);
+ }
+
+ public final void showToast(final String text) {
+ ActivityMixin.showToast(getActivity(), text);
+ }
+
+ private final GeoDirHandler geoUpdate = new GeoDirHandler() {
+
+ @Override
+ public void updateGeoData(final IGeoData geo) {
+ try {
+ if (geo.getCoords() != null && cache != null && cache.getCoords() != null) {
+ cacheDistance.setText(Units.getDistanceFromKilometers(geo.getCoords().distanceTo(cache.getCoords())));
+ cacheDistance.bringToFront();
+ }
+ onUpdateGeoData(geo);
+ } catch (final RuntimeException e) {
+ Log.w("Failed to UpdateLocation location.");
+ }
+ }
+ };
+
+ /**
+ * @param geo
+ * location
+ */
+ protected void onUpdateGeoData(final IGeoData geo) {
+ // do nothing by default
+ }
+
+ @Override
+ public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) {
+ super.onCreateOptionsMenu(menu, inflater);
+ CacheMenuHandler.addMenuItems(inflater, menu, cache);
+
+ }
+
+ @Override
+ public void onCreateContextMenu(final ContextMenu menu, final View v, final ContextMenu.ContextMenuInfo menuInfo) {
+ super.onCreateContextMenu(menu, v, menuInfo);
+ CacheMenuHandler.addMenuItems(new MenuInflater(getActivity()), menu, cache);
+ for (int i=0;i<menu.size();i++) {
+ final MenuItem m = menu.getItem(i);
+ m.setOnMenuItemClickListener(this);
+ }
+ }
+
+ @Override
+ public boolean onContextItemSelected(final MenuItem item) {
+ return onOptionsItemSelected(item);
+ }
+
+
+ @Override
+ public boolean onMenuItemClick(final MenuItem menuItem) {
+ return onOptionsItemSelected(menuItem);
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(final MenuItem item) {
+ if (CacheMenuHandler.onMenuItemSelected(item, this, cache)) {
+ return true;
+ }
+ if (LoggingUI.onMenuItemSelected(item, getActivity(), cache)) {
+ return true;
+ }
+
+ return super.onOptionsItemSelected(item);
+ }
+
+ @Override
+ public void onPrepareOptionsMenu(final Menu menu) {
+ super.onPrepareOptionsMenu(menu);
+
+ try {
+ CacheMenuHandler.onPrepareOptionsMenu(menu, cache);
+ LoggingUI.onPrepareOptionsMenu(menu, cache);
+ } catch (final RuntimeException e) {
+ // nothing
+ }
+ }
+
+
+ protected abstract Geopoint getCoordinates();
+
+ protected abstract void startDefaultNavigation2();
+
+
+ @Override
+ public void cachesAround() {
+ final Geopoint coords = getCoordinates();
+ if (coords == null) {
+ showToast(res.getString(R.string.err_location_unknown));
+ return;
+ }
+ CacheListActivity.startActivityCoordinates((AbstractActivity) getActivity(), coords);
+ getActivity().finish();
+ }
+
+ @Override
+ public void onCancel(final DialogInterface dialog) {
+ super.onCancel(dialog);
+ getActivity().finish();
+ }
+
+}
diff --git a/main/src/cgeo/geocaching/AbstractLoggingActivity.java b/main/src/cgeo/geocaching/AbstractLoggingActivity.java
index c3ba7d2..90fda53 100644
--- a/main/src/cgeo/geocaching/AbstractLoggingActivity.java
+++ b/main/src/cgeo/geocaching/AbstractLoggingActivity.java
@@ -1,32 +1,34 @@
package cgeo.geocaching;
-import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.AbstractActionBarActivity;
import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.connector.gc.GCConnector;
import cgeo.geocaching.connector.gc.GCSmiliesProvider;
import cgeo.geocaching.connector.gc.GCSmiliesProvider.Smiley;
import cgeo.geocaching.connector.trackable.TravelBugConnector;
-import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.utils.LogTemplateProvider;
import cgeo.geocaching.utils.LogTemplateProvider.LogContext;
import cgeo.geocaching.utils.LogTemplateProvider.LogTemplate;
-import org.apache.commons.lang3.StringUtils;
-
import android.view.Menu;
import android.view.MenuItem;
import android.view.SubMenu;
import android.widget.EditText;
-public abstract class AbstractLoggingActivity extends AbstractActivity {
+public abstract class AbstractLoggingActivity extends AbstractActionBarActivity {
+
+ /**
+ * sub classes can disable the send button
+ */
+ private boolean enableSend = true;
@Override
public boolean onCreateOptionsMenu(final Menu menu) {
getMenuInflater().inflate(R.menu.abstract_logging_activity, menu);
final SubMenu menuLog = menu.findItem(R.id.menu_templates).getSubMenu();
- for (final LogTemplate template : LogTemplateProvider.getTemplates()) {
+ for (final LogTemplate template : LogTemplateProvider.getTemplatesWithSignature()) {
menuLog.add(0, template.getItemId(), 0, template.getResourceId());
}
@@ -39,10 +41,7 @@ public abstract class AbstractLoggingActivity extends AbstractActivity {
}
@Override
- public boolean onPrepareOptionsMenu(Menu menu) {
- final boolean signatureAvailable = StringUtils.isNotBlank(Settings.getSignature());
- menu.findItem(R.id.menu_signature).setVisible(signatureAvailable);
-
+ public boolean onPrepareOptionsMenu(final Menu menu) {
boolean smileyVisible = false;
final Geocache cache = getLogContext().getCache();
if (cache != null && ConnectorFactory.getConnector(cache).equals(GCConnector.getInstance())) {
@@ -54,19 +53,15 @@ public abstract class AbstractLoggingActivity extends AbstractActivity {
}
menu.findItem(R.id.menu_smilies).setVisible(smileyVisible);
+ menu.findItem(R.id.menu_send).setVisible(enableSend);
return true;
}
@Override
- public boolean onOptionsItemSelected(MenuItem item) {
+ public boolean onOptionsItemSelected(final MenuItem item) {
final int id = item.getItemId();
- if (id == R.id.menu_signature) {
- insertIntoLog(LogTemplateProvider.applyTemplates(Settings.getSignature(), getLogContext()), true);
- return true;
- }
-
final LogTemplate template = LogTemplateProvider.getTemplate(id);
if (template != null) {
insertIntoLog(template.getValue(getLogContext()), true);
@@ -79,13 +74,18 @@ public abstract class AbstractLoggingActivity extends AbstractActivity {
return true;
}
- return false;
+ return super.onOptionsItemSelected(item);
}
protected abstract LogContext getLogContext();
- protected void insertIntoLog(String newText, final boolean moveCursor) {
+ protected final void insertIntoLog(final String newText, final boolean moveCursor) {
final EditText log = (EditText) findViewById(R.id.log);
ActivityMixin.insertAtPosition(log, newText, moveCursor);
}
+
+ protected final void setLoggingEnabled(final boolean enabled) {
+ enableSend = enabled;
+ invalidateOptionsMenuCompatible();
+ }
}
diff --git a/main/src/cgeo/geocaching/AbstractPopupActivity.java b/main/src/cgeo/geocaching/AbstractPopupActivity.java
deleted file mode 100644
index 88cad01..0000000
--- a/main/src/cgeo/geocaching/AbstractPopupActivity.java
+++ /dev/null
@@ -1,260 +0,0 @@
-package cgeo.geocaching;
-
-import cgeo.geocaching.activity.AbstractActivity;
-import cgeo.geocaching.activity.ActivityMixin;
-import cgeo.geocaching.enumerations.CacheSize;
-import cgeo.geocaching.enumerations.LoadFlags;
-import cgeo.geocaching.gcvote.GCVote;
-import cgeo.geocaching.gcvote.GCVoteRating;
-import cgeo.geocaching.geopoint.Geopoint;
-import cgeo.geocaching.geopoint.Units;
-import cgeo.geocaching.sensors.GeoDirHandler;
-import cgeo.geocaching.sensors.IGeoData;
-import cgeo.geocaching.settings.Settings;
-import cgeo.geocaching.ui.CacheDetailsCreator;
-import cgeo.geocaching.ui.LoggingUI;
-import cgeo.geocaching.utils.Log;
-
-import org.apache.commons.lang3.StringUtils;
-
-import rx.Observable;
-import rx.android.observables.AndroidObservable;
-import rx.functions.Action1;
-import rx.functions.Func0;
-import rx.schedulers.Schedulers;
-
-import android.graphics.Rect;
-import android.os.Bundle;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.view.View.OnLongClickListener;
-import android.widget.Button;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-public abstract class AbstractPopupActivity extends AbstractActivity implements CacheMenuHandler.ActivityInterface {
-
- protected Geocache cache = null;
- protected String geocode = null;
- protected CacheDetailsCreator details;
-
- private TextView cacheDistance = null;
- private final int layout;
-
- private final GeoDirHandler geoUpdate = new GeoDirHandler() {
-
- @Override
- public void updateGeoData(final IGeoData geo) {
- try {
- if (geo.getCoords() != null && cache != null && cache.getCoords() != null) {
- cacheDistance.setText(Units.getDistanceFromKilometers(geo.getCoords().distanceTo(cache.getCoords())));
- cacheDistance.bringToFront();
- }
- onUpdateGeoData(geo);
- } catch (final RuntimeException e) {
- Log.w("Failed to UpdateLocation location.");
- }
- }
- };
-
- /**
- * Callback to run when new location information is available.
- * This may be overridden by deriving classes. The default implementation does nothing.
- *
- * @param geo
- * the new data
- */
- public void onUpdateGeoData(final IGeoData geo) {
- }
-
- protected AbstractPopupActivity(int layout) {
- this.layout = layout;
- }
-
- private void aquireGCVote() {
- if (!Settings.isRatingWanted()) {
- return;
- }
- if (!cache.supportsGCVote()) {
- return;
- }
- AndroidObservable.bindActivity(this, Observable.defer(new Func0<Observable<GCVoteRating>>() {
- @Override
- public Observable<GCVoteRating> call() {
- final GCVoteRating rating = GCVote.getRating(cache.getGuid(), geocode);
- return rating != null ? Observable.just(rating) : Observable.<GCVoteRating>empty();
- }
- })).subscribe(new Action1<GCVoteRating>() {
- @Override
- public void call(final GCVoteRating rating) {
- cache.setRating(rating.getRating());
- cache.setVotes(rating.getVotes());
- DataStore.saveChangedCache(cache);
- details.addRating(cache);
- }
- }, Schedulers.io());
- }
-
- protected void init() {
- cache = DataStore.loadCache(geocode, LoadFlags.LOAD_CACHE_OR_DB);
-
- if (cache == null) {
- showToast(res.getString(R.string.err_detail_cache_find));
-
- finish();
- return;
- }
-
- geocode = cache.getGeocode();
- }
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- // set theme
- this.setTheme(ActivityMixin.getDialogTheme());
- // set layout
- setContentView(layout);
-
- // get parameters
- final Bundle extras = getIntent().getExtras();
- if (extras != null) {
- geocode = extras.getString(Intents.EXTRA_GEOCODE);
- }
-
- if (StringUtils.isBlank(geocode)) {
- showToast(res.getString(R.string.err_detail_cache_find));
-
- finish();
- return;
- }
-
- final ImageView defaultNavigationImageView = (ImageView) findViewById(R.id.defaultNavigation);
- defaultNavigationImageView.setOnLongClickListener(new OnLongClickListener() {
- @Override
- public boolean onLongClick(View v) {
- startDefaultNavigation2();
- return true;
- }
- });
-
- }
-
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- CacheMenuHandler.addMenuItems(this, menu, cache);
- return true;
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- if (CacheMenuHandler.onMenuItemSelected(item, this, cache)) {
- return true;
- }
- if (LoggingUI.onMenuItemSelected(item, this, cache)) {
- return true;
- }
-
- return true;
- }
-
- @Override
- public boolean onPrepareOptionsMenu(Menu menu) {
- super.onPrepareOptionsMenu(menu);
-
- try {
- CacheMenuHandler.onPrepareOptionsMenu(menu, cache);
- LoggingUI.onPrepareOptionsMenu(menu, cache);
- } catch (final RuntimeException e) {
- // nothing
- }
-
- return true;
- }
-
- protected abstract Geopoint getCoordinates();
-
- @Override
- public void onResume() {
- super.onResume(geoUpdate.start(GeoDirHandler.UPDATE_GEODATA));
- init();
- }
-
- @Override
- public boolean onTouchEvent(final MotionEvent event) {
- if (event.getAction() == MotionEvent.ACTION_UP) {
- final Rect r = new Rect(0, 0, 0, 0);
- getWindow().getDecorView().getHitRect(r);
- if (!r.contains((int) event.getX(), (int) event.getY())) {
- finish();
- return true;
- }
- }
- return super.onTouchEvent(event);
- }
-
- protected abstract void startDefaultNavigation2();
-
- protected final void addCacheDetails() {
- assert cache != null;
- // cache type
- final String cacheType = cache.getType().getL10n();
- final String cacheSize = cache.getSize() != CacheSize.UNKNOWN ? " (" + cache.getSize().getL10n() + ")" : "";
- details.add(R.string.cache_type, cacheType + cacheSize);
-
- details.add(R.string.cache_geocode, cache.getGeocode());
- details.addCacheState(cache);
-
- details.addDistance(cache, cacheDistance);
- cacheDistance = details.getValueView();
-
- details.addDifficulty(cache);
- details.addTerrain(cache);
- details.addEventDate(cache);
-
- // rating
- if (cache.getRating() > 0) {
- details.addRating(cache);
- } else {
- aquireGCVote();
- }
-
- // favorite count
- details.add(R.string.cache_favorite, cache.getFavoritePoints() + "×");
-
- // more details
- final Button buttonMore = (Button) findViewById(R.id.more_details);
- buttonMore.setOnClickListener(new OnClickListener() {
-
- @Override
- public void onClick(View arg0) {
- CacheDetailActivity.startActivity(AbstractPopupActivity.this, geocode);
- finish();
- }
- });
- }
-
- @Override
- public void cachesAround() {
- final Geopoint coords = getCoordinates();
- if (coords == null) {
- showToast(res.getString(R.string.err_location_unknown));
- return;
- }
- CacheListActivity.startActivityCoordinates(this, coords);
- finish();
- }
-
- /**
- * @param view
- * unused here but needed since this method is referenced from XML layout
- */
- public final void goDefaultNavigation(View view) {
- navigateTo();
- finish();
- }
-
-}
diff --git a/main/src/cgeo/geocaching/CacheCache.java b/main/src/cgeo/geocaching/CacheCache.java
index cb4e14c..1913d3c 100644
--- a/main/src/cgeo/geocaching/CacheCache.java
+++ b/main/src/cgeo/geocaching/CacheCache.java
@@ -23,7 +23,7 @@ public class CacheCache {
final private LeastRecentlyUsedMap<String, Geocache> cachesCache;
public CacheCache() {
- cachesCache = new LeastRecentlyUsedMap.LruCache<String, Geocache>(MAX_CACHED_CACHES);
+ cachesCache = new LeastRecentlyUsedMap.LruCache<>(MAX_CACHED_CACHES);
cachesCache.setRemoveHandler(new CacheRemoveHandler());
}
@@ -79,7 +79,7 @@ public class CacheCache {
}
public synchronized Set<String> getInViewport(final Viewport viewport, final CacheType cacheType) {
- final Set<String> geocodes = new HashSet<String>();
+ final Set<String> geocodes = new HashSet<>();
for (final Geocache cache : cachesCache.values()) {
if (cache.getCoords() == null) {
// FIXME: this kludge must be removed, it is only present to help us debug the cases where
diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java
index a66d181..bb1f154 100644
--- a/main/src/cgeo/geocaching/CacheDetailActivity.java
+++ b/main/src/cgeo/geocaching/CacheDetailActivity.java
@@ -32,8 +32,6 @@ import cgeo.geocaching.ui.CoordinatesFormatSwitcher;
import cgeo.geocaching.ui.DecryptTextClickListener;
import cgeo.geocaching.ui.EditNoteDialog;
import cgeo.geocaching.ui.EditNoteDialog.EditNoteDialogListener;
-import cgeo.geocaching.ui.Formatter;
-import cgeo.geocaching.ui.HtmlImageCounter;
import cgeo.geocaching.ui.ImagesList;
import cgeo.geocaching.ui.IndexOutOfBoundsAvoidingTextView;
import cgeo.geocaching.ui.LoggingUI;
@@ -43,9 +41,11 @@ import cgeo.geocaching.ui.dialog.Dialogs;
import cgeo.geocaching.ui.logs.CacheLogsViewCreator;
import cgeo.geocaching.utils.CancellableHandler;
import cgeo.geocaching.utils.CryptUtils;
+import cgeo.geocaching.utils.Formatter;
import cgeo.geocaching.utils.ImageUtils;
import cgeo.geocaching.utils.Log;
import cgeo.geocaching.utils.MatcherWrapper;
+import cgeo.geocaching.utils.RxUtils;
import cgeo.geocaching.utils.SimpleCancellableHandler;
import cgeo.geocaching.utils.SimpleHandler;
import cgeo.geocaching.utils.TextUtils;
@@ -56,15 +56,14 @@ import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
+import org.eclipse.jdt.annotation.Nullable;
import rx.Observable;
import rx.Observable.OnSubscribe;
-import rx.Observer;
-import rx.Scheduler.Inner;
import rx.Subscriber;
import rx.android.observables.AndroidObservable;
+import rx.functions.Action0;
import rx.functions.Action1;
-import rx.schedulers.Schedulers;
import rx.subscriptions.CompositeSubscription;
import android.R.color;
@@ -84,6 +83,7 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v4.app.FragmentManager;
+import android.support.v7.view.ActionMode;
import android.text.Editable;
import android.text.Html;
import android.text.Spannable;
@@ -165,14 +165,11 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
private Waypoint selectedWaypoint;
@Override
- public void onCreate(Bundle savedInstanceState) {
+ public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState, R.layout.cachedetail_activity);
createSubscriptions = new CompositeSubscription();
- // set title in code, as the activity needs a hard coded title due to the intent filters
- setTitle(res.getString(R.string.cache));
-
// get parameters
final Bundle extras = getIntent().getExtras();
final Uri uri = getIntent().getData();
@@ -258,6 +255,10 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
return;
}
+ // if we open this cache from a search, let's properly initialize the title bar, even if we don't have cache details
+ cache = DataStore.loadCache(geocode, LoadFlags.LOAD_CACHE_ONLY);
+ updateTitleBar(geocode);
+
final LoadCacheHandler loadCacheHandler = new LoadCacheHandler(this, progress);
try {
@@ -272,22 +273,13 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
// nothing, we lost the window
}
- final ImageView defaultNavigationImageView = (ImageView) findViewById(R.id.defaultNavigation);
- defaultNavigationImageView.setOnLongClickListener(new OnLongClickListener() {
- @Override
- public boolean onLongClick(View v) {
- startDefaultNavigation2();
- return true;
- }
- });
-
final int pageToOpen = savedInstanceState != null ?
savedInstanceState.getInt(STATE_PAGE_INDEX, 0) :
Settings.isOpenLastDetailsPage() ? Settings.getLastDetailsPage() : 1;
createViewPager(pageToOpen, new OnPageSelectedListener() {
@Override
- public void onPageSelected(int position) {
+ public void onPageSelected(final int position) {
if (Settings.isOpenLastDetailsPage()) {
Settings.setLastDetailsPage(position);
}
@@ -300,9 +292,9 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
final String realGeocode = geocode;
final String realGuid = guid;
- Schedulers.io().schedule(new Action1<Inner>() {
+ RxUtils.networkScheduler.createWorker().schedule(new Action0() {
@Override
- public void call(final Inner inner) {
+ public void call() {
search = Geocache.searchByGeocode(realGeocode, StringUtils.isBlank(realGeocode) ? realGuid : null, 0, false, loadCacheHandler);
loadCacheHandler.sendMessage(Message.obtain());
}
@@ -342,53 +334,10 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
@Override
- public void onCreateContextMenu(ContextMenu menu, View view, ContextMenu.ContextMenuInfo info) {
+ public void onCreateContextMenu(final ContextMenu menu, final View view, final ContextMenu.ContextMenuInfo info) {
super.onCreateContextMenu(menu, view, info);
final int viewId = view.getId();
switch (viewId) {
- case R.id.value: // coordinates, gc-code, name
- assert view instanceof TextView;
- clickedItemText = ((TextView) view).getText();
- final CharSequence itemTitle = ((TextView) ((View) view.getParent()).findViewById(R.id.name)).getText();
- buildDetailsContextMenu(menu, clickedItemText, itemTitle, true);
- break;
- case R.id.shortdesc:
- assert view instanceof TextView;
- clickedItemText = ((TextView) view).getText();
- buildDetailsContextMenu(menu, clickedItemText, res.getString(R.string.cache_description), false);
- break;
- case R.id.longdesc:
- assert view instanceof TextView;
- // combine short and long description
- final String shortDesc = cache.getShortDescription();
- if (StringUtils.isBlank(shortDesc)) {
- clickedItemText = ((TextView) view).getText();
- } else {
- clickedItemText = shortDesc + "\n\n" + ((TextView) view).getText();
- }
- buildDetailsContextMenu(menu, clickedItemText, res.getString(R.string.cache_description), false);
- break;
- case R.id.personalnote:
- assert view instanceof TextView;
- clickedItemText = ((TextView) view).getText();
- buildDetailsContextMenu(menu, clickedItemText, res.getString(R.string.cache_personal_note), true);
- break;
- case R.id.hint:
- assert view instanceof TextView;
- clickedItemText = ((TextView) view).getText();
- buildDetailsContextMenu(menu, clickedItemText, res.getString(R.string.cache_hint), false);
- break;
- case R.id.log:
- assert view instanceof TextView;
- clickedItemText = ((TextView) view).getText();
- buildDetailsContextMenu(menu, clickedItemText, res.getString(R.string.cache_logs), false);
- break;
- case R.id.date: // event date
- assert view instanceof TextView;
- clickedItemText = ((TextView) view).getText();
- buildDetailsContextMenu(menu, clickedItemText, res.getString(R.string.cache_event), true);
- menu.findItem(R.id.menu_calendar).setVisible(cache.canBeAddedToCalendar());
- break;
case R.id.waypoint:
menu.setHeaderTitle(selectedWaypoint.getName() + " (" + res.getString(R.string.waypoint) + ")");
getMenuInflater().inflate(R.menu.waypoint_options, menu);
@@ -414,27 +363,27 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
@Override
- public boolean onContextItemSelected(MenuItem item) {
- if (onClipboardItemSelected(item, clickedItemText)) {
- return true;
- }
+ public boolean onContextItemSelected(final MenuItem item) {
switch (item.getItemId()) {
// waypoints
case R.id.menu_waypoint_edit:
if (selectedWaypoint != null) {
+ ensureSaved();
EditWaypointActivity.startActivityEditWaypoint(this, cache, selectedWaypoint.getId());
refreshOnResume = true;
}
return true;
case R.id.menu_waypoint_duplicate:
+ ensureSaved();
if (cache.duplicateWaypoint(selectedWaypoint)) {
- DataStore.saveCache(cache, EnumSet.of(SaveFlag.SAVE_DB));
+ DataStore.saveCache(cache, EnumSet.of(SaveFlag.DB));
notifyDataSetChanged();
}
return true;
case R.id.menu_waypoint_delete:
+ ensureSaved();
if (cache.deleteWaypoint(selectedWaypoint)) {
- DataStore.saveCache(cache, EnumSet.of(SaveFlag.SAVE_DB));
+ DataStore.saveCache(cache, EnumSet.of(SaveFlag.DB));
notifyDataSetChanged();
}
return true;
@@ -454,10 +403,10 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
return true;
case R.id.menu_waypoint_reset_cache_coords:
+ ensureSaved();
if (ConnectorFactory.getConnector(cache).supportsOwnCoordinates()) {
createResetCacheCoordinatesDialog(cache, selectedWaypoint).show();
- }
- else {
+ } else {
final ProgressDialog progressDialog = ProgressDialog.show(this, getString(R.string.cache), getString(R.string.waypoint_reset), true);
final HandlerResetCoordinates handler = new HandlerResetCoordinates(this, progressDialog, false);
new ResetCoordsThread(cache, handler, selectedWaypoint, true, false, progressDialog).start();
@@ -476,20 +425,23 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
@Override
- public boolean onCreateOptionsMenu(Menu menu) {
+ public boolean onCreateOptionsMenu(final Menu menu) {
CacheMenuHandler.addMenuItems(this, menu, cache);
return true;
}
@Override
- public boolean onPrepareOptionsMenu(Menu menu) {
+ public boolean onPrepareOptionsMenu(final Menu menu) {
CacheMenuHandler.onPrepareOptionsMenu(menu, cache);
LoggingUI.onPrepareOptionsMenu(menu, cache);
+ menu.findItem(R.id.menu_store).setVisible(cache != null && !cache.isOffline());
+ menu.findItem(R.id.menu_delete).setVisible(cache != null && cache.isOffline());
+ menu.findItem(R.id.menu_refresh).setVisible(cache != null && cache.isOffline());
return super.onPrepareOptionsMenu(menu);
}
@Override
- public boolean onOptionsItemSelected(MenuItem item) {
+ public boolean onOptionsItemSelected(final MenuItem item) {
if (CacheMenuHandler.onMenuItemSelected(item, this, cache)) {
return true;
}
@@ -497,9 +449,15 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
final int menuItem = item.getItemId();
switch (menuItem) {
- case 0:
- // no menu selected, but a new sub menu shown
- return false;
+ case R.id.menu_delete:
+ dropCache();
+ return true;
+ case R.id.menu_store:
+ storeCache();
+ return true;
+ case R.id.menu_refresh:
+ refreshCache();
+ return true;
default:
if (NavigationAppFactory.onMenuItemSelected(item, this, cache)) {
return true;
@@ -510,14 +468,14 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
}
- return true;
+ return super.onOptionsItemSelected(item);
}
private static final class CacheDetailsGeoDirHandler extends GeoDirHandler {
private final WeakReference<CacheDetailActivity> activityRef;
public CacheDetailsGeoDirHandler(final CacheDetailActivity activity) {
- this.activityRef = new WeakReference<CacheDetailActivity>(activity);
+ this.activityRef = new WeakReference<>(activity);
}
@Override
@@ -539,7 +497,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
private final static class LoadCacheHandler extends SimpleCancellableHandler {
- public LoadCacheHandler(CacheDetailActivity activity, Progress progress) {
+ public LoadCacheHandler(final CacheDetailActivity activity, final Progress progress) {
super(activity, progress);
}
@@ -574,7 +532,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
private void updateStatusMsg(final String msg) {
- CacheDetailActivity activity = ((CacheDetailActivity) activityRef.get());
+ final CacheDetailActivity activity = ((CacheDetailActivity) activityRef.get());
if (activity == null) {
return;
}
@@ -591,6 +549,11 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
private void notifyDataSetChanged() {
+ // This might get called asynchronically when the activity is shut down
+ if (isFinishing()) {
+ return;
+ }
+
if (search == null) {
return;
}
@@ -607,13 +570,17 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
// allow cache to notify CacheDetailActivity when it changes so it can be reloaded
cache.setChangeNotificationHandler(new ChangeNotificationHandler(this, progress));
- // action bar: title and icon
- if (StringUtils.isNotBlank(cache.getName())) {
- setTitle(cache.getName() + " (" + cache.getGeocode() + ')');
- } else {
- setTitle(cache.getGeocode());
- }
- ((TextView) findViewById(R.id.actionbar_title)).setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(cache.getType().markerId), null, null, null);
+ updateTitleBar(null);
+
+ // if we have a newer Android device setup Android Beam for easy cache sharing
+ initializeAndroidBeam(
+ new ActivitySharingInterface() {
+ @Override
+ public String getUri() {
+ return cache.getCgeoUrl();
+ }
+ }
+ );
// reset imagesList so Images view page will be redrawn
imagesList = null;
@@ -622,33 +589,44 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
// rendering done! remove progress popup if any there
invalidateOptionsMenuCompatible();
progress.dismiss();
+
+ Settings.addCacheToHistory(cache.getGeocode());
}
- /**
- * Tries to navigate to the {@link Geocache} of this activity.
- */
- private void startDefaultNavigation() {
- NavigationAppFactory.startDefaultNavigationApplication(1, this, cache);
+ private void updateTitleBar(@Nullable final String geocode) {
+ if (cache == null) {
+ setTitle(StringUtils.isBlank(geocode) ? res.getString(R.string.cache) : geocode);
+ // avoid showing the traditional cache icon from the standard action bar (it may later change to the actual type icon)
+ getSupportActionBar().setIcon(android.R.color.transparent);
+ }
+ else {
+ if (StringUtils.isNotBlank(cache.getName())) {
+ setTitle(cache.getName() + " (" + cache.getGeocode() + ')');
+ } else {
+ setTitle(cache.getGeocode());
+ }
+ getSupportActionBar().setIcon(getResources().getDrawable(cache.getType().markerId));
+ }
}
/**
* Tries to navigate to the {@link Geocache} of this activity.
*/
- private void startDefaultNavigation2() {
- NavigationAppFactory.startDefaultNavigationApplication(2, this, cache);
+ private void startDefaultNavigation() {
+ NavigationAppFactory.startDefaultNavigationApplication(1, this, cache);
}
/**
* Wrapper for the referenced method in the xml-layout.
*/
- public void goDefaultNavigation(@SuppressWarnings("unused") View view) {
+ public void goDefaultNavigation(@SuppressWarnings("unused") final View view) {
startDefaultNavigation();
}
/**
* referenced from XML view
*/
- public void showNavigationMenu(@SuppressWarnings("unused") View view) {
+ public void showNavigationMenu(@SuppressWarnings("unused") final View view) {
NavigationAppFactory.showNavigationMenu(this, cache, null, null, true, true);
}
@@ -660,7 +638,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
if (creator == null) {
return;
}
- final View imageView = creator.getView();
+ final View imageView = creator.getView(null);
if (imageView == null) {
return;
}
@@ -681,7 +659,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
DETAILS(R.string.detail),
DESCRIPTION(R.string.cache_description),
LOGS(R.string.cache_logs),
- LOGSFRIENDS(R.string.cache_logsfriends),
+ LOGSFRIENDS(R.string.cache_logs_friends_and_own),
WAYPOINTS(R.string.cache_waypoints),
INVENTORY(R.string.cache_inventory),
IMAGES(R.string.cache_images);
@@ -723,7 +701,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
attributeBox.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View v) {
+ public void onClick(final View v) {
// toggle between attribute icons and descriptions
toggleAttributeDisplay(attributeBox, attributeBoxMaxWidth);
}
@@ -748,7 +726,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
* lazy-creates the layout holding the icons of the caches attributes
* and makes it visible
*/
- private void showAttributeIcons(LinearLayout attribBox, int parentWidth) {
+ private void showAttributeIcons(final LinearLayout attribBox, final int parentWidth) {
if (attributeIconsLayout == null) {
attributeIconsLayout = createAttributeIconsLayout(parentWidth);
// no matching icons found? show text
@@ -766,9 +744,9 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
* lazy-creates the layout holding the descriptions of the caches attributes
* and makes it visible
*/
- private void showAttributeDescriptions(LinearLayout attribBox) {
+ private void showAttributeDescriptions(final LinearLayout attribBox) {
if (attributeDescriptionsLayout == null) {
- attributeDescriptionsLayout = createAttributeDescriptionsLayout();
+ attributeDescriptionsLayout = createAttributeDescriptionsLayout(attribBox);
}
attribBox.removeAllViews();
attribBox.addView(attributeDescriptionsLayout);
@@ -778,7 +756,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
/**
* toggle attribute descriptions and icons
*/
- private void toggleAttributeDisplay(LinearLayout attribBox, int parentWidth) {
+ private void toggleAttributeDisplay(final LinearLayout attribBox, final int parentWidth) {
// Don't toggle when there are no icons to show.
if (noAttributeIconsFound) {
return;
@@ -792,7 +770,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
}
- private ViewGroup createAttributeIconsLayout(int parentWidth) {
+ private ViewGroup createAttributeIconsLayout(final int parentWidth) {
final LinearLayout rows = new LinearLayout(CacheDetailActivity.this);
rows.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
rows.setOrientation(LinearLayout.VERTICAL);
@@ -806,7 +784,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
// check if another attribute icon fits in this row
attributeRow.measure(0, 0);
final int rowWidth = attributeRow.getMeasuredWidth();
- final FrameLayout fl = (FrameLayout) getLayoutInflater().inflate(R.layout.attribute_image, null);
+ final FrameLayout fl = (FrameLayout) getLayoutInflater().inflate(R.layout.attribute_image, attributeRow, false);
final ImageView iv = (ImageView) fl.getChildAt(0);
if ((parentWidth - rowWidth) < iv.getLayoutParams().width) {
// make a new row
@@ -814,20 +792,20 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
rows.addView(attributeRow);
}
- final boolean strikethru = !CacheAttribute.isEnabled(attributeName);
+ final boolean strikeThrough = !CacheAttribute.isEnabled(attributeName);
final CacheAttribute attrib = CacheAttribute.getByRawName(CacheAttribute.trimAttributeName(attributeName));
if (attrib != null) {
noAttributeIconsFound = false;
Drawable d = res.getDrawable(attrib.drawableId);
iv.setImageDrawable(d);
// strike through?
- if (strikethru) {
- // generate strikethru image with same properties as attribute image
- final ImageView strikethruImage = new ImageView(CacheDetailActivity.this);
- strikethruImage.setLayoutParams(iv.getLayoutParams());
+ if (strikeThrough) {
+ // generate strike through image with same properties as attribute image
+ final ImageView strikeThroughImage = new ImageView(CacheDetailActivity.this);
+ strikeThroughImage.setLayoutParams(iv.getLayoutParams());
d = res.getDrawable(R.drawable.attribute__strikethru);
- strikethruImage.setImageDrawable(d);
- fl.addView(strikethruImage);
+ strikeThroughImage.setImageDrawable(d);
+ fl.addView(strikeThroughImage);
}
} else {
final Drawable d = res.getDrawable(R.drawable.attribute_unknown);
@@ -848,16 +826,16 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
return rowLayout;
}
- private ViewGroup createAttributeDescriptionsLayout() {
+ private ViewGroup createAttributeDescriptionsLayout(final LinearLayout parentView) {
final LinearLayout descriptions = (LinearLayout) getLayoutInflater().inflate(
- R.layout.attribute_descriptions, null);
+ R.layout.attribute_descriptions, parentView, false);
final TextView attribView = (TextView) descriptions.getChildAt(0);
final StringBuilder buffer = new StringBuilder();
for (String attributeName : cache.getAttributes()) {
final boolean enabled = CacheAttribute.isEnabled(attributeName);
// search for a translation of the attribute
- CacheAttribute attrib = CacheAttribute.getByRawName(CacheAttribute.trimAttributeName(attributeName));
+ final CacheAttribute attrib = CacheAttribute.getByRawName(CacheAttribute.trimAttributeName(attributeName));
if (attrib != null) {
attributeName = attrib.getL10n(enabled);
}
@@ -873,6 +851,54 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
}
+ private void refreshCache() {
+ if (progress.isShowing()) {
+ showToast(res.getString(R.string.err_detail_still_working));
+ return;
+ }
+
+ if (!Network.isNetworkConnected(getApplicationContext())) {
+ showToast(getString(R.string.err_server));
+ return;
+ }
+
+ final RefreshCacheHandler refreshCacheHandler = new RefreshCacheHandler(this, progress);
+
+ progress.show(this, res.getString(R.string.cache_dialog_refresh_title), res.getString(R.string.cache_dialog_refresh_message), true, refreshCacheHandler.cancelMessage());
+
+ cache.refresh(refreshCacheHandler, RxUtils.networkScheduler);
+ }
+
+ private void dropCache() {
+ if (progress.isShowing()) {
+ showToast(res.getString(R.string.err_detail_still_working));
+ return;
+ }
+
+ progress.show(this, res.getString(R.string.cache_dialog_offline_drop_title), res.getString(R.string.cache_dialog_offline_drop_message), true, null);
+ cache.drop(new ChangeNotificationHandler(this, progress), RxUtils.networkScheduler);
+ }
+
+ private void storeCache() {
+ if (progress.isShowing()) {
+ showToast(res.getString(R.string.err_detail_still_working));
+ return;
+ }
+
+ if (Settings.getChooseList()) {
+ // let user select list to store cache in
+ new StoredList.UserInterface(this).promptForListSelection(R.string.list_title,
+ new Action1<Integer>() {
+ @Override
+ public void call(final Integer selectedListId) {
+ storeCache(selectedListId, new StoreCacheHandler(CacheDetailActivity.this, progress));
+ }
+ }, true, StoredList.TEMPORARY_LIST_ID);
+ } else {
+ storeCache(StoredList.TEMPORARY_LIST_ID, new StoreCacheHandler(this, progress));
+ }
+ }
+
/**
* Creator for details-view.
*/
@@ -885,32 +911,33 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
private Thread watchlistThread;
@Override
- public ScrollView getDispatchedView() {
+ public ScrollView getDispatchedView(final ViewGroup parentView) {
if (cache == null) {
// something is really wrong
return null;
}
- view = (ScrollView) getLayoutInflater().inflate(R.layout.cachedetail_details_page, null);
+ view = (ScrollView) getLayoutInflater().inflate(R.layout.cachedetail_details_page, parentView, false);
// Start loading preview map
- AndroidObservable.bindActivity(CacheDetailActivity.this, previewMap).subscribe(new Action1<BitmapDrawable>() {
- @Override
- public void call(final BitmapDrawable image) {
- final Bitmap bitmap = image.getBitmap();
- if (bitmap != null && bitmap.getWidth() > 10) {
- final ImageView imageView = (ImageView) view.findViewById(R.id.map_preview);
- imageView.setImageDrawable(image);
- view.findViewById(R.id.map_preview_box).setVisibility(View.VISIBLE);
- }
- }
- }, Schedulers.io());
+ AndroidObservable.bindActivity(CacheDetailActivity.this, previewMap).subscribeOn(RxUtils.networkScheduler)
+ .subscribe(new Action1<BitmapDrawable>() {
+ @Override
+ public void call(final BitmapDrawable image) {
+ final Bitmap bitmap = image.getBitmap();
+ if (bitmap != null && bitmap.getWidth() > 10) {
+ final ImageView imageView = ButterKnife.findById(view, R.id.map_preview);
+ imageView.setImageDrawable(image);
+ view.findViewById(R.id.map_preview_box).setVisibility(View.VISIBLE);
+ }
+ }
+ });
- detailsList = (LinearLayout) view.findViewById(R.id.details_list);
+ detailsList = ButterKnife.findById(view, R.id.details_list);
final CacheDetailsCreator details = new CacheDetailsCreator(CacheDetailActivity.this, detailsList);
// cache name (full name)
- final Spannable span = (new Spannable.Factory()).newSpannable(Html.fromHtml(cache.getName()).toString());
+ final Spannable span = (new Spannable.Factory()).newSpannable(cache.getName());
if (cache.isDisabled() || cache.isArchived()) { // strike
span.setSpan(new StrikethroughSpan(), 0, span.toString().length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}
@@ -918,10 +945,10 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
span.setSpan(new ForegroundColorSpan(res.getColor(R.color.archived_cache_color)), 0, span.toString().length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
}
- registerForContextMenu(details.add(R.string.cache_name, span));
+ addContextMenu(details.add(R.string.cache_name, span));
details.add(R.string.cache_type, cache.getType().getL10n());
details.addSize(cache);
- registerForContextMenu(details.add(R.string.cache_geocode, cache.getGeocode()));
+ addContextMenu(details.add(R.string.cache_geocode, cache.getGeocode()));
details.addCacheState(cache);
details.addDistance(cache, cacheDistanceView);
@@ -955,7 +982,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
// hidden or event date
final TextView hiddenView = details.addHiddenDate(cache);
if (hiddenView != null) {
- registerForContextMenu(hiddenView);
+ addContextMenu(hiddenView);
}
// cache location
@@ -967,33 +994,34 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
if (cache.getCoords() != null) {
final TextView valueView = details.add(R.string.cache_coordinates, cache.getCoords().toString());
valueView.setOnClickListener(new CoordinatesFormatSwitcher(cache.getCoords()));
- registerForContextMenu(valueView);
+ addContextMenu(valueView);
}
// cache attributes
if (!cache.getAttributes().isEmpty()) {
- new AttributeViewBuilder().fillView((LinearLayout) view.findViewById(R.id.attributes_innerbox));
+ final LinearLayout innerLayout = ButterKnife.findById(view, R.id.attributes_innerbox);
+ new AttributeViewBuilder().fillView(innerLayout);
view.findViewById(R.id.attributes_box).setVisibility(View.VISIBLE);
}
updateOfflineBox(view, cache, res, new RefreshCacheClickListener(), new DropCacheClickListener(), new StoreCacheClickListener());
// watchlist
- final Button buttonWatchlistAdd = (Button) view.findViewById(R.id.add_to_watchlist);
- final Button buttonWatchlistRemove = (Button) view.findViewById(R.id.remove_from_watchlist);
+ final Button buttonWatchlistAdd = ButterKnife.findById(view, R.id.add_to_watchlist);
+ final Button buttonWatchlistRemove = ButterKnife.findById(view, R.id.remove_from_watchlist);
buttonWatchlistAdd.setOnClickListener(new AddToWatchlistClickListener());
buttonWatchlistRemove.setOnClickListener(new RemoveFromWatchlistClickListener());
updateWatchlistBox();
// favorite points
- final Button buttonFavPointAdd = (Button) view.findViewById(R.id.add_to_favpoint);
- final Button buttonFavPointRemove = (Button) view.findViewById(R.id.remove_from_favpoint);
+ final Button buttonFavPointAdd = ButterKnife.findById(view, R.id.add_to_favpoint);
+ final Button buttonFavPointRemove = ButterKnife.findById(view, R.id.remove_from_favpoint);
buttonFavPointAdd.setOnClickListener(new FavoriteAddClickListener());
buttonFavPointRemove.setOnClickListener(new FavoriteRemoveClickListener());
updateFavPointBox();
// list
- final Button buttonChangeList = (Button) view.findViewById(R.id.change_list);
+ final Button buttonChangeList = ButterKnife.findById(view, R.id.change_list);
buttonChangeList.setOnClickListener(new ChangeListClickListener());
updateListBox();
@@ -1002,7 +1030,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
final String license = connector.getLicenseText(cache);
if (StringUtils.isNotBlank(license)) {
view.findViewById(R.id.license_box).setVisibility(View.VISIBLE);
- final TextView licenseView = ((TextView) view.findViewById(R.id.license));
+ final TextView licenseView = (ButterKnife.findById(view, R.id.license));
licenseView.setText(Html.fromHtml(license), BufferType.SPANNABLE);
licenseView.setClickable(true);
licenseView.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
@@ -1015,59 +1043,23 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
private class StoreCacheClickListener implements View.OnClickListener {
@Override
- public void onClick(View arg0) {
- if (progress.isShowing()) {
- showToast(res.getString(R.string.err_detail_still_working));
- return;
- }
-
- if (Settings.getChooseList()) {
- // let user select list to store cache in
- new StoredList.UserInterface(CacheDetailActivity.this).promptForListSelection(R.string.list_title,
- new Action1<Integer>() {
- @Override
- public void call(final Integer selectedListId) {
- storeCache(selectedListId, new StoreCacheHandler(CacheDetailActivity.this, progress));
- }
- }, true, StoredList.TEMPORARY_LIST_ID);
- } else {
- storeCache(StoredList.TEMPORARY_LIST_ID, new StoreCacheHandler(CacheDetailActivity.this, progress));
- }
+ public void onClick(final View arg0) {
+ storeCache();
}
}
private class RefreshCacheClickListener implements View.OnClickListener {
@Override
- public void onClick(View arg0) {
- if (progress.isShowing()) {
- showToast(res.getString(R.string.err_detail_still_working));
- return;
- }
-
- if (!Network.isNetworkConnected(getApplicationContext())) {
- showToast(getString(R.string.err_server));
- return;
- }
-
- final RefreshCacheHandler refreshCacheHandler = new RefreshCacheHandler(CacheDetailActivity.this, progress);
-
- progress.show(CacheDetailActivity.this, res.getString(R.string.cache_dialog_refresh_title), res.getString(R.string.cache_dialog_refresh_message), true, refreshCacheHandler.cancelMessage());
-
- cache.refresh(cache.getListId(), refreshCacheHandler, Schedulers.io());
+ public void onClick(final View arg0) {
+ refreshCache();
}
}
private class DropCacheClickListener implements View.OnClickListener {
@Override
- public void onClick(View arg0) {
- if (progress.isShowing()) {
- showToast(res.getString(R.string.err_detail_still_working));
- return;
- }
-
- progress.show(CacheDetailActivity.this, res.getString(R.string.cache_dialog_offline_drop_title), res.getString(R.string.cache_dialog_offline_drop_message), true, null);
- cache.drop(new ChangeNotificationHandler(CacheDetailActivity.this, progress), Schedulers.io());
+ public void onClick(final View arg0) {
+ dropCache();
}
}
@@ -1075,7 +1067,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
* Abstract Listener for add / remove buttons for watchlist
*/
private abstract class AbstractWatchlistClickListener implements View.OnClickListener {
- public void doExecute(int titleId, int messageId, Thread thread) {
+ public void doExecute(final int titleId, final int messageId, final Thread thread) {
if (progress.isShowing()) {
showToast(res.getString(R.string.err_watchlist_still_managing));
return;
@@ -1096,7 +1088,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
*/
private class AddToWatchlistClickListener extends AbstractWatchlistClickListener {
@Override
- public void onClick(View arg0) {
+ public void onClick(final View arg0) {
doExecute(R.string.cache_dialog_watchlist_add_title,
R.string.cache_dialog_watchlist_add_message,
new WatchlistAddThread(new SimpleUpdateHandler(CacheDetailActivity.this, progress)));
@@ -1108,7 +1100,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
*/
private class RemoveFromWatchlistClickListener extends AbstractWatchlistClickListener {
@Override
- public void onClick(View arg0) {
+ public void onClick(final View arg0) {
doExecute(R.string.cache_dialog_watchlist_remove_title,
R.string.cache_dialog_watchlist_remove_message,
new WatchlistRemoveThread(new SimpleUpdateHandler(CacheDetailActivity.this, progress)));
@@ -1119,7 +1111,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
private class WatchlistAddThread extends Thread {
private final Handler handler;
- public WatchlistAddThread(Handler handler) {
+ public WatchlistAddThread(final Handler handler) {
this.handler = handler;
}
@@ -1131,7 +1123,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
msg = Message.obtain(handler, MESSAGE_SUCCEEDED);
} else {
msg = Message.obtain(handler, MESSAGE_FAILED);
- Bundle bundle = new Bundle();
+ final Bundle bundle = new Bundle();
bundle.putString(SimpleCancellableHandler.MESSAGE_TEXT, res.getString(R.string.err_watchlist_failed));
msg.setData(bundle);
}
@@ -1143,7 +1135,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
private class WatchlistRemoveThread extends Thread {
private final Handler handler;
- public WatchlistRemoveThread(Handler handler) {
+ public WatchlistRemoveThread(final Handler handler) {
this.handler = handler;
}
@@ -1155,7 +1147,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
msg = Message.obtain(handler, MESSAGE_SUCCEEDED);
} else {
msg = Message.obtain(handler, MESSAGE_FAILED);
- Bundle bundle = new Bundle();
+ final Bundle bundle = new Bundle();
bundle.putString(SimpleCancellableHandler.MESSAGE_TEXT, res.getString(R.string.err_watchlist_failed));
msg.setData(bundle);
}
@@ -1167,7 +1159,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
private class FavoriteAddThread extends Thread {
private final Handler handler;
- public FavoriteAddThread(Handler handler) {
+ public FavoriteAddThread(final Handler handler) {
this.handler = handler;
}
@@ -1179,7 +1171,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
msg = Message.obtain(handler, MESSAGE_SUCCEEDED);
} else {
msg = Message.obtain(handler, MESSAGE_FAILED);
- Bundle bundle = new Bundle();
+ final Bundle bundle = new Bundle();
bundle.putString(SimpleCancellableHandler.MESSAGE_TEXT, res.getString(R.string.err_favorite_failed));
msg.setData(bundle);
}
@@ -1191,7 +1183,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
private class FavoriteRemoveThread extends Thread {
private final Handler handler;
- public FavoriteRemoveThread(Handler handler) {
+ public FavoriteRemoveThread(final Handler handler) {
this.handler = handler;
}
@@ -1203,7 +1195,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
msg = Message.obtain(handler, MESSAGE_SUCCEEDED);
} else {
msg = Message.obtain(handler, MESSAGE_FAILED);
- Bundle bundle = new Bundle();
+ final Bundle bundle = new Bundle();
bundle.putString(SimpleCancellableHandler.MESSAGE_TEXT, res.getString(R.string.err_favorite_failed));
msg.setData(bundle);
}
@@ -1216,7 +1208,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
*/
private class FavoriteAddClickListener extends AbstractWatchlistClickListener {
@Override
- public void onClick(View arg0) {
+ public void onClick(final View arg0) {
doExecute(R.string.cache_dialog_favorite_add_title,
R.string.cache_dialog_favorite_add_message,
new FavoriteAddThread(new SimpleUpdateHandler(CacheDetailActivity.this, progress)));
@@ -1228,7 +1220,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
*/
private class FavoriteRemoveClickListener extends AbstractWatchlistClickListener {
@Override
- public void onClick(View arg0) {
+ public void onClick(final View arg0) {
doExecute(R.string.cache_dialog_favorite_remove_title,
R.string.cache_dialog_favorite_remove_message,
new FavoriteRemoveThread(new SimpleUpdateHandler(CacheDetailActivity.this, progress)));
@@ -1240,7 +1232,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
*/
private class ChangeListClickListener implements View.OnClickListener {
@Override
- public void onClick(View view) {
+ public void onClick(final View view) {
new StoredList.UserInterface(CacheDetailActivity.this).promptForListSelection(R.string.list_title,
new Action1<Integer>() {
@Override
@@ -1257,7 +1249,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
* @param listId
* the ID of the list
*/
- public void switchListById(int listId) {
+ public void switchListById(final int listId) {
if (listId < 0) {
return;
}
@@ -1271,15 +1263,15 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
* shows/hides buttons, sets text in watchlist box
*/
private void updateWatchlistBox() {
- final LinearLayout layout = (LinearLayout) view.findViewById(R.id.watchlist_box);
+ final LinearLayout layout = ButterKnife.findById(view, R.id.watchlist_box);
final boolean supportsWatchList = cache.supportsWatchList();
layout.setVisibility(supportsWatchList ? View.VISIBLE : View.GONE);
if (!supportsWatchList) {
return;
}
- final Button buttonAdd = (Button) view.findViewById(R.id.add_to_watchlist);
- final Button buttonRemove = (Button) view.findViewById(R.id.remove_from_watchlist);
- final TextView text = (TextView) view.findViewById(R.id.watchlist_text);
+ final Button buttonAdd = ButterKnife.findById(view, R.id.add_to_watchlist);
+ final Button buttonRemove = ButterKnife.findById(view, R.id.remove_from_watchlist);
+ final TextView text = ButterKnife.findById(view, R.id.watchlist_text);
if (cache.isOnWatchlist() || cache.isOwner()) {
buttonAdd.setVisibility(View.GONE);
@@ -1305,15 +1297,15 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
* shows/hides buttons, sets text in watchlist box
*/
private void updateFavPointBox() {
- final LinearLayout layout = (LinearLayout) view.findViewById(R.id.favpoint_box);
+ final LinearLayout layout = ButterKnife.findById(view, R.id.favpoint_box);
final boolean supportsFavoritePoints = cache.supportsFavoritePoints();
layout.setVisibility(supportsFavoritePoints ? View.VISIBLE : View.GONE);
if (!supportsFavoritePoints || cache.isOwner() || !Settings.isGCPremiumMember()) {
return;
}
- final Button buttonAdd = (Button) view.findViewById(R.id.add_to_favpoint);
- final Button buttonRemove = (Button) view.findViewById(R.id.remove_from_favpoint);
- final TextView text = (TextView) view.findViewById(R.id.favpoint_text);
+ final Button buttonAdd = ButterKnife.findById(view, R.id.add_to_favpoint);
+ final Button buttonRemove = ButterKnife.findById(view, R.id.remove_from_favpoint);
+ final TextView text = ButterKnife.findById(view, R.id.favpoint_text);
if (cache.isFavorite()) {
buttonAdd.setVisibility(View.GONE);
@@ -1345,7 +1337,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
box.setVisibility(View.VISIBLE);
// update text
- final TextView text = (TextView) view.findViewById(R.id.list_text);
+ final TextView text = ButterKnife.findById(view, R.id.list_text);
final StoredList list = DataStore.getList(cache.getListId());
if (list != null) {
text.setText(res.getString(R.string.cache_list_text) + " " + list.title);
@@ -1360,7 +1352,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
}
- private Observable<BitmapDrawable> previewMap = Observable.create(new OnSubscribe<BitmapDrawable>() {
+ private final Observable<BitmapDrawable> previewMap = Observable.create(new OnSubscribe<BitmapDrawable>() {
@Override
public void call(final Subscriber<? super BitmapDrawable> subscriber) {
try {
@@ -1369,7 +1361,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
if (image == null) {
if (Settings.isStoreOfflineMaps() && cache.getCoords() != null) {
- StaticMapsProvider.storeCachePreviewMap(cache);
+ RxUtils.waitForCompletion(StaticMapsProvider.storeCachePreviewMap(cache));
image = StaticMapsProvider.getPreviewMap(cache);
}
}
@@ -1395,13 +1387,13 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
@InjectView(R.id.loading) protected View loadingView;
@Override
- public ScrollView getDispatchedView() {
+ public ScrollView getDispatchedView(final ViewGroup parentView) {
if (cache == null) {
// something is really wrong
return null;
}
- view = (ScrollView) getLayoutInflater().inflate(R.layout.cachedetail_description_page, null);
+ view = (ScrollView) getLayoutInflater().inflate(R.layout.cachedetail_description_page, parentView, false);
ButterKnife.inject(this, view);
// cache short description
@@ -1417,7 +1409,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
showDesc.setVisibility(View.VISIBLE);
showDesc.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View arg0) {
+ public void onClick(final View arg0) {
loadLongDescription();
}
});
@@ -1427,24 +1419,21 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
// cache personal note
setPersonalNote(personalNoteView, cache.getPersonalNote());
personalNoteView.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
- registerForContextMenu(personalNoteView);
- final Button personalNoteEdit = (Button) view.findViewById(R.id.edit_personalnote);
+ addContextMenu(personalNoteView);
+ final Button personalNoteEdit = ButterKnife.findById(view, R.id.edit_personalnote);
personalNoteEdit.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View v) {
- if (cache.isOffline()) {
- editPersonalNote(cache, CacheDetailActivity.this);
- } else {
- warnPersonalNoteNeedsStoring();
- }
+ public void onClick(final View v) {
+ ensureSaved();
+ editPersonalNote(cache, CacheDetailActivity.this);
}
});
- final Button personalNoteUpload = (Button) view.findViewById(R.id.upload_personalnote);
+ final Button personalNoteUpload = ButterKnife.findById(view, R.id.upload_personalnote);
if (cache.isOffline() && ConnectorFactory.getConnector(cache).supportsPersonalNote()) {
personalNoteUpload.setVisibility(View.VISIBLE);
personalNoteUpload.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View v) {
+ public void onClick(final View v) {
if (StringUtils.length(cache.getPersonalNote()) > GCConstants.PERSONAL_NOTE_MAX_CHARS) {
warnPersonalNoteExceedsLimit();
} else {
@@ -1464,7 +1453,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
hintBoxView.setVisibility(View.GONE);
}
- final TextView hintView = ((TextView) view.findViewById(R.id.hint));
+ final TextView hintView = (ButterKnife.findById(view, R.id.hint));
if (StringUtils.isNotBlank(cache.getHint())) {
if (TextUtils.containsHtml(cache.getHint())) {
hintView.setText(Html.fromHtml(cache.getHint(), new HtmlImage(cache.getGeocode(), false, cache.getListId(), false), null), TextView.BufferType.SPANNABLE);
@@ -1478,7 +1467,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
hintView.setOnClickListener(new DecryptTextClickListener(hintView));
hintBoxView.setOnClickListener(new DecryptTextClickListener(hintView));
hintBoxView.setClickable(true);
- registerForContextMenu(hintView);
+ addContextMenu(hintView);
} else {
hintView.setVisibility(View.GONE);
hintView.setClickable(false);
@@ -1487,13 +1476,13 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
hintBoxView.setOnClickListener(null);
}
- final TextView spoilerlinkView = ((TextView) view.findViewById(R.id.hint_spoilerlink));
+ final TextView spoilerlinkView = (ButterKnife.findById(view, R.id.hint_spoilerlink));
if (CollectionUtils.isNotEmpty(cache.getSpoilers())) {
spoilerlinkView.setVisibility(View.VISIBLE);
spoilerlinkView.setClickable(true);
spoilerlinkView.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View arg0) {
+ public void onClick(final View arg0) {
if (cache == null || CollectionUtils.isEmpty(cache.getSpoilers())) {
showToast(res.getString(R.string.err_detail_no_spoiler));
return;
@@ -1516,7 +1505,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
private void uploadPersonalNote() {
final SimpleCancellableHandler myHandler = new SimpleCancellableHandler(CacheDetailActivity.this, progress);
- Message cancelMessage = myHandler.cancelMessage(res.getString(R.string.cache_personal_note_upload_cancelled));
+ final Message cancelMessage = myHandler.cancelMessage(res.getString(R.string.cache_personal_note_upload_cancelled));
progress.show(CacheDetailActivity.this, res.getString(R.string.cache_personal_note_uploading), res.getString(R.string.cache_personal_note_uploading), true, cancelMessage);
if (currentThread != null) {
@@ -1533,30 +1522,6 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
final String longDescription = cache.getDescription();
loadDescription(longDescription, longDescView, loadingView);
-
- // Hide the short description, if it is contained somewhere at the start of the long description.
- if (shortDescView != null) {
- final String shortDescription = cache.getShortDescription();
- if (StringUtils.isNotBlank(shortDescription)) {
- final int index = longDescription.indexOf(shortDescription);
- if (index >= 0 && index < 200) {
- shortDescView.setVisibility(View.GONE);
- }
- }
- }
- }
-
- private void warnPersonalNoteNeedsStoring() {
- Dialogs.confirm(CacheDetailActivity.this, R.string.cache_personal_note_unstored, R.string.cache_personal_note_store,
- new DialogInterface.OnClickListener() {
-
- @Override
- public void onClick(DialogInterface dialog, int which) {
- dialog.dismiss();
- storeCache(StoredList.STANDARD_LIST_ID, new StoreCachePersonalNoteHandler(CacheDetailActivity.this, progress));
- }
-
- });
}
private void warnPersonalNoteExceedsLimit() {
@@ -1564,7 +1529,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int which) {
+ public void onClick(final DialogInterface dialog, final int which) {
dialog.dismiss();
uploadPersonalNote();
}
@@ -1574,141 +1539,130 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
- /**
+ // If description has an HTML construct which may be problematic to render, add a note at the end of the long description.
+ // Technically, it may not be a table, but a pre, which has the same problems as a table, so the message is ok even though
+ // sometimes technically incorrect.
+ private void addWarning(final UnknownTagsHandler unknownTagsHandler, final Spanned description) {
+ if (unknownTagsHandler.isProblematicDetected()) {
+ final int startPos = description.length();
+ final IConnector connector = ConnectorFactory.getConnector(cache);
+ final Spanned tableNote = Html.fromHtml(res.getString(R.string.cache_description_table_note, "<a href=\"" + cache.getUrl() + "\">" + connector.getName() + "</a>"));
+ ((Editable) description).append("\n\n").append(tableNote);
+ ((Editable) description).setSpan(new StyleSpan(Typeface.ITALIC), startPos, description.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
+ }
+ }
+ /**
* Load the description in the background.
- * @param descriptionString the HTML description as retrieved from the connector
- * @param descriptionView the view to fill
- * @param loadingIndicatorView the loading indicator view, will be hidden when completed
- */
+ * @param descriptionString the HTML description as retrieved from the connector
+ * @param descriptionView the view to fill
+ * @param loadingIndicatorView the loading indicator view, will be hidden when completed
+ */
private void loadDescription(final String descriptionString, final IndexOutOfBoundsAvoidingTextView descriptionView, final View loadingIndicatorView) {
- // The producer produces successives (without then with images) versions of the description.
- final Observable<Spanned> producer = Observable.create(new OnSubscribe<Spanned>() {
- @Override
- public void call(final Subscriber<? super Spanned> subscriber) {
+ try {
+ final UnknownTagsHandler unknownTagsHandler = new UnknownTagsHandler();
+ final Spanned description = Html.fromHtml(descriptionString, new HtmlImage(cache.getGeocode(), true, cache.getListId(), false, descriptionView), unknownTagsHandler);
+ addWarning(unknownTagsHandler, description);
+ if (StringUtils.isNotBlank(descriptionString)) {
try {
- // Fast preview: parse only HTML without loading any images
- final HtmlImageCounter imageCounter = new HtmlImageCounter();
- final UnknownTagsHandler unknownTagsHandler = new UnknownTagsHandler();
- Spanned description = Html.fromHtml(descriptionString, imageCounter, unknownTagsHandler);
- addWarning(unknownTagsHandler, description);
- subscriber.onNext(description);
-
- if (imageCounter.getImageCount() > 0) {
- // Complete view: parse again with loading images - if necessary ! If there are any images causing problems the user can see at least the preview
- description = Html.fromHtml(descriptionString, new HtmlImage(cache.getGeocode(), true, cache.getListId(), false), unknownTagsHandler);
- addWarning(unknownTagsHandler, description);
- subscriber.onNext(description);
- }
-
- subscriber.onCompleted();
+ descriptionView.setText(description, TextView.BufferType.SPANNABLE);
} catch (final Exception e) {
- Log.e("loadDescription", e);
- subscriber.onError(e);
+ // On 4.1, there is sometimes a crash on measuring the layout: https://code.google.com/p/android/issues/detail?id=35412
+ Log.e("Android bug setting text: ", e);
+ // remove the formatting by converting to a simple string
+ descriptionView.setText(description.toString());
}
+ descriptionView.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
+ fixTextColor(descriptionString, descriptionView);
+ descriptionView.setVisibility(View.VISIBLE);
+ addContextMenu(descriptionView);
+ potentiallyHideShortDescription();
}
-
- // If description has an HTML construct which may be problematic to render, add a note at the end of the long description.
- // Technically, it may not be a table, but a pre, which has the same problems as a table, so the message is ok even though
- // sometimes technically incorrect.
- private void addWarning(final UnknownTagsHandler unknownTagsHandler, final Spanned description) {
- if (unknownTagsHandler.isProblematicDetected()) {
- final int startPos = description.length();
- final IConnector connector = ConnectorFactory.getConnector(cache);
- final Spanned tableNote = Html.fromHtml(res.getString(R.string.cache_description_table_note, "<a href=\"" + cache.getUrl() + "\">" + connector.getName() + "</a>"));
- ((Editable) description).append("\n\n").append(tableNote);
- ((Editable) description).setSpan(new StyleSpan(Typeface.ITALIC), startPos, description.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
- }
+ if (null != loadingIndicatorView) {
+ loadingIndicatorView.setVisibility(View.GONE);
}
- });
+ } catch (final Exception e) {
+ showToast(res.getString(R.string.err_load_descr_failed));
+ }
+ }
- AndroidObservable.bindActivity(this, producer).subscribe(new Observer<Spanned>() {
- @Override
- public void onCompleted() {
- if (null != loadingIndicatorView) {
- loadingIndicatorView.setVisibility(View.GONE);
- }
- }
+ private static void fixTextColor(final String descriptionString, final IndexOutOfBoundsAvoidingTextView descriptionView) {
+ int backcolor;
+ if (Settings.isLightSkin()) {
+ backcolor = color.white;
- @Override
- public void onError(final Throwable throwable) {
- showToast(res.getString(R.string.err_load_descr_failed));
+ for (final Pattern pattern : LIGHT_COLOR_PATTERNS) {
+ final MatcherWrapper matcher = new MatcherWrapper(pattern, descriptionString);
+ if (matcher.find()) {
+ descriptionView.setBackgroundResource(color.darker_gray);
+ return;
+ }
}
+ } else {
+ backcolor = color.black;
- @Override
- public void onNext(final Spanned description) {
- if (StringUtils.isNotBlank(descriptionString)) {
- try {
- descriptionView.setText(description, TextView.BufferType.SPANNABLE);
- } catch (final Exception e) {
- // On 4.1, there is sometimes a crash on measuring the layout: https://code.google.com/p/android/issues/detail?id=35412
- Log.e("Android bug setting text: ", e);
- // remove the formatting by converting to a simple string
- descriptionView.setText(description.toString());
- }
- descriptionView.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
- fixTextColor(descriptionString);
- descriptionView.setVisibility(View.VISIBLE);
- registerForContextMenu(descriptionView);
+ for (final Pattern pattern : DARK_COLOR_PATTERNS) {
+ final MatcherWrapper matcher = new MatcherWrapper(pattern, descriptionString);
+ if (matcher.find()) {
+ descriptionView.setBackgroundResource(color.darker_gray);
+ return;
}
}
+ }
+ descriptionView.setBackgroundResource(backcolor);
+ }
- /**
- * Handle caches with black font color in dark skin and white font color in light skin
- * by changing background color of the view
- *
- * @param text
- * to be checked
- */
- private void fixTextColor(final String text) {
- int backcolor;
- if (Settings.isLightSkin()) {
- backcolor = color.white;
-
- for (final Pattern pattern : LIGHT_COLOR_PATTERNS) {
- final MatcherWrapper matcher = new MatcherWrapper(pattern, text);
- if (matcher.find()) {
- descriptionView.setBackgroundResource(color.darker_gray);
- return;
- }
- }
- } else {
- backcolor = color.black;
-
- for (final Pattern pattern : DARK_COLOR_PATTERNS) {
- final MatcherWrapper matcher = new MatcherWrapper(pattern, text);
- if (matcher.find()) {
- descriptionView.setBackgroundResource(color.darker_gray);
- return;
- }
- }
- }
- descriptionView.setBackgroundResource(backcolor);
+ /**
+ * Hide the short description, if it is contained somewhere at the start of the long description.
+ */
+ public void potentiallyHideShortDescription() {
+ final View shortView = ButterKnife.findById(this, R.id.shortdesc);
+ if (shortView == null) {
+ return;
+ }
+ if (shortView.getVisibility() == View.GONE) {
+ return;
+ }
+ final String shortDescription = cache.getShortDescription();
+ if (StringUtils.isNotBlank(shortDescription)) {
+ final int index = StringUtils.indexOf(cache.getDescription(), shortDescription);
+ // allow up to 200 characters of HTML formatting
+ if (index >= 0 && index < 200) {
+ shortView.setVisibility(View.GONE);
}
- }, Schedulers.io());
+ }
+ }
+
+ private void ensureSaved() {
+ if (!cache.isOffline()) {
+ showToast(getString(R.string.info_cache_saved));
+ cache.setListId(StoredList.STANDARD_LIST_ID);
+ DataStore.saveCache(cache, LoadFlags.SAVE_ALL);
+ }
}
private class WaypointsViewCreator extends AbstractCachingPageViewCreator<ListView> {
private final int VISITED_INSET = (int) (6.6f * CgeoApplication.getInstance().getResources().getDisplayMetrics().density + 0.5f);
@Override
- public ListView getDispatchedView() {
+ public ListView getDispatchedView(final ViewGroup parentView) {
if (cache == null) {
// something is really wrong
return null;
}
// sort waypoints: PP, Sx, FI, OWN
- final List<Waypoint> sortedWaypoints = new ArrayList<Waypoint>(cache.getWaypoints());
+ final List<Waypoint> sortedWaypoints = new ArrayList<>(cache.getWaypoints());
Collections.sort(sortedWaypoints, Waypoint.WAYPOINT_COMPARATOR);
- view = (ListView) getLayoutInflater().inflate(R.layout.cachedetail_waypoints_page, null);
+ view = (ListView) getLayoutInflater().inflate(R.layout.cachedetail_waypoints_page, parentView, false);
view.setClickable(true);
- View addWaypointButton = getLayoutInflater().inflate(R.layout.cachedetail_waypoints_footer, null);
+ final View addWaypointButton = getLayoutInflater().inflate(R.layout.cachedetail_waypoints_footer, view, false);
view.addFooterView(addWaypointButton);
addWaypointButton.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View v) {
+ public void onClick(final View v) {
+ ensureSaved();
EditWaypointActivity.startActivityAddWaypoint(CacheDetailActivity.this, cache);
refreshOnResume = true;
}
@@ -1716,12 +1670,13 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
view.setAdapter(new ArrayAdapter<Waypoint>(CacheDetailActivity.this, R.layout.waypoint_item, sortedWaypoints) {
@Override
- public View getView(int position, View convertView, ViewGroup parent) {
+ public View getView(final int position, final View convertView, final ViewGroup parent) {
View rowView = convertView;
if (null == rowView) {
- rowView = getLayoutInflater().inflate(R.layout.waypoint_item, null);
+ rowView = getLayoutInflater().inflate(R.layout.waypoint_item, parent, false);
rowView.setClickable(true);
rowView.setLongClickable(true);
+ registerForContextMenu(rowView);
}
WaypointViewHolder holder = (WaypointViewHolder) rowView.getTag();
if (null == holder) {
@@ -1737,7 +1692,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
return view;
}
- protected void fillViewHolder(View rowView, final WaypointViewHolder holder, final Waypoint wpt) {
+ protected void fillViewHolder(final View rowView, final WaypointViewHolder holder, final Waypoint wpt) {
// coordinates
final TextView coordinatesView = holder.coordinatesView;
if (null != wpt.getCoords()) {
@@ -1800,33 +1755,34 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
final View wpNavView = holder.wpNavView;
wpNavView.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View v) {
+ public void onClick(final View v) {
NavigationAppFactory.startDefaultNavigationApplication(1, CacheDetailActivity.this, wpt);
}
});
wpNavView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
- public boolean onLongClick(View v) {
+ public boolean onLongClick(final View v) {
NavigationAppFactory.startDefaultNavigationApplication(2, CacheDetailActivity.this, wpt);
return true;
}
});
- registerForContextMenu(rowView);
+ addContextMenu(rowView);
rowView.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View v) {
+ public void onClick(final View v) {
selectedWaypoint = wpt;
- openContextMenu(v);
+ ensureSaved();
+ EditWaypointActivity.startActivityEditWaypoint(CacheDetailActivity.this, cache, wpt.getId());
+ refreshOnResume = true;
}
});
rowView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
- public boolean onLongClick(View v) {
+ public boolean onLongClick(final View v) {
selectedWaypoint = wpt;
- EditWaypointActivity.startActivityEditWaypoint(CacheDetailActivity.this, cache, wpt.getId());
- refreshOnResume = true;
+ openContextMenu(v);
return true;
}
});
@@ -1836,7 +1792,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
final WaypointType waypointType = wpt.getWaypointType();
final Drawable icon;
if (wpt.isVisited()) {
- LayerDrawable ld = new LayerDrawable(new Drawable[] {
+ final LayerDrawable ld = new LayerDrawable(new Drawable[] {
res.getDrawable(waypointType.markerId),
res.getDrawable(R.drawable.tick) });
ld.setLayerInset(0, 0, 0, VISITED_INSET, VISITED_INSET);
@@ -1852,20 +1808,20 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
private class InventoryViewCreator extends AbstractCachingPageViewCreator<ListView> {
@Override
- public ListView getDispatchedView() {
+ public ListView getDispatchedView(final ViewGroup parentView) {
if (cache == null) {
// something is really wrong
return null;
}
- view = (ListView) getLayoutInflater().inflate(R.layout.cachedetail_inventory_page, null);
+ view = (ListView) getLayoutInflater().inflate(R.layout.cachedetail_inventory_page, parentView, false);
// TODO: fix layout, then switch back to Android-resource and delete copied one
// this copy is modified to respect the text color
- view.setAdapter(new ArrayAdapter<Trackable>(CacheDetailActivity.this, R.layout.simple_list_item_1, cache.getInventory()));
+ view.setAdapter(new ArrayAdapter<>(CacheDetailActivity.this, R.layout.simple_list_item_1, cache.getInventory()));
view.setOnItemClickListener(new OnItemClickListener() {
@Override
- public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
+ public void onItemClick(final AdapterView<?> arg0, final View arg1, final int arg2, final long arg3) {
final Object selection = arg0.getItemAtPosition(arg2);
if (selection instanceof Trackable) {
final Trackable trackable = (Trackable) selection;
@@ -1881,12 +1837,12 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
private class ImagesViewCreator extends AbstractCachingPageViewCreator<View> {
@Override
- public View getDispatchedView() {
+ public View getDispatchedView(final ViewGroup parentView) {
if (cache == null) {
return null; // something is really wrong
}
- view = getLayoutInflater().inflate(R.layout.cachedetail_images_page, null);
+ view = getLayoutInflater().inflate(R.layout.cachedetail_images_page, parentView, false);
if (imagesList == null && isCurrentPage(Page.IMAGES)) {
loadCacheImages();
}
@@ -1901,6 +1857,86 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
context.startActivity(cachesIntent);
}
+ public void addContextMenu(final View view) {
+ view.setOnLongClickListener(new OnLongClickListener() {
+
+ @Override
+ public boolean onLongClick(final View v) {
+ startSupportActionMode(new ActionMode.Callback() {
+
+ @Override
+ public boolean onPrepareActionMode(final ActionMode actionMode, final Menu menu) {
+ switch (view.getId()) {
+ case R.id.value: // coordinates, gc-code, name
+ assert view instanceof TextView;
+ clickedItemText = ((TextView) view).getText();
+ final CharSequence itemTitle = ((TextView) ((View) view.getParent()).findViewById(R.id.name)).getText();
+ buildDetailsContextMenu(actionMode, menu, clickedItemText, itemTitle, true);
+ return true;
+ case R.id.shortdesc:
+ assert view instanceof TextView;
+ clickedItemText = ((TextView) view).getText();
+ buildDetailsContextMenu(actionMode, menu, clickedItemText, res.getString(R.string.cache_description), false);
+ return true;
+ case R.id.longdesc:
+ assert view instanceof TextView;
+ // combine short and long description
+ final String shortDesc = cache.getShortDescription();
+ if (StringUtils.isBlank(shortDesc)) {
+ clickedItemText = ((TextView) view).getText();
+ } else {
+ clickedItemText = shortDesc + "\n\n" + ((TextView) view).getText();
+ }
+ buildDetailsContextMenu(actionMode, menu, clickedItemText, res.getString(R.string.cache_description), false);
+ return true;
+ case R.id.personalnote:
+ assert view instanceof TextView;
+ clickedItemText = ((TextView) view).getText();
+ buildDetailsContextMenu(actionMode, menu, clickedItemText, res.getString(R.string.cache_personal_note), true);
+ return true;
+ case R.id.hint:
+ assert view instanceof TextView;
+ clickedItemText = ((TextView) view).getText();
+ buildDetailsContextMenu(actionMode, menu, clickedItemText, res.getString(R.string.cache_hint), false);
+ return true;
+ case R.id.log:
+ assert view instanceof TextView;
+ clickedItemText = ((TextView) view).getText();
+ buildDetailsContextMenu(actionMode, menu, clickedItemText, res.getString(R.string.cache_logs), false);
+ return true;
+ case R.id.date: // event date
+ assert view instanceof TextView;
+ clickedItemText = ((TextView) view).getText();
+ buildDetailsContextMenu(actionMode, menu, clickedItemText, res.getString(R.string.cache_event), true);
+ menu.findItem(R.id.menu_calendar).setVisible(cache.canBeAddedToCalendar());
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void onDestroyActionMode(final ActionMode actionMode) {
+ // do nothing
+ }
+
+ @Override
+ public boolean onCreateActionMode(final ActionMode actionMode, final Menu menu) {
+ actionMode.getMenuInflater().inflate(R.menu.details_context, menu);
+
+ // Return true so that the action mode is shown
+ return true;
+ }
+
+ @Override
+ public boolean onActionItemClicked(final ActionMode actionMode, final MenuItem menuItem) {
+ return onClipboardItemSelected(actionMode, menuItem, clickedItemText);
+ }
+ });
+ return false;
+ }
+ });
+ }
+
public static void startActivityGuid(final Context context, final String guid, final String cacheName) {
final Intent cacheIntent = new Intent(context, CacheDetailActivity.class);
cacheIntent.putExtra(Intents.EXTRA_GUID, guid);
@@ -1920,7 +1956,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
builder.setSingleChoiceItems(items, 0, new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, final int which) {
+ public void onClick(final DialogInterface dialog, final int which) {
dialog.dismiss();
final ProgressDialog progressDialog = ProgressDialog.show(CacheDetailActivity.this, getString(R.string.cache), getString(R.string.waypoint_reset), true);
final HandlerResetCoordinates handler = new HandlerResetCoordinates(CacheDetailActivity.this, progressDialog, which == 1);
@@ -1936,14 +1972,14 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
private final ProgressDialog progressDialog;
private final boolean resetRemote;
- protected HandlerResetCoordinates(CacheDetailActivity activity, ProgressDialog progressDialog, boolean resetRemote) {
+ protected HandlerResetCoordinates(final CacheDetailActivity activity, final ProgressDialog progressDialog, final boolean resetRemote) {
super(activity);
this.progressDialog = progressDialog;
this.resetRemote = resetRemote;
}
@Override
- public void handleMessage(Message msg) {
+ public void handleMessage(final Message msg) {
if (msg.what == ResetCoordsThread.LOCAL) {
localFinished = true;
} else {
@@ -1972,7 +2008,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
public static final int LOCAL = 0;
public static final int ON_WEBSITE = 1;
- public ResetCoordsThread(Geocache cache, Handler handler, final Waypoint wpt, boolean local, boolean remote, final ProgressDialog progress) {
+ public ResetCoordsThread(final Geocache cache, final Handler handler, final Waypoint wpt, final boolean local, final boolean remote, final ProgressDialog progress) {
this.cache = cache;
this.handler = handler;
this.local = local;
@@ -2028,31 +2064,31 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
}
- private class UploadPersonalNoteThread extends Thread {
+ private static class UploadPersonalNoteThread extends Thread {
private Geocache cache = null;
private CancellableHandler handler = null;
- public UploadPersonalNoteThread(Geocache cache, CancellableHandler handler) {
+ public UploadPersonalNoteThread(final Geocache cache, final CancellableHandler handler) {
this.cache = cache;
this.handler = handler;
}
@Override
public void run() {
- IConnector con = ConnectorFactory.getConnector(cache);
+ final IConnector con = ConnectorFactory.getConnector(cache);
if (con.supportsPersonalNote()) {
con.uploadPersonalNote(cache);
}
- Message msg = Message.obtain();
- Bundle bundle = new Bundle();
- bundle.putString(SimpleCancellableHandler.MESSAGE_TEXT, res.getString(R.string.cache_personal_note_upload_done));
+ final Message msg = Message.obtain();
+ final Bundle bundle = new Bundle();
+ bundle.putString(SimpleCancellableHandler.MESSAGE_TEXT, CgeoApplication.getInstance().getString(R.string.cache_personal_note_upload_done));
msg.setData(bundle);
handler.sendMessage(msg);
}
}
@Override
- protected String getTitle(Page page) {
+ protected String getTitle(final Page page) {
// show number of waypoints directly in waypoint title
if (page == Page.WAYPOINTS) {
final int waypointCount = cache.getWaypoints().size();
@@ -2063,7 +2099,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
@Override
protected Pair<List<? extends Page>, Integer> getOrderedPages() {
- final ArrayList<Page> pages = new ArrayList<Page>();
+ final ArrayList<Page> pages = new ArrayList<>();
pages.add(Page.WAYPOINTS);
pages.add(Page.DETAILS);
final int detailsIndex = pages.size() - 1;
@@ -2084,7 +2120,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
@Override
- protected AbstractViewPagerActivity.PageViewCreator createViewCreator(Page page) {
+ protected AbstractViewPagerActivity.PageViewCreator createViewCreator(final Page page) {
switch (page) {
case DETAILS:
return new DetailsViewCreator();
@@ -2112,13 +2148,13 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
static void updateOfflineBox(final View view, final Geocache cache, final Resources res,
- final OnClickListener refreshCacheClickListener,
- final OnClickListener dropCacheClickListener,
- final OnClickListener storeCacheClickListener) {
+ final OnClickListener refreshCacheClickListener,
+ final OnClickListener dropCacheClickListener,
+ final OnClickListener storeCacheClickListener) {
// offline use
- final TextView offlineText = (TextView) view.findViewById(R.id.offline_text);
- final Button offlineRefresh = (Button) view.findViewById(R.id.offline_refresh);
- final Button offlineStore = (Button) view.findViewById(R.id.offline_store);
+ final TextView offlineText = ButterKnife.findById(view, R.id.offline_text);
+ final Button offlineRefresh = ButterKnife.findById(view, R.id.offline_refresh);
+ final Button offlineStore = ButterKnife.findById(view, R.id.offline_store);
if (cache.isOffline()) {
final long diff = (System.currentTimeMillis() / (60 * 1000)) - (cache.getDetailedUpdate() / (60 * 1000)); // minutes
@@ -2160,12 +2196,12 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
private static class StoreCacheHandler extends SimpleCancellableHandler {
- public StoreCacheHandler(CacheDetailActivity activity, Progress progress) {
+ public StoreCacheHandler(final CacheDetailActivity activity, final Progress progress) {
super(activity, progress);
}
@Override
- public void handleRegularMessage(Message msg) {
+ public void handleRegularMessage(final Message msg) {
if (UPDATE_LOAD_PROGRESS_DETAIL == msg.what && msg.obj instanceof String) {
updateStatusMsg(R.string.cache_dialog_offline_save_message, (String) msg.obj);
} else {
@@ -2176,12 +2212,12 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
private static final class RefreshCacheHandler extends SimpleCancellableHandler {
- public RefreshCacheHandler(CacheDetailActivity activity, Progress progress) {
+ public RefreshCacheHandler(final CacheDetailActivity activity, final Progress progress) {
super(activity, progress);
}
@Override
- public void handleRegularMessage(Message msg) {
+ public void handleRegularMessage(final Message msg) {
if (UPDATE_LOAD_PROGRESS_DETAIL == msg.what && msg.obj instanceof String) {
updateStatusMsg(R.string.cache_dialog_refresh_message, (String) msg.obj);
} else {
@@ -2192,24 +2228,24 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
private static final class ChangeNotificationHandler extends SimpleHandler {
- public ChangeNotificationHandler(CacheDetailActivity activity, Progress progress) {
+ public ChangeNotificationHandler(final CacheDetailActivity activity, final Progress progress) {
super(activity, progress);
}
@Override
- public void handleMessage(Message msg) {
+ public void handleMessage(final Message msg) {
notifyDatasetChanged(activityRef);
}
}
private static final class SimpleUpdateHandler extends SimpleHandler {
- public SimpleUpdateHandler(CacheDetailActivity activity, Progress progress) {
+ public SimpleUpdateHandler(final CacheDetailActivity activity, final Progress progress) {
super(activity, progress);
}
@Override
- public void handleMessage(Message msg) {
+ public void handleMessage(final Message msg) {
if (msg.what == MESSAGE_FAILED) {
super.handleMessage(msg);
} else {
@@ -2218,8 +2254,8 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
}
- private static void notifyDatasetChanged(WeakReference<AbstractActivity> activityRef) {
- CacheDetailActivity activity = ((CacheDetailActivity) activityRef.get());
+ private static void notifyDatasetChanged(final WeakReference<AbstractActivity> activityRef) {
+ final CacheDetailActivity activity = ((CacheDetailActivity) activityRef.get());
if (activity != null) {
activity.notifyDataSetChanged();
}
@@ -2227,44 +2263,24 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
protected void storeCache(final int listId, final StoreCacheHandler storeCacheHandler) {
progress.show(this, res.getString(R.string.cache_dialog_offline_save_title), res.getString(R.string.cache_dialog_offline_save_message), true, storeCacheHandler.cancelMessage());
- Schedulers.io().schedule(new Action1<Inner>() {
+ RxUtils.networkScheduler.createWorker().schedule(new Action0() {
@Override
- public void call(final Inner inner) {
+ public void call() {
cache.store(listId, storeCacheHandler);
}
});
}
- private static final class StoreCachePersonalNoteHandler extends StoreCacheHandler {
-
- public StoreCachePersonalNoteHandler(CacheDetailActivity activity, Progress progress) {
- super(activity, progress);
- }
-
- @Override
- public void handleRegularMessage(Message msg) {
- if (UPDATE_LOAD_PROGRESS_DETAIL == msg.what && msg.obj instanceof String) {
- updateStatusMsg(R.string.cache_dialog_offline_save_message, (String) msg.obj);
- } else {
- dismissProgress();
- CacheDetailActivity activity = (CacheDetailActivity) activityRef.get();
- if (activity != null) {
- editPersonalNote(activity.getCache(), activity);
- }
- }
- }
- }
-
public static void editPersonalNote(final Geocache cache, final CacheDetailActivity activity) {
if (cache.isOffline()) {
- EditNoteDialogListener editNoteDialogListener = new EditNoteDialogListener() {
+ final EditNoteDialogListener editNoteDialogListener = new EditNoteDialogListener() {
@Override
public void onFinishEditNoteDialog(final String note) {
cache.setPersonalNote(note);
cache.parseWaypointsFromNote();
- TextView personalNoteView = (TextView) activity.findViewById(R.id.personalnote);
+ final TextView personalNoteView = ButterKnife.findById(activity, R.id.personalnote);
setPersonalNote(personalNoteView, note);
- DataStore.saveCache(cache, EnumSet.of(SaveFlag.SAVE_DB));
+ DataStore.saveCache(cache, EnumSet.of(SaveFlag.DB));
activity.notifyDataSetChanged();
}
};
diff --git a/main/src/cgeo/geocaching/CacheListActivity.java b/main/src/cgeo/geocaching/CacheListActivity.java
index 053798e..9d15e47 100644
--- a/main/src/cgeo/geocaching/CacheListActivity.java
+++ b/main/src/cgeo/geocaching/CacheListActivity.java
@@ -1,5 +1,7 @@
package cgeo.geocaching;
+import butterknife.ButterKnife;
+
import cgeo.geocaching.activity.AbstractActivity;
import cgeo.geocaching.activity.AbstractListActivity;
import cgeo.geocaching.activity.ActivityMixin;
@@ -13,11 +15,13 @@ import cgeo.geocaching.enumerations.CacheListType;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.enumerations.LoadFlags;
import cgeo.geocaching.enumerations.StatusCode;
-import cgeo.geocaching.export.ExportFactory;
+import cgeo.geocaching.export.FieldnoteExport;
+import cgeo.geocaching.export.GpxExport;
import cgeo.geocaching.files.GPXImporter;
import cgeo.geocaching.filter.FilterUserInterface;
import cgeo.geocaching.filter.IFilter;
import cgeo.geocaching.geopoint.Geopoint;
+import cgeo.geocaching.list.AbstractList;
import cgeo.geocaching.list.PseudoList;
import cgeo.geocaching.list.StoredList;
import cgeo.geocaching.loaders.AbstractSearchLoader;
@@ -40,8 +44,9 @@ import cgeo.geocaching.sensors.DirectionProvider;
import cgeo.geocaching.sensors.GeoDirHandler;
import cgeo.geocaching.sensors.IGeoData;
import cgeo.geocaching.settings.Settings;
+import cgeo.geocaching.settings.SettingsActivity;
import cgeo.geocaching.sorting.CacheComparator;
-import cgeo.geocaching.sorting.ComparatorUserInterface;
+import cgeo.geocaching.sorting.SortActionProvider;
import cgeo.geocaching.ui.CacheListAdapter;
import cgeo.geocaching.ui.LoggingUI;
import cgeo.geocaching.ui.WeakReferenceHandler;
@@ -57,6 +62,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
import rx.Subscription;
import rx.functions.Action1;
@@ -67,8 +73,10 @@ import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
+import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.content.res.Configuration;
+import android.content.res.Resources;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
@@ -77,6 +85,8 @@ import android.os.Message;
import android.provider.OpenableColumns;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.Loader;
+import android.support.v4.view.MenuItemCompat;
+import android.support.v7.app.ActionBar;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.KeyEvent;
@@ -111,7 +121,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
private Geopoint coords = null;
private SearchResult search = null;
/** The list of shown caches shared with Adapter. Don't manipulate outside of main thread only with Handler */
- private final List<Geocache> cacheList = new ArrayList<Geocache>();
+ private final List<Geocache> cacheList = new ArrayList<>();
private CacheListAdapter adapter = null;
private View listFooter = null;
private TextView listFooterText = null;
@@ -160,7 +170,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
dialog.setNegativeButton(res.getString(R.string.license_dismiss), new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int id) {
+ public void onClick(final DialogInterface dialog, final int id) {
Cookies.clearCookies();
dialog.cancel();
}
@@ -168,7 +178,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
dialog.setPositiveButton(res.getString(R.string.license_show), new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int id) {
+ public void onClick(final DialogInterface dialog, final int id) {
Cookies.clearCookies();
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.geocaching.com/software/agreement.aspx?ID=0")));
}
@@ -212,12 +222,12 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
private static class LoadCachesHandler extends WeakReferenceHandler<CacheListActivity> {
- protected LoadCachesHandler(CacheListActivity activity) {
+ protected LoadCachesHandler(final CacheListActivity activity) {
super(activity);
}
@Override
- public void handleMessage(Message msg) {
+ public void handleMessage(final Message msg) {
final CacheListActivity activity = getActivity();
if (activity == null) {
return;
@@ -252,26 +262,20 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
}
+ private static String getCacheNumberString(final Resources res, final int count) {
+ return res.getQuantityString(R.plurals.cache_counts, count, count);
+ }
+
protected void updateTitle() {
- final ArrayList<Integer> numbers = new ArrayList<Integer>();
- if (adapter.isFiltered()) {
- numbers.add(adapter.getCount());
- }
- if (search != null) {
- numbers.add(search.getCount());
- }
- if (numbers.isEmpty()) {
- setTitle(title);
- }
- else {
- setTitle(title + " [" + StringUtils.join(numbers, '/') + ']');
- }
+ setTitle(title);
+ getSupportActionBar().setSubtitle(getCurrentSubtitle());
+ refreshSpinnerAdapter();
}
private final CancellableHandler loadDetailsHandler = new CancellableHandler() {
@Override
- public void handleRegularMessage(Message msg) {
+ public void handleRegularMessage(final Message msg) {
updateAdapter();
if (msg.what > -1) {
@@ -286,7 +290,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
if (minutesRemaining < 1) {
progress.setMessage(res.getString(R.string.caches_downloading) + " " + res.getString(R.string.caches_eta_ltm));
} else {
- progress.setMessage(res.getString(R.string.caches_downloading) + " " + minutesRemaining + " " + res.getQuantityString(R.plurals.caches_eta_mins, minutesRemaining));
+ progress.setMessage(res.getString(R.string.caches_downloading) + " " + res.getQuantityString(R.plurals.caches_eta_mins, minutesRemaining, minutesRemaining));
}
} else {
if (search != null) {
@@ -310,7 +314,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
*/
private class DownloadFromWebHandler extends CancellableHandler {
@Override
- public void handleRegularMessage(Message msg) {
+ public void handleRegularMessage(final Message msg) {
updateAdapter();
adapter.notifyDataSetChanged();
@@ -348,7 +352,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
private final CancellableHandler clearOfflineLogsHandler = new CancellableHandler() {
@Override
- public void handleRegularMessage(Message msg) {
+ public void handleRegularMessage(final Message msg) {
adapter.setSelectMode(false);
refreshCurrentList();
@@ -361,7 +365,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
private final Handler importGpxAttachementFinishedHandler = new Handler() {
@Override
- public void handleMessage(Message msg) {
+ public void handleMessage(final Message msg) {
refreshCurrentList();
}
};
@@ -373,10 +377,12 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
@Override
- public void onCreate(Bundle savedInstanceState) {
+ public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+
setTheme();
+
setContentView(R.layout.cacheslist_activity);
// get parameters
@@ -396,22 +402,16 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
}
- // Add the list selection in code. This way we can leave the XML layout of the action bar the same as for other activities.
- final View titleBar = findViewById(R.id.actionbar_title);
- titleBar.setClickable(true);
- titleBar.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View v) {
- selectList();
- }
- });
-
setTitle(title);
+
initAdapter();
prepareFilterBar();
+ if (type.canSwitch) {
+ initActionBarSpinner();
+ }
+
currentLoader = (AbstractSearchLoader) getSupportLoaderManager().initLoader(type.getLoaderId(), extras, this);
// init
@@ -427,11 +427,57 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
if (isInvokedFromAttachment()) {
importGpxAttachement();
}
+
+
+
+ }
+
+ /**
+ * Action bar spinner adapter. {@code null} for list types that don't allow switching (search results, ...).
+ */
+ CacheListSpinnerAdapter mCacheListSpinnerAdapter;
+
+ /**
+ * remember current filter when switching between lists, so it can be re-applied afterwards
+ */
+ private IFilter currentFilter = null;
+
+ private SortActionProvider sortProvider;
+
+ private void initActionBarSpinner() {
+ mCacheListSpinnerAdapter = new CacheListSpinnerAdapter(this, R.layout.support_simple_spinner_dropdown_item);
+ getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
+ getSupportActionBar().setDisplayShowTitleEnabled(false);
+ getSupportActionBar().setListNavigationCallbacks(mCacheListSpinnerAdapter, new ActionBar.OnNavigationListener() {
+ @Override
+ public boolean onNavigationItemSelected(final int i, final long l) {
+ final int newListId = mCacheListSpinnerAdapter.getItem(i).id;
+ if (newListId != listId) {
+ switchListById(newListId);
+ }
+ return true;
+ }
+ });
}
+ private void refreshSpinnerAdapter() {
+ /* If the activity does not use the Spinner this will be null */
+ if (mCacheListSpinnerAdapter==null) {
+ return;
+ }
+ mCacheListSpinnerAdapter.clear();
+
+ final AbstractList list = AbstractList.getListById(listId);
+
+ for (final AbstractList l: StoredList.UserInterface.getMenuLists(false, PseudoList.NEW_LIST.id)) {
+ mCacheListSpinnerAdapter.add(l);
+ }
+
+ getSupportActionBar().setSelectedNavigationItem(mCacheListSpinnerAdapter.getPosition(list));
+ }
@Override
- public void onConfigurationChanged(Configuration newConfig) {
+ public void onConfigurationChanged(final Configuration newConfig) {
super.onConfigurationChanged(newConfig);
if (currentLoader != null && currentLoader.isLoading()) {
showFooterLoadingCaches();
@@ -452,7 +498,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
new StoredList.UserInterface(this).promptForListSelection(R.string.gpx_import_select_list_title, new Action1<Integer>() {
@Override
- public void call(Integer listId) {
+ public void call(final Integer listId) {
new GPXImporter(CacheListActivity.this, listId, importGpxAttachementFinishedHandler).importGPX();
switchListById(listId);
}
@@ -474,7 +520,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
// refresh standard list if it has changed (new caches downloaded)
- if (type == CacheListType.OFFLINE && listId >= StoredList.STANDARD_LIST_ID && search != null) {
+ if (type == CacheListType.OFFLINE && (listId >= StoredList.STANDARD_LIST_ID || listId == PseudoList.ALL_LIST.id) && search != null) {
final SearchResult newSearch = DataStore.getBatchOfStoredCaches(coords, Settings.getCacheType(), listId);
if (newSearch.getTotalCountGC() != search.getTotalCountGC()) {
refreshCurrentList();
@@ -499,11 +545,29 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
@Override
- public boolean onCreateOptionsMenu(Menu menu) {
+ public boolean onCreateOptionsMenu(final Menu menu) {
getMenuInflater().inflate(R.menu.cache_list_options, menu);
CacheListAppFactory.addMenuItems(menu, this, res);
+ sortProvider = (SortActionProvider) MenuItemCompat.getActionProvider(menu.findItem(R.id.menu_sort));
+ sortProvider.setSelection(adapter.getCacheComparator());
+ sortProvider.setClickListener(new Action1<CacheComparator>() {
+ @Override
+ public void call(final CacheComparator selectedComparator) {
+ final CacheComparator oldComparator = adapter.getCacheComparator();
+ // selecting the same sorting twice will toggle the order
+ if (selectedComparator != null && oldComparator != null && selectedComparator.getClass().equals(oldComparator.getClass())) {
+ adapter.toggleInverseSort();
+ }
+ else {
+ // always reset the inversion for a new sorting criteria
+ adapter.resetInverseSort();
+ }
+ setComparator(selectedComparator);
+ sortProvider.setSelection(selectedComparator);
+ }
+ });
return true;
}
@@ -512,7 +576,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
@Override
- public boolean onPrepareOptionsMenu(Menu menu) {
+ public boolean onPrepareOptionsMenu(final Menu menu) {
super.onPrepareOptionsMenu(menu);
final boolean isHistory = type == CacheListType.HISTORY;
@@ -532,49 +596,43 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
setVisible(menu, R.id.menu_switch_select_mode, !isEmpty);
setVisible(menu, R.id.submenu_manage, (isHistory && !isEmpty) || isOffline);
- setVisible(menu, R.id.submenu_manage_lists, isOffline);
+
+ setVisible(menu, R.id.menu_create_list, isOffline);
setVisible(menu, R.id.menu_sort, !isEmpty && !isHistory);
setVisible(menu, R.id.menu_refresh_stored, !isEmpty && (isConcrete || type != CacheListType.OFFLINE));
setVisible(menu, R.id.menu_drop_caches, !isEmpty && isOffline);
- setVisible(menu, R.id.menu_drop_caches_and_list, isConcrete && !isEmpty && isOffline);
- setVisible(menu, R.id.menu_delete_events, isConcrete && !isEmpty && containsEvents());
+ setVisible(menu, R.id.menu_delete_events, isConcrete && !isEmpty && containsPastEvents());
setVisible(menu, R.id.menu_move_to_list, isOffline && !isEmpty);
- setVisible(menu, R.id.menu_export, !isEmpty && (isHistory || isOffline));
setVisible(menu, R.id.menu_remove_from_history, !isEmpty && isHistory);
setVisible(menu, R.id.menu_clear_offline_logs, !isEmpty && containsOfflineLogs() && (isHistory || isOffline));
- setVisible(menu, R.id.menu_import_web, isOffline && Settings.getWebDeviceCode() != null);
+ setVisible(menu, R.id.menu_import, isOffline);
+ setVisible(menu, R.id.menu_import_web, isOffline);
setVisible(menu, R.id.menu_import_gpx, isOffline);
+ setVisible(menu, R.id.menu_export, !isEmpty);
setVisible(menu, R.id.menu_refresh_stored_top, !isOffline && !isEmpty);
if (!isOffline && !isHistory) {
menu.findItem(R.id.menu_refresh_stored_top).setTitle(R.string.caches_store_offline);
}
- final boolean hasSelection = adapter != null && adapter.getCheckedCount() > 0;
final boolean isNonDefaultList = isConcrete && listId != StoredList.STANDARD_LIST_ID;
if (isOffline || type == CacheListType.HISTORY) { // only offline list
- setMenuItemLabel(menu, R.id.menu_drop_caches, R.string.caches_drop_selected, R.string.caches_drop_all);
+ setMenuItemLabel(menu, R.id.menu_drop_caches, R.string.caches_remove_selected, R.string.caches_remove_all);
setMenuItemLabel(menu, R.id.menu_refresh_stored, R.string.caches_refresh_selected, R.string.caches_refresh_all);
setMenuItemLabel(menu, R.id.menu_move_to_list, R.string.caches_move_selected, R.string.caches_move_all);
} else { // search and global list (all other than offline and history)
setMenuItemLabel(menu, R.id.menu_refresh_stored, R.string.caches_store_selected, R.string.caches_store_offline);
}
- // make combined list deletion only possible when there are no filters, as that leads to confusion for the hidden caches
- menu.findItem(R.id.menu_drop_caches_and_list).setVisible(isOffline && !hasSelection && isNonDefaultList && !adapter.isFiltered() && Settings.getCacheType() == CacheType.ALL);
-
menu.findItem(R.id.menu_drop_list).setVisible(isNonDefaultList);
menu.findItem(R.id.menu_rename_list).setVisible(isNonDefaultList);
- final boolean multipleLists = DataStore.getLists().size() >= 2;
- menu.findItem(R.id.menu_switch_list).setVisible(multipleLists);
menu.findItem(R.id.menu_move_to_list).setVisible(!isEmpty);
setMenuItemLabel(menu, R.id.menu_remove_from_history, R.string.cache_remove_from_history, R.string.cache_clear_history);
- setMenuItemLabel(menu, R.id.menu_export, R.string.export, R.string.export);
- menu.findItem(R.id.menu_import_android).setVisible(Compatibility.isStorageAccessFrameworkAvailable());
+ menu.findItem(R.id.menu_import_android).setVisible(Compatibility.isStorageAccessFrameworkAvailable() && isOffline);
} catch (final RuntimeException e) {
Log.e("CacheListActivity.onPrepareOptionsMenu", e);
}
@@ -582,9 +640,9 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
return true;
}
- private boolean containsEvents() {
+ private boolean containsPastEvents() {
for (final Geocache cache : adapter.getCheckedOrAllCaches()) {
- if (cache.isEventCache()) {
+ if (DateUtils.isPastEvent(cache)) {
return true;
}
}
@@ -614,8 +672,14 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
@Override
- public boolean onOptionsItemSelected(MenuItem item) {
+ public boolean onOptionsItemSelected(final MenuItem item) {
+ if (super.onOptionsItemSelected(item)) {
+ return true;
+ }
switch (item.getItemId()) {
+ case R.id.menu_show_on_map:
+ goMap();
+ return true;
case R.id.menu_switch_select_mode:
adapter.switchSelectMode();
invalidateOptionsMenuCompatible();
@@ -626,11 +690,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
invalidateOptionsMenuCompatible();
return true;
case R.id.menu_drop_caches:
- dropStored(false);
- invalidateOptionsMenuCompatible();
- return false;
- case R.id.menu_drop_caches_and_list:
- dropStored(true);
+ dropStored();
invalidateOptionsMenuCompatible();
return true;
case R.id.menu_import_gpx:
@@ -643,10 +703,11 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
return false;
case R.id.menu_create_list:
new StoredList.UserInterface(this).promptForListCreation(getListSwitchingRunnable(), newListName);
+ refreshSpinnerAdapter();
invalidateOptionsMenuCompatible();
return false;
case R.id.menu_drop_list:
- removeList(true);
+ removeList(false);
invalidateOptionsMenuCompatible();
return false;
case R.id.menu_rename_list:
@@ -656,36 +717,18 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
adapter.invertSelection();
invalidateOptionsMenuCompatible();
return false;
- case R.id.menu_switch_list:
- selectList();
- invalidateOptionsMenuCompatible();
- return false;
case R.id.menu_filter:
showFilterMenu(null);
return true;
- case R.id.menu_sort:
- final CacheComparator oldComparator = adapter.getCacheComparator();
- new ComparatorUserInterface(this).selectComparator(oldComparator, new Action1<CacheComparator>() {
- @Override
- public void call(CacheComparator selectedComparator) {
- // selecting the same sorting twice will toggle the order
- if (selectedComparator != null && oldComparator != null && selectedComparator.getClass().equals(oldComparator.getClass())) {
- adapter.toggleInverseSort();
- }
- else {
- // always reset the inversion for a new sorting criteria
- adapter.resetInverseSort();
- }
- setComparator(selectedComparator);
- }
- });
- return true;
case R.id.menu_import_web:
importWeb();
- return false;
- case R.id.menu_export:
- ExportFactory.showExportMenu(adapter.getCheckedOrAllCaches(), this);
- return false;
+ return true;
+ case R.id.menu_export_gpx:
+ new GpxExport().export(adapter.getCheckedOrAllCaches(), this);
+ return true;
+ case R.id.menu_export_fieldnotes:
+ new FieldnoteExport().export(adapter.getCheckedOrAllCaches(), this);
+ return true;
case R.id.menu_remove_from_history:
removeFromHistoryCheck();
invalidateOptionsMenuCompatible();
@@ -721,7 +764,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
private SearchResult getFilteredSearch() {
- final Set<String> geocodes = new HashSet<String>();
+ final Set<String> geocodes = new HashSet<>();
for (final Geocache cache : adapter.getFilteredList()) {
geocodes.add(cache.getGeocode());
}
@@ -729,13 +772,13 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
public void deletePastEvents() {
- final List<Geocache> deletion = new ArrayList<Geocache>();
+ final List<Geocache> deletion = new ArrayList<>();
for (final Geocache cache : adapter.getCheckedOrAllCaches()) {
if (DateUtils.isPastEvent(cache)) {
deletion.add(cache);
}
}
- new DropDetailsTask(false).execute(deletion.toArray(new Geocache[deletion.size()]));
+ new DropDetailsTask().execute(deletion.toArray(new Geocache[deletion.size()]));
}
public void clearOfflineLogs() {
@@ -750,13 +793,8 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
public void showFilterMenu(final View view) {
new FilterUserInterface(this).selectFilter(new Action1<IFilter>() {
@Override
- public void call(IFilter selectedFilter) {
- if (selectedFilter != null) {
- setFilter(selectedFilter);
- } else {
- // clear filter
- setFilter(null);
- }
+ public void call(@Nullable final IFilter selectedFilter) {
+ setFilter(selectedFilter);
}
});
}
@@ -795,7 +833,6 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
final boolean isOffline = cache.isOffline();
menu.findItem(R.id.menu_drop_cache).setVisible(isOffline);
menu.findItem(R.id.menu_move_to_list).setVisible(isOffline);
- menu.findItem(R.id.menu_export).setVisible(isOffline);
menu.findItem(R.id.menu_refresh).setVisible(isOffline);
menu.findItem(R.id.menu_store_cache).setVisible(!isOffline);
@@ -806,7 +843,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
new StoredList.UserInterface(this).promptForListSelection(R.string.cache_menu_move_list, new Action1<Integer>() {
@Override
- public void call(Integer newListId) {
+ public void call(final Integer newListId) {
DataStore.moveToList(adapter.getCheckedOrAllCaches(), newListId);
adapter.setSelectMode(false);
@@ -816,7 +853,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
@Override
- public boolean onContextItemSelected(MenuItem item) {
+ public boolean onContextItemSelected(final MenuItem item) {
ContextMenu.ContextMenuInfo info = item.getMenuInfo();
// restore menu info for sub menu items, see
@@ -853,7 +890,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
case R.id.menu_drop_cache:
cache.drop(new Handler() {
@Override
- public void handleMessage(Message msg) {
+ public void handleMessage(final Message msg) {
adapter.notifyDataSetChanged();
refreshCurrentList();
}
@@ -863,7 +900,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
new StoredList.UserInterface(this).promptForListSelection(R.string.cache_menu_move_list, new Action1<Integer>() {
@Override
- public void call(Integer newListId) {
+ public void call(final Integer newListId) {
DataStore.moveToList(Collections.singletonList(cache), newListId);
adapter.setSelectMode(false);
refreshCurrentList();
@@ -874,9 +911,6 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
case R.id.menu_refresh:
refreshStored(Collections.singletonList(cache));
break;
- case R.id.menu_export:
- ExportFactory.showExportMenu(Collections.singletonList(cache), this);
- return false;
default:
// we must remember the menu info for the sub menu, there is a bug
// in Android:
@@ -904,7 +938,8 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
return adapter.findCacheByGeocode(contextMenuGeocode);
}
- private boolean setFilter(IFilter filter) {
+ private boolean setFilter(final IFilter filter) {
+ currentFilter = filter;
adapter.setFilter(filter);
prepareFilterBar();
updateTitle();
@@ -913,7 +948,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
@Override
- public boolean onKeyDown(int keyCode, KeyEvent event) {
+ public boolean onKeyDown(final int keyCode, final KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
if (adapter.isSelectMode()) {
adapter.setSelectMode(false);
@@ -924,15 +959,18 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
private void initAdapter() {
- final ListView list = getListView();
- registerForContextMenu(list);
+ final ListView listView = getListView();
+ registerForContextMenu(listView);
adapter = new CacheListAdapter(this, cacheList, type);
+ adapter.setFilter(currentFilter);
- listFooter = getLayoutInflater().inflate(R.layout.cacheslist_footer, null);
- listFooter.setClickable(true);
- listFooter.setOnClickListener(new MoreCachesListener());
- listFooterText = (TextView) listFooter.findViewById(R.id.more_caches);
- list.addFooterView(listFooter);
+ if (listFooter == null) {
+ listFooter = getLayoutInflater().inflate(R.layout.cacheslist_footer, listView, false);
+ listFooter.setClickable(true);
+ listFooter.setOnClickListener(new MoreCachesListener());
+ listFooterText = ButterKnife.findById(listFooter, R.id.more_caches);
+ listView.addFooterView(listFooter);
+ }
setListAdapter(adapter);
adapter.forceSort();
}
@@ -944,26 +982,39 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
private void showFooterLoadingCaches() {
+ // no footer for offline lists
+ if (listFooter == null) {
+ return;
+ }
listFooterText.setText(res.getString(R.string.caches_more_caches_loading));
listFooter.setClickable(false);
listFooter.setOnClickListener(null);
}
private void showFooterMoreCaches() {
+ // no footer in offline lists
+ if (listFooter == null) {
+ return;
+ }
+
boolean enableMore = type != CacheListType.OFFLINE && cacheList.size() < MAX_LIST_ITEMS;
if (enableMore && search != null) {
final int count = search.getTotalCountGC();
enableMore = count > 0 && cacheList.size() < count;
}
+ listFooter.setClickable(enableMore);
if (enableMore) {
listFooterText.setText(res.getString(R.string.caches_more_caches) + " (" + res.getString(R.string.caches_more_caches_currently) + ": " + cacheList.size() + ")");
listFooter.setOnClickListener(new MoreCachesListener());
- } else {
+ } else if (type != CacheListType.OFFLINE) {
listFooterText.setText(res.getString(CollectionUtils.isEmpty(cacheList) ? R.string.caches_no_cache : R.string.caches_more_caches_no));
listFooter.setOnClickListener(null);
+ } else {
+ // hiding footer for offline list is not possible, it must be removed instead
+ // http://stackoverflow.com/questions/7576099/hiding-footer-in-listview
+ getListView().removeFooterView(listFooter);
}
- listFooter.setClickable(enableMore);
}
private void importGpx() {
@@ -975,7 +1026,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
@Override
- protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ protected void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == REQUEST_CODE_IMPORT_GPX && resultCode == Activity.RESULT_OK) {
@@ -991,7 +1042,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
refreshCurrentList();
}
- private String getDisplayName(Uri uri) {
+ private String getDisplayName(final Uri uri) {
Cursor cursor = null;
try {
cursor = getContentResolver().query(uri, new String[] { OpenableColumns.DISPLAY_NAME }, null, null, null);
@@ -1017,25 +1068,32 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
return;
}
- if (Settings.getChooseList() && type != CacheListType.OFFLINE) {
+ if (Settings.getChooseList() && (type != CacheListType.OFFLINE && type != CacheListType.HISTORY)) {
// let user select list to store cache in
new StoredList.UserInterface(this).promptForListSelection(R.string.list_title,
new Action1<Integer>() {
@Override
public void call(final Integer selectedListId) {
- refreshStored(caches, selectedListId);
+ // in case of online lists, set the list id to a concrete list now
+ for (final Geocache geocache : caches) {
+ geocache.setListId(selectedListId);
+ }
+ refreshStoredInternal(caches);
}
}, true, StoredList.TEMPORARY_LIST_ID, newListName);
} else {
if (type != CacheListType.OFFLINE) {
- refreshStored(caches, StoredList.STANDARD_LIST_ID);
- } else {
- refreshStored(caches, this.listId);
+ for (final Geocache geocache : caches) {
+ if (geocache.getListId() == StoredList.TEMPORARY_LIST_ID) {
+ geocache.setListId(StoredList.STANDARD_LIST_ID);
+ }
+ }
}
+ refreshStoredInternal(caches);
}
}
- private void refreshStored(final List<Geocache> caches, final int storeListId) {
+ private void refreshStoredInternal(final List<Geocache> caches) {
detailProgress = 0;
showProgress(false);
@@ -1045,7 +1103,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
if (etaTime < 1) {
message = res.getString(R.string.caches_downloading) + " " + res.getString(R.string.caches_eta_ltm);
} else {
- message = res.getString(R.string.caches_downloading) + " " + etaTime + " " + res.getQuantityString(R.plurals.caches_eta_mins, etaTime);
+ message = res.getString(R.string.caches_downloading) + " " + res.getQuantityString(R.plurals.caches_eta_mins, etaTime, etaTime);
}
progress.show(this, null, message, ProgressDialog.STYLE_HORIZONTAL, loadDetailsHandler.cancelMessage());
@@ -1053,16 +1111,16 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
detailProgressTime = System.currentTimeMillis();
- final LoadDetailsThread threadDetails = new LoadDetailsThread(loadDetailsHandler, caches, storeListId);
+ final LoadDetailsThread threadDetails = new LoadDetailsThread(loadDetailsHandler, caches);
threadDetails.start();
}
public void removeFromHistoryCheck() {
- int message = (adapter != null && adapter.getCheckedCount() > 0) ? R.string.cache_remove_from_history
+ final int message = (adapter != null && adapter.getCheckedCount() > 0) ? R.string.cache_remove_from_history
: R.string.cache_clear_history;
Dialogs.confirmYesNo(this, R.string.caches_removing_from_history, message, new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int id) {
+ public void onClick(final DialogInterface dialog, final int id) {
removeFromHistory();
dialog.cancel();
}
@@ -1081,8 +1139,19 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
public void importWeb() {
- detailProgress = 0;
+ // menu is also shown with no device connected
+ if (!Settings.isRegisteredForSend2cgeo()) {
+ Dialogs.confirm(this, R.string.web_import_title, R.string.init_sendToCgeo_description, new OnClickListener() {
+ @Override
+ public void onClick(final DialogInterface dialog, final int which) {
+ SettingsActivity.openForScreen(R.string.preference_screen_sendtocgeo, CacheListActivity.this);
+ }
+ });
+ return;
+ }
+
+ detailProgress = 0;
showProgress(false);
final DownloadFromWebHandler downloadFromWebHandler = new DownloadFromWebHandler();
progress.show(this, null, res.getString(R.string.web_import_waiting), true, downloadFromWebHandler.cancelMessage());
@@ -1091,23 +1160,21 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
threadWeb.start();
}
- public void dropStored(final boolean removeListAfterwards) {
- int message = (adapter.getCheckedCount() > 0) ? R.string.caches_drop_selected_ask : R.string.caches_drop_all_ask;
- Dialogs.confirmYesNo(this, R.string.caches_drop_stored, message, new DialogInterface.OnClickListener() {
+ public void dropStored() {
+ final int titleId = (adapter.getCheckedCount() > 0) ? R.string.caches_remove_selected : R.string.caches_remove_all;
+ final int messageId = (adapter.getCheckedCount() > 0) ? R.string.caches_remove_selected_confirm : R.string.caches_remove_all_confirm;
+ final String message = getString(messageId, adapter.getCheckedOrAllCount());
+ Dialogs.confirmYesNo(this, titleId, message, new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int id) {
- dropSelected(removeListAfterwards);
+ public void onClick(final DialogInterface dialog, final int id) {
+ final List<Geocache> selected = adapter.getCheckedOrAllCaches();
+ new DropDetailsTask().execute(selected.toArray(new Geocache[selected.size()]));
dialog.cancel();
}
});
}
- public void dropSelected(boolean removeListAfterwards) {
- final List<Geocache> selected = adapter.getCheckedOrAllCaches();
- new DropDetailsTask(removeListAfterwards).execute(selected.toArray(new Geocache[selected.size()]));
- }
-
/**
* Thread to refresh the cache details.
*/
@@ -1115,15 +1182,11 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
private class LoadDetailsThread extends Thread {
final private CancellableHandler handler;
- final private int listIdLD;
final private List<Geocache> caches;
- public LoadDetailsThread(CancellableHandler handler, List<Geocache> caches, int listId) {
+ public LoadDetailsThread(final CancellableHandler handler, final List<Geocache> caches) {
this.handler = handler;
this.caches = caches;
-
- // in case of online lists, set the list id to the standard list
- this.listIdLD = Math.max(listId, StoredList.STANDARD_LIST_ID);
}
@Override
@@ -1152,13 +1215,13 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
* @return
* <code>false</code> if the storing was interrupted, <code>true</code> otherwise
*/
- private boolean refreshCache(Geocache cache) {
+ private boolean refreshCache(final Geocache cache) {
try {
if (handler.isCancelled()) {
throw new InterruptedException("Stopped storing process.");
}
detailProgress++;
- cache.refreshSynchronous(listIdLD, null);
+ cache.refreshSynchronous(null);
handler.sendEmptyMessage(cacheList.indexOf(cache));
} catch (final InterruptedException e) {
Log.i(e.getMessage());
@@ -1176,7 +1239,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
final private CancellableHandler handler;
final private int listIdLFW;
- public LoadFromWebThread(CancellableHandler handler, int listId) {
+ public LoadFromWebThread(final CancellableHandler handler, final int listId) {
this.handler = handler;
listIdLFW = StoredList.getConcreteList(listId);
}
@@ -1226,26 +1289,18 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
private class DropDetailsTask extends AsyncTaskWithProgress<Geocache, Void> {
- private final boolean removeListAfterwards;
-
- public DropDetailsTask(boolean removeListAfterwards) {
- super(CacheListActivity.this, null, res.getString(R.string.caches_drop_progress), true);
- this.removeListAfterwards = removeListAfterwards;
+ public DropDetailsTask() {
+ super(CacheListActivity.this, null, res.getString(R.string.caches_remove_progress), true);
}
@Override
- protected Void doInBackgroundInternal(Geocache[] caches) {
+ protected Void doInBackgroundInternal(final Geocache[] caches) {
DataStore.markDropped(Arrays.asList(caches));
return null;
}
@Override
- protected void onPostExecuteInternal(Void result) {
- // remove list in UI because of toast
- if (removeListAfterwards) {
- removeList(false);
- }
-
+ protected void onPostExecuteInternal(final Void result) {
adapter.setSelectMode(false);
refreshCurrentList();
replaceCacheListFromSearch();
@@ -1258,7 +1313,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
final private Handler handler;
final private List<Geocache> selected;
- public ClearOfflineLogsThread(Handler handlerIn) {
+ public ClearOfflineLogsThread(final Handler handlerIn) {
handler = handlerIn;
selected = adapter.getCheckedOrAllCaches();
}
@@ -1273,10 +1328,9 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
private class MoreCachesListener implements View.OnClickListener {
@Override
- public void onClick(View arg0) {
+ public void onClick(final View arg0) {
showProgress(true);
showFooterLoadingCaches();
- listFooter.setOnClickListener(null);
getSupportLoaderManager().restartLoader(CacheListLoaderType.NEXT_PAGE.getLoaderId(), null, CacheListActivity.this);
}
@@ -1291,13 +1345,6 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
}
- public void selectList() {
- if (!type.canSwitch) {
- return;
- }
- new StoredList.UserInterface(this).promptForListSelection(R.string.list_title, getListSwitchingRunnable());
- }
-
@NonNull
private Action1<Integer> getListSwitchingRunnable() {
return new Action1<Integer>() {
@@ -1309,7 +1356,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
};
}
- public void switchListById(int id) {
+ public void switchListById(final int id) {
if (id < 0) {
return;
}
@@ -1320,25 +1367,28 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
return;
}
- final StoredList list = DataStore.getList(id);
- if (list == null) {
- return;
+ if (id == PseudoList.ALL_LIST.id) {
+ listId = id;
+ title = res.getString(R.string.list_all_lists);
+ } else {
+ final StoredList list = DataStore.getList(id);
+ if (list == null) {
+ return;
+ }
+ listId = list.id;
+ title = list.title;
}
-
- listId = list.id;
- title = list.title;
+ type = CacheListType.OFFLINE;
Settings.saveLastList(listId);
+ initAdapter();
+
showProgress(true);
showFooterLoadingCaches();
DataStore.moveToList(adapter.getCheckedCaches(), listId);
- currentLoader = (OfflineGeocacheListLoader) getSupportLoaderManager().initLoader(CacheListType.OFFLINE.getLoaderId(), new Bundle(), this);
- currentLoader.reset();
- ((OfflineGeocacheListLoader) currentLoader).setListId(listId);
- ((OfflineGeocacheListLoader) currentLoader).setSearchCenter(coords);
- currentLoader.startLoading();
+ currentLoader = (OfflineGeocacheListLoader) getSupportLoaderManager().restartLoader(CacheListType.OFFLINE.getLoaderId(), OfflineGeocacheListLoader.getBundleForList(listId), this);
invalidateOptionsMenuCompatible();
}
@@ -1356,6 +1406,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
private void removeListInternal() {
if (DataStore.removeList(listId)) {
showToast(res.getString(R.string.list_dialog_remove_ok));
+ refreshSpinnerAdapter();
switchListById(StoredList.STANDARD_LIST_ID);
} else {
showToast(res.getString(R.string.list_dialog_remove_err));
@@ -1365,12 +1416,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
private void removeList(final boolean askForConfirmation) {
// if there are no caches on this list, don't bother the user with questions.
// there is no harm in deleting the list, he could recreate it easily
- if (CollectionUtils.isEmpty(cacheList)) {
- removeListInternal();
- return;
- }
-
- if (!askForConfirmation) {
+ if (!askForConfirmation && CollectionUtils.isEmpty(cacheList)) {
removeListInternal();
return;
}
@@ -1378,17 +1424,13 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
// ask him, if there are caches on the list
Dialogs.confirm(this, R.string.list_dialog_remove_title, R.string.list_dialog_remove_description, R.string.list_dialog_remove, new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int whichButton) {
+ public void onClick(final DialogInterface dialog, final int whichButton) {
removeListInternal();
}
});
}
- /**
- * @param view
- * unused here but needed since this method is referenced from XML layout
- */
- public void goMap(View view) {
+ public void goMap() {
if (!cacheToShow()) {
return;
}
@@ -1404,6 +1446,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
private void refreshCurrentList() {
+ refreshSpinnerAdapter();
switchListById(listId);
}
@@ -1467,7 +1510,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
context.startActivity(cachesIntent);
}
- public static void startActivityHistory(Context context) {
+ public static void startActivityHistory(final Context context) {
final Intent cachesIntent = new Intent(context, CacheListActivity.class);
cachesIntent.putExtra(Intents.EXTRA_LIST_TYPE, CacheListType.HISTORY);
context.startActivity(cachesIntent);
@@ -1491,7 +1534,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
context.startActivity(cachesIntent);
}
- private static boolean isValidCoords(AbstractActivity context, Geopoint coords) {
+ private static boolean isValidCoords(final AbstractActivity context, final Geopoint coords) {
if (coords == null) {
context.showToast(CgeoApplication.getInstance().getString(R.string.warn_no_coordinates));
return false;
@@ -1533,7 +1576,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
// Loaders
@Override
- public Loader<SearchResult> onCreateLoader(int type, Bundle extras) {
+ public Loader<SearchResult> onCreateLoader(final int type, final Bundle extras) {
if (type >= CacheListLoaderType.values().length) {
throw new IllegalArgumentException("invalid loader type " + type);
}
@@ -1544,11 +1587,12 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
// open either the requested or the last list
if (extras.containsKey(Intents.EXTRA_LIST_ID)) {
listId = extras.getInt(Intents.EXTRA_LIST_ID);
- }
- else {
+ } else {
listId = Settings.getLastList();
}
- if (listId <= StoredList.TEMPORARY_LIST_ID) {
+ if (listId == PseudoList.ALL_LIST.id) {
+ title = res.getString(R.string.list_all_lists);
+ } else if (listId <= StoredList.TEMPORARY_LIST_ID) {
listId = StoredList.STANDARD_LIST_ID;
title = res.getString(R.string.stored_caches_button);
} else {
@@ -1566,6 +1610,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
break;
case HISTORY:
title = res.getString(R.string.caches_history);
+ listId = PseudoList.HISTORY_LIST.id;
loader = new HistoryGeocacheListLoader(app, coords);
break;
case NEAREST:
@@ -1625,7 +1670,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
loader = new PocketGeocacheListLoader(app, guid);
break;
}
- setTitle(title);
+ updateTitle();
showProgress(true);
showFooterLoadingCaches();
@@ -1635,7 +1680,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
return loader;
}
- private void rememberTerm(String term) {
+ private void rememberTerm(final String term) {
// set the title of the activity
title = term;
// and remember this term for potential use in list creation
@@ -1643,7 +1688,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
@Override
- public void onLoadFinished(Loader<SearchResult> arg0, SearchResult searchIn) {
+ public void onLoadFinished(final Loader<SearchResult> arg0, final SearchResult searchIn) {
// The database search was moved into the UI call intentionally. If this is done before the runOnUIThread,
// then we have 2 sets of caches in memory. This can lead to OOM for huge cache lists.
if (searchIn != null) {
@@ -1660,10 +1705,46 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA
}
showProgress(false);
hideLoading();
+ invalidateOptionsMenuCompatible();
}
@Override
- public void onLoaderReset(Loader<SearchResult> arg0) {
+ public void onLoaderReset(final Loader<SearchResult> arg0) {
//Not interesting
}
+
+ /**
+ * Allow the title bar spinner to show the same subtitle like the activity itself would show.
+ *
+ * @param list
+ * @return
+ */
+ public CharSequence getCacheListSubtitle(@NonNull final AbstractList list) {
+ // if this is the current list, be aware of filtering
+ if (list.id == listId) {
+ return getCurrentSubtitle();
+ }
+ // otherwise return the overall number
+ final int numberOfCaches = list.getNumberOfCaches();
+ if (numberOfCaches < 0) {
+ return StringUtils.EMPTY;
+ }
+ return getCacheNumberString(getResources(), numberOfCaches);
+ }
+
+ /**
+ * Calculate the subtitle of the current list depending on (optional) filters.
+ *
+ * @return
+ */
+ private CharSequence getCurrentSubtitle() {
+ final ArrayList<String> numbers = new ArrayList<>();
+ if (adapter.isFiltered()) {
+ numbers.add(getCacheNumberString(getResources(), adapter.getCount()));
+ }
+ if (search != null) {
+ numbers.add(getCacheNumberString(getResources(), search.getCount()));
+ }
+ return numbers.isEmpty() ? null : StringUtils.join(numbers, '/');
+ }
}
diff --git a/main/src/cgeo/geocaching/CacheListSpinnerAdapter.java b/main/src/cgeo/geocaching/CacheListSpinnerAdapter.java
new file mode 100644
index 0000000..6311e47
--- /dev/null
+++ b/main/src/cgeo/geocaching/CacheListSpinnerAdapter.java
@@ -0,0 +1,68 @@
+package cgeo.geocaching;
+
+import cgeo.geocaching.list.AbstractList;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.TextView;
+
+class CacheListSpinnerAdapter extends ArrayAdapter<AbstractList> {
+
+ static class ViewHolder {
+ TextView title;
+ TextView subtitle;
+ }
+
+ private final CacheListActivity cacheListActivity;
+
+ public CacheListSpinnerAdapter(final CacheListActivity context, final int resource) {
+ super(context, resource);
+ cacheListActivity = context;
+ }
+
+
+ @Override
+ public View getView(final int position, final View convertView, final ViewGroup parent) {
+ return getCustomView(position, convertView, parent);
+ }
+
+
+ @Override
+ public View getDropDownView(final int position, final View convertView, final ViewGroup parent) {
+ return getCustomView(position, convertView, parent);
+ }
+
+ public View getCustomView(final int position, final View convertView, final ViewGroup parent) {
+
+ View resultView = convertView;
+ final LayoutInflater inflater =
+ (LayoutInflater) cacheListActivity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+
+
+ CacheListSpinnerAdapter.ViewHolder holder;
+ if (resultView == null) {
+ resultView = inflater.inflate(R.layout.cachelist_spinneritem, parent, false);
+ holder = new ViewHolder();
+ holder.title = (TextView) resultView.findViewById(android.R.id.text1);
+ holder.subtitle = (TextView) resultView.findViewById(android.R.id.text2);
+
+ resultView.setTag(holder);
+ } else {
+ holder = (CacheListSpinnerAdapter.ViewHolder) resultView.getTag();
+ }
+
+ final AbstractList list = getItem(position);
+ holder.title.setText(list.getTitle());
+ if (list.getNumberOfCaches() >= 0) {
+ holder.subtitle.setVisibility(View.VISIBLE);
+ holder.subtitle.setText(cacheListActivity.getCacheListSubtitle(list));
+ } else {
+ holder.subtitle.setVisibility(View.GONE);
+ }
+
+ return resultView;
+ }
+} \ No newline at end of file
diff --git a/main/src/cgeo/geocaching/CacheMenuHandler.java b/main/src/cgeo/geocaching/CacheMenuHandler.java
index cfe9eeb..9c8af50 100644
--- a/main/src/cgeo/geocaching/CacheMenuHandler.java
+++ b/main/src/cgeo/geocaching/CacheMenuHandler.java
@@ -5,13 +5,17 @@ import cgeo.geocaching.apps.cache.navi.NavigationAppFactory;
import cgeo.geocaching.ui.AbstractUIFactory;
import android.app.Activity;
+import android.support.v4.app.Fragment;
+import android.support.v4.view.MenuItemCompat;
+import android.support.v7.widget.ShareActionProvider;
import android.view.Menu;
+import android.view.MenuInflater;
import android.view.MenuItem;
/**
* Shared menu handling for all activities having menu items related to a cache. <br>
* TODO: replace by a fragment
- *
+ *
*/
public class CacheMenuHandler extends AbstractUIFactory {
@@ -19,7 +23,7 @@ public class CacheMenuHandler extends AbstractUIFactory {
* Methods to be implemented by the activity to react to the cache menu selections.
*
*/
- protected interface ActivityInterface {
+ interface ActivityInterface {
public void navigateTo();
public void showNavigationMenu();
@@ -28,9 +32,15 @@ public class CacheMenuHandler extends AbstractUIFactory {
}
- public static boolean onMenuItemSelected(MenuItem item, CacheMenuHandler.ActivityInterface activityInterface, Geocache cache) {
- assert activityInterface instanceof Activity;
- final Activity activity = (Activity) activityInterface;
+ public static boolean onMenuItemSelected(final MenuItem item, final CacheMenuHandler.ActivityInterface activityInterface, final Geocache cache) {
+ assert activityInterface instanceof Activity || activityInterface instanceof Fragment;
+ final Activity activity;
+ if (activityInterface instanceof Activity) {
+ activity = (Activity) activityInterface;
+ } else {
+ activity = ((Fragment)activityInterface).getActivity();
+ }
+
switch (item.getItemId()) {
case R.id.menu_default_navigation:
activityInterface.navigateTo();
@@ -45,8 +55,14 @@ public class CacheMenuHandler extends AbstractUIFactory {
cache.openInBrowser(activity);
return true;
case R.id.menu_share:
- cache.shareCache(activity, res);
- return true;
+ /* If the share menu is a shareActionProvider do nothing and let the share ActionProvider do the work */
+ final ShareActionProvider shareActionProvider = (ShareActionProvider)
+ MenuItemCompat.getActionProvider(item);
+ if (shareActionProvider == null) {
+ cache.shareCache(activity, res);
+ return true;
+ }
+ return false;
case R.id.menu_calendar:
CalendarAddon.addToCalendarWithIntent(activity, cache);
return true;
@@ -56,7 +72,6 @@ public class CacheMenuHandler extends AbstractUIFactory {
}
public static void onPrepareOptionsMenu(final Menu menu, final Geocache cache) {
- //
if (cache == null) {
return;
}
@@ -68,10 +83,22 @@ public class CacheMenuHandler extends AbstractUIFactory {
menu.findItem(R.id.menu_show_in_browser).setVisible(cache.canOpenInBrowser());
menu.findItem(R.id.menu_default_navigation).setTitle(NavigationAppFactory.getDefaultNavigationApplication().getName());
+
+ final MenuItem shareItem = menu.findItem(R.id.menu_share);
+ final ShareActionProvider shareActionProvider = (ShareActionProvider)
+ MenuItemCompat.getActionProvider(shareItem);
+ if(shareActionProvider != null) {
+ shareActionProvider.setShareIntent(cache.getShareIntent());
+ }
+
}
- public static void addMenuItems(Activity activity, Menu menu, Geocache cache) {
- activity.getMenuInflater().inflate(R.menu.cache_options, menu);
+ public static void addMenuItems(final MenuInflater inflater, final Menu menu, final Geocache cache) {
+ inflater.inflate(R.menu.cache_options, menu);
onPrepareOptionsMenu(menu, cache);
}
+
+ public static void addMenuItems(final Activity activity, final Menu menu, final Geocache cache) {
+ addMenuItems(activity.getMenuInflater(), menu, cache);
+ }
}
diff --git a/main/src/cgeo/geocaching/CachePopup.java b/main/src/cgeo/geocaching/CachePopup.java
index 543be22..9036d00 100644
--- a/main/src/cgeo/geocaching/CachePopup.java
+++ b/main/src/cgeo/geocaching/CachePopup.java
@@ -1,203 +1,63 @@
package cgeo.geocaching;
-import cgeo.geocaching.activity.Progress;
-import cgeo.geocaching.apps.cache.navi.NavigationAppFactory;
-import cgeo.geocaching.geopoint.Geopoint;
-import cgeo.geocaching.list.StoredList;
-import cgeo.geocaching.network.Network;
-import cgeo.geocaching.settings.Settings;
-import cgeo.geocaching.ui.CacheDetailsCreator;
-import cgeo.geocaching.utils.CancellableHandler;
-import cgeo.geocaching.utils.Log;
+import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.ActivityMixin;
import org.apache.commons.lang3.StringUtils;
-import rx.Scheduler.Inner;
-import rx.functions.Action1;
-import rx.schedulers.Schedulers;
import android.content.Context;
import android.content.Intent;
-import android.content.res.Configuration;
-import android.os.Handler;
-import android.os.Message;
-import android.view.View;
-import android.widget.LinearLayout;
-import android.widget.TextView;
+import android.os.Bundle;
+import android.support.v4.app.DialogFragment;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentTransaction;
+import android.view.Window;
-public class CachePopup extends AbstractPopupActivity {
- private final Progress progress = new Progress();
+public class CachePopup extends AbstractActivity {
- private class StoreCacheHandler extends CancellableHandler {
- private final int progressMessage;
+ protected String geocode = null;
- public StoreCacheHandler(final int progressMessage) {
- this.progressMessage = progressMessage;
- }
-
- @Override
- public void handleRegularMessage(Message msg) {
- if (UPDATE_LOAD_PROGRESS_DETAIL == msg.what && msg.obj instanceof String) {
- updateStatusMsg((String) msg.obj);
- } else {
- init();
- }
- }
- private void updateStatusMsg(final String msg) {
- progress.setMessage(res.getString(progressMessage)
- + "\n\n"
- + msg);
+ void showDialog() {
+ // DialogFragment.show() will take care of adding the fragment
+ // in a transaction. We also want to remove any currently showing
+ // dialog, so make our own transaction and take care of that here.
+ FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
+ Fragment prev = getSupportFragmentManager().findFragmentByTag("dialog");
+ if (prev != null) {
+ ft.remove(prev);
}
- }
+ ft.addToBackStack(null);
- private class DropCacheHandler extends Handler {
- @Override
- public void handleMessage(Message msg) {
- CachePopup.this.finish();
- }
- }
-
- public CachePopup() {
- super(R.layout.popup);
+ // Create and show the dialog.
+ DialogFragment newFragment = CachePopupFragment.newInstance(geocode);
+ newFragment.show(ft, "dialog");
}
@Override
- public void showNavigationMenu() {
- NavigationAppFactory.showNavigationMenu(this, cache, null, null);
- }
-
- @Override
- protected void init() {
- super.init();
- try {
- if (StringUtils.isNotBlank(cache.getName())) {
- setTitle(cache.getName());
- } else {
- setTitle(geocode);
- }
-
- // actionbar icon
- ((TextView) findViewById(R.id.actionbar_title)).setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(cache.getType().markerId), null, null, null);
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
+ this.setTheme(ActivityMixin.getDialogTheme());
- details = new CacheDetailsCreator(this, (LinearLayout) findViewById(R.id.details_list));
- addCacheDetails();
-
- // offline use
- CacheDetailActivity.updateOfflineBox(findViewById(android.R.id.content), cache, res, new RefreshCacheClickListener(), new DropCacheClickListener(), new StoreCacheClickListener());
-
- } catch (Exception e) {
- Log.e("CachePopup.init", e);
+ final Bundle extras = getIntent().getExtras();
+ if (extras != null) {
+ geocode = extras.getString(Intents.EXTRA_GEOCODE);
}
- // cache is loaded. remove progress-popup if any there
- progress.dismiss();
- }
-
- @Override
- public void onConfigurationChanged(Configuration newConfig) {
- super.onConfigurationChanged(newConfig);
-
- init();
- }
-
- private class StoreCacheClickListener implements View.OnClickListener {
- @Override
- public void onClick(View arg0) {
- if (progress.isShowing()) {
- showToast(res.getString(R.string.err_detail_still_working));
- return;
- }
-
- if (Settings.getChooseList()) {
- // let user select list to store cache in
- new StoredList.UserInterface(CachePopup.this).promptForListSelection(R.string.list_title,
- new Action1<Integer>() {
- @Override
- public void call(final Integer selectedListId) {
- storeCache(selectedListId);
- }
- }, true, StoredList.TEMPORARY_LIST_ID);
- } else {
- storeCache(StoredList.TEMPORARY_LIST_ID);
- }
- }
+ if (StringUtils.isBlank(geocode)) {
+ showToast(res.getString(R.string.err_detail_cache_find));
- protected void storeCache(final int listId) {
- final StoreCacheHandler storeCacheHandler = new StoreCacheHandler(R.string.cache_dialog_offline_save_message);
- progress.show(CachePopup.this, res.getString(R.string.cache_dialog_offline_save_title), res.getString(R.string.cache_dialog_offline_save_message), true, storeCacheHandler.cancelMessage());
- Schedulers.io().schedule(new Action1<Inner>() {
- @Override
- public void call(final Inner inner) {
- cache.store(listId, storeCacheHandler);
- invalidateOptionsMenuCompatible();
- }
- });
- }
- }
-
- private class RefreshCacheClickListener implements View.OnClickListener {
- @Override
- public void onClick(View arg0) {
- if (progress.isShowing()) {
- showToast(res.getString(R.string.err_detail_still_working));
- return;
- }
-
- if (!Network.isNetworkConnected(getApplicationContext())) {
- showToast(getString(R.string.err_server));
- return;
- }
-
- final StoreCacheHandler refreshCacheHandler = new StoreCacheHandler(R.string.cache_dialog_offline_save_message);
- progress.show(CachePopup.this, res.getString(R.string.cache_dialog_refresh_title), res.getString(R.string.cache_dialog_refresh_message), true, refreshCacheHandler.cancelMessage());
- cache.refresh(cache.getListId(), refreshCacheHandler, Schedulers.io());
- }
- }
-
- private class DropCacheClickListener implements View.OnClickListener {
- @Override
- public void onClick(View arg0) {
- if (progress.isShowing()) {
- showToast(res.getString(R.string.err_detail_still_working));
- return;
- }
-
- final DropCacheHandler dropCacheHandler = new DropCacheHandler();
- progress.show(CachePopup.this, res.getString(R.string.cache_dialog_offline_drop_title), res.getString(R.string.cache_dialog_offline_drop_message), true, null);
- cache.drop(dropCacheHandler, Schedulers.io());
- }
- }
-
- @Override
- public void navigateTo() {
- NavigationAppFactory.startDefaultNavigationApplication(1, this, cache);
- }
-
- /**
- * Tries to navigate to the {@link Geocache} of this activity.
- */
- @Override
- protected void startDefaultNavigation2() {
- if (cache == null || cache.getCoords() == null) {
- showToast(res.getString(R.string.cache_coordinates_no));
+ finish();
return;
}
- NavigationAppFactory.startDefaultNavigationApplication(2, this, cache);
- finish();
+ showDialog();
}
- public static void startActivity(final Context context, final String geocode) {
+ public static void startActivity(Context context, String geocode) {
final Intent popupIntent = new Intent(context, CachePopup.class);
popupIntent.putExtra(Intents.EXTRA_GEOCODE, geocode);
context.startActivity(popupIntent);
}
-
- @Override
- protected Geopoint getCoordinates() {
- if (cache == null) {
- return null;
- }
- return cache.getCoords();
- }
}
diff --git a/main/src/cgeo/geocaching/CachePopupFragment.java b/main/src/cgeo/geocaching/CachePopupFragment.java
new file mode 100644
index 0000000..b2af12c
--- /dev/null
+++ b/main/src/cgeo/geocaching/CachePopupFragment.java
@@ -0,0 +1,230 @@
+package cgeo.geocaching;
+
+import cgeo.geocaching.activity.Progress;
+import cgeo.geocaching.apps.cache.navi.NavigationAppFactory;
+import cgeo.geocaching.geopoint.Geopoint;
+import cgeo.geocaching.list.StoredList;
+import cgeo.geocaching.network.Network;
+import cgeo.geocaching.settings.Settings;
+import cgeo.geocaching.ui.CacheDetailsCreator;
+import cgeo.geocaching.utils.CancellableHandler;
+import cgeo.geocaching.utils.Log;
+import cgeo.geocaching.utils.RxUtils;
+
+import org.apache.commons.lang3.StringUtils;
+
+import rx.functions.Action0;
+import rx.functions.Action1;
+import rx.schedulers.Schedulers;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.res.Configuration;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.support.v4.app.DialogFragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+public class CachePopupFragment extends AbstractDialogFragment {
+ private final Progress progress = new Progress();
+
+ public static DialogFragment newInstance(String geocode) {
+
+ Bundle args = new Bundle();
+ args.putString(GEOCODE_ARG,geocode);
+
+ DialogFragment f = new CachePopupFragment();
+ f.setStyle(DialogFragment.STYLE_NO_TITLE,0);
+ f.setArguments(args);
+
+ return f;
+ }
+
+ private class StoreCacheHandler extends CancellableHandler {
+ private final int progressMessage;
+
+ public StoreCacheHandler(final int progressMessage) {
+ this.progressMessage = progressMessage;
+ }
+
+ @Override
+ public void handleRegularMessage(Message msg) {
+ if (UPDATE_LOAD_PROGRESS_DETAIL == msg.what && msg.obj instanceof String) {
+ updateStatusMsg((String) msg.obj);
+ } else {
+ init();
+ }
+ }
+
+ private void updateStatusMsg(final String msg) {
+ progress.setMessage(res.getString(progressMessage)
+ + "\n\n"
+ + msg);
+ }
+ }
+
+ private class DropCacheHandler extends Handler {
+ @Override
+ public void handleMessage(Message msg) {
+ getActivity().finish();
+ }
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+ View v = inflater.inflate(R.layout.popup, container, false);
+ initCustomActionBar(v);
+ return v;
+ }
+
+ @Override
+ protected void init() {
+ super.init();
+
+ try {
+ if (StringUtils.isNotBlank(cache.getName())) {
+ setTitle(cache.getName());
+ } else {
+ setTitle(geocode);
+ }
+
+ ((TextView) getView().findViewById(R.id.actionbar_title)).setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(cache.getType().markerId), null, null, null);
+
+ details = new CacheDetailsCreator(getActivity(), (LinearLayout) getView().findViewById(R.id.details_list));
+
+ addCacheDetails();
+
+ // offline use
+ CacheDetailActivity.updateOfflineBox(getView(), cache, res, new RefreshCacheClickListener(), new DropCacheClickListener(), new StoreCacheClickListener());
+
+ } catch (Exception e) {
+ Log.e("CachePopupFragment.init", e);
+ }
+
+ // cache is loaded. remove progress-popup if any there
+ progress.dismiss();
+ }
+
+
+
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+
+ init();
+ }
+
+ private class StoreCacheClickListener implements View.OnClickListener {
+ @Override
+ public void onClick(View arg0) {
+ if (progress.isShowing()) {
+ showToast(res.getString(R.string.err_detail_still_working));
+ return;
+ }
+
+ if (Settings.getChooseList()) {
+ // let user select list to store cache in
+ new StoredList.UserInterface(getActivity()).promptForListSelection(R.string.list_title,
+ new Action1<Integer>() {
+ @Override
+ public void call(final Integer selectedListId) {
+ storeCache(selectedListId);
+ }
+ }, true, StoredList.TEMPORARY_LIST_ID);
+ } else {
+ storeCache(StoredList.TEMPORARY_LIST_ID);
+ }
+ }
+
+ protected void storeCache(final int listId) {
+ final StoreCacheHandler storeCacheHandler = new StoreCacheHandler(R.string.cache_dialog_offline_save_message);
+ progress.show(getActivity(), res.getString(R.string.cache_dialog_offline_save_title), res.getString(R.string.cache_dialog_offline_save_message), true, storeCacheHandler.cancelMessage());
+ Schedulers.io().createWorker().schedule(new Action0() {
+ @Override
+ public void call() {
+ cache.store(listId, storeCacheHandler);
+ getActivity().supportInvalidateOptionsMenu();
+ }
+ });
+ }
+ }
+
+ private class RefreshCacheClickListener implements View.OnClickListener {
+ @Override
+ public void onClick(View arg0) {
+ if (progress.isShowing()) {
+ showToast(res.getString(R.string.err_detail_still_working));
+ return;
+ }
+
+ if (!Network.isNetworkConnected(getActivity())) {
+ showToast(getString(R.string.err_server));
+ return;
+ }
+
+ final StoreCacheHandler refreshCacheHandler = new StoreCacheHandler(R.string.cache_dialog_offline_save_message);
+ progress.show(getActivity(), res.getString(R.string.cache_dialog_refresh_title), res.getString(R.string.cache_dialog_refresh_message), true, refreshCacheHandler.cancelMessage());
+ cache.refresh(refreshCacheHandler, RxUtils.networkScheduler);
+ }
+ }
+
+ private class DropCacheClickListener implements View.OnClickListener {
+ @Override
+ public void onClick(View arg0) {
+ if (progress.isShowing()) {
+ showToast(res.getString(R.string.err_detail_still_working));
+ return;
+ }
+
+ final DropCacheHandler dropCacheHandler = new DropCacheHandler();
+ progress.show(getActivity(), res.getString(R.string.cache_dialog_offline_drop_title), res.getString(R.string.cache_dialog_offline_drop_message), true, null);
+ cache.drop(dropCacheHandler, Schedulers.io());
+ }
+ }
+
+
+ @Override
+ public void navigateTo() {
+ NavigationAppFactory.startDefaultNavigationApplication(1, getActivity(), cache);
+ }
+
+ @Override
+ public void showNavigationMenu() {
+ NavigationAppFactory.showNavigationMenu(getActivity(), cache, null, null, true, true);
+ }
+
+
+ /**
+ * Tries to navigate to the {@link cgeo.geocaching.Geocache} of this activity.
+ */
+ @Override
+ protected void startDefaultNavigation2() {
+ if (cache == null || cache.getCoords() == null) {
+ showToast(res.getString(R.string.cache_coordinates_no));
+ return;
+ }
+ NavigationAppFactory.startDefaultNavigationApplication(2, getActivity(), cache);
+ getActivity().finish();
+ }
+
+ public static void startActivity(final Context context, final String geocode) {
+ final Intent popupIntent = new Intent(context, CachePopup.class);
+ popupIntent.putExtra(Intents.EXTRA_GEOCODE, geocode);
+ context.startActivity(popupIntent);
+ }
+
+ @Override
+ protected Geopoint getCoordinates() {
+ if (cache == null) {
+ return null;
+ }
+ return cache.getCoords();
+ }
+
+
+}
diff --git a/main/src/cgeo/geocaching/CgeoApplication.java b/main/src/cgeo/geocaching/CgeoApplication.java
index 09aee93..863dcdd 100644
--- a/main/src/cgeo/geocaching/CgeoApplication.java
+++ b/main/src/cgeo/geocaching/CgeoApplication.java
@@ -4,12 +4,16 @@ import cgeo.geocaching.sensors.DirectionProvider;
import cgeo.geocaching.sensors.GeoDataProvider;
import cgeo.geocaching.sensors.IGeoData;
import cgeo.geocaching.utils.Log;
+import cgeo.geocaching.utils.OOMDumpingUncaughtExceptionHandler;
import rx.Observable;
import rx.functions.Action1;
import rx.observables.ConnectableObservable;
import android.app.Application;
+import android.view.ViewConfiguration;
+
+import java.lang.reflect.Field;
public class CgeoApplication extends Application {
@@ -22,6 +26,20 @@ public class CgeoApplication extends Application {
private volatile IGeoData currentGeo = null;
private volatile float currentDirection = 0.0f;
+ public static void dumpOnOutOfMemory(final boolean enable) {
+
+ if (enable) {
+
+ if (!OOMDumpingUncaughtExceptionHandler.activateHandler()) {
+ Log.e("OOM dumping handler not activated (either a problem occured or it was already active)");
+ }
+ } else {
+ if (!OOMDumpingUncaughtExceptionHandler.resetToDefault()) {
+ Log.e("OOM dumping handler not resetted (either a problem occured or it was not active)");
+ }
+ }
+ }
+
public CgeoApplication() {
setInstance(this);
}
@@ -35,6 +53,24 @@ public class CgeoApplication extends Application {
}
@Override
+ public void onCreate() {
+ try {
+ final ViewConfiguration config = ViewConfiguration.get(this);
+ final Field menuKeyField = ViewConfiguration.class.getDeclaredField("sHasPermanentMenuKey");
+ menuKeyField.setAccessible(true);
+ menuKeyField.setBoolean(config, false);
+ } catch (final IllegalArgumentException e) {
+ // ignore
+ } catch (final NoSuchFieldException e) {
+ // ignore
+ } catch (final IllegalAccessException e) {
+ // ignore
+ }
+ // ensure initialization of lists
+ DataStore.getLists();
+ }
+
+ @Override
public void onLowMemory() {
Log.i("Cleaning applications cache.");
DataStore.removeAllFromCache();
@@ -69,7 +105,7 @@ public class CgeoApplication extends Application {
}
public IGeoData currentGeo() {
- return currentGeo != null ? currentGeo : geoDataObservable().toBlockingObservable().first();
+ return currentGeo != null ? currentGeo : geoDataObservable().toBlocking().first();
}
public float currentDirection() {
diff --git a/main/src/cgeo/geocaching/CompassActivity.java b/main/src/cgeo/geocaching/CompassActivity.java
index 36dcf27..025d938 100644
--- a/main/src/cgeo/geocaching/CompassActivity.java
+++ b/main/src/cgeo/geocaching/CompassActivity.java
@@ -3,7 +3,7 @@ package cgeo.geocaching;
import butterknife.ButterKnife;
import butterknife.InjectView;
-import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.AbstractActionBarActivity;
import cgeo.geocaching.enumerations.LoadFlags;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.Units;
@@ -14,8 +14,8 @@ import cgeo.geocaching.sensors.IGeoData;
import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.speech.SpeechService;
import cgeo.geocaching.ui.CompassView;
-import cgeo.geocaching.ui.Formatter;
import cgeo.geocaching.ui.LoggingUI;
+import cgeo.geocaching.utils.Formatter;
import cgeo.geocaching.utils.Log;
import org.apache.commons.lang3.StringUtils;
@@ -38,7 +38,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-public class CompassActivity extends AbstractActivity {
+public class CompassActivity extends AbstractActionBarActivity {
private static final int COORDINATES_OFFSET = 10;
@@ -56,7 +56,7 @@ public class CompassActivity extends AbstractActivity {
private static final String EXTRAS_NAME = "name";
private static final String EXTRAS_GEOCODE = "geocode";
private static final String EXTRAS_CACHE_INFO = "cacheinfo";
- private static final List<IWaypoint> coordinates = new ArrayList<IWaypoint>();
+ private static final List<IWaypoint> coordinates = new ArrayList<>();
/**
* Destination of the compass, or null (if the compass is used for a waypoint only).
@@ -69,7 +69,7 @@ public class CompassActivity extends AbstractActivity {
private boolean hasMagneticFieldSensor;
@Override
- public void onCreate(Bundle savedInstanceState) {
+ public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState, R.layout.compass_activity);
final SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);
@@ -79,7 +79,7 @@ public class CompassActivity extends AbstractActivity {
}
// get parameters
- Bundle extras = getIntent().getExtras();
+ final Bundle extras = getIntent().getExtras();
if (extras != null) {
final String geocode = extras.getString(EXTRAS_GEOCODE);
if (StringUtils.isNotEmpty(geocode)) {
@@ -98,7 +98,7 @@ public class CompassActivity extends AbstractActivity {
}
}
} else {
- Intent pointIntent = new Intent(this, NavigateAnyPointActivity.class);
+ final Intent pointIntent = new Intent(this, NavigateAnyPointActivity.class);
startActivity(pointIntent);
finish();
@@ -129,7 +129,7 @@ public class CompassActivity extends AbstractActivity {
}
@Override
- public void onConfigurationChanged(Configuration newConfig) {
+ public void onConfigurationChanged(final Configuration newConfig) {
super.onConfigurationChanged(newConfig);
setContentView(R.layout.compass_activity);
@@ -150,7 +150,7 @@ public class CompassActivity extends AbstractActivity {
@Override
public boolean onCreateOptionsMenu(final Menu menu) {
getMenuInflater().inflate(R.menu.compass_activity_options, menu);
- menu.findItem(R.id.menu_switch_compass_gps).setVisible(hasMagneticFieldSensor);
+ menu.findItem(R.id.menu_compass_sensor).setVisible(hasMagneticFieldSensor);
final SubMenu subMenu = menu.findItem(R.id.menu_select_destination).getSubMenu();
if (coordinates.size() > 1) {
for (int i = 0; i < coordinates.size(); i++) {
@@ -167,43 +167,47 @@ public class CompassActivity extends AbstractActivity {
}
@Override
- public boolean onPrepareOptionsMenu(Menu menu) {
+ public boolean onPrepareOptionsMenu(final Menu menu) {
super.onPrepareOptionsMenu(menu);
- menu.findItem(R.id.menu_switch_compass_gps).setTitle(res.getString(Settings.isUseCompass() ? R.string.use_gps : R.string.use_compass));
+ if (Settings.isUseCompass()) {
+ menu.findItem(R.id.menu_compass_sensor_magnetic).setChecked(true);
+ }
+ else {
+ menu.findItem(R.id.menu_compass_sensor_gps).setChecked(true);
+ }
menu.findItem(R.id.menu_tts_start).setVisible(!SpeechService.isRunning());
menu.findItem(R.id.menu_tts_stop).setVisible(SpeechService.isRunning());
return true;
}
@Override
- public boolean onOptionsItemSelected(MenuItem item) {
- int id = item.getItemId();
+ public boolean onOptionsItemSelected(final MenuItem item) {
+ final int id = item.getItemId();
switch (id) {
case R.id.menu_map:
CGeoMap.startActivityCoords(this, dstCoords, null, null);
return true;
- case R.id.menu_switch_compass_gps:
- boolean oldSetting = Settings.isUseCompass();
- Settings.setUseCompass(!oldSetting);
+ case R.id.menu_compass_sensor_gps:
+ Settings.setUseCompass(false);
invalidateOptionsMenuCompatible();
return true;
- case R.id.menu_edit_destination:
- Intent pointIntent = new Intent(this, NavigateAnyPointActivity.class);
- startActivity(pointIntent);
-
- finish();
+ case R.id.menu_compass_sensor_magnetic:
+ Settings.setUseCompass(true);
+ invalidateOptionsMenuCompatible();
return true;
case R.id.menu_tts_start:
SpeechService.startService(this, dstCoords);
+ invalidateOptionsMenuCompatible();
return true;
case R.id.menu_tts_stop:
SpeechService.stopService(this);
+ invalidateOptionsMenuCompatible();
return true;
default:
if (LoggingUI.onMenuItemSelected(item, this, cache)) {
return true;
}
- int coordinatesIndex = id - COORDINATES_OFFSET;
+ final int coordinatesIndex = id - COORDINATES_OFFSET;
if (coordinatesIndex >= 0 && coordinatesIndex < coordinates.size()) {
final IWaypoint coordinate = coordinates.get(coordinatesIndex);
title = coordinate.getName();
@@ -217,7 +221,7 @@ public class CompassActivity extends AbstractActivity {
return true;
}
}
- return false;
+ return super.onOptionsItemSelected(item);
}
private void setTitle() {
@@ -255,7 +259,7 @@ public class CompassActivity extends AbstractActivity {
headingView.setText(Math.round(cacheHeading) + "°");
}
- private GeoDirHandler geoDirHandler = new GeoDirHandler() {
+ private final GeoDirHandler geoDirHandler = new GeoDirHandler() {
@Override
public void updateGeoDir(final IGeoData geo, final float dir) {
try {
@@ -283,7 +287,7 @@ public class CompassActivity extends AbstractActivity {
}
updateNorthHeading(DirectionProvider.getDirectionNow(dir));
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
Log.w("Failed to LocationUpdater location.");
}
}
@@ -299,7 +303,7 @@ public class CompassActivity extends AbstractActivity {
final String info) {
coordinates.clear();
if (coordinatesWithType != null) {
- for (IWaypoint coordinate : coordinatesWithType) {
+ for (final IWaypoint coordinate : coordinatesWithType) {
if (coordinate != null) {
coordinates.add(coordinate);
}
diff --git a/main/src/cgeo/geocaching/CreateShortcutActivity.java b/main/src/cgeo/geocaching/CreateShortcutActivity.java
index b6ea4f6..ffcf81b 100644
--- a/main/src/cgeo/geocaching/CreateShortcutActivity.java
+++ b/main/src/cgeo/geocaching/CreateShortcutActivity.java
@@ -1,6 +1,6 @@
package cgeo.geocaching;
-import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.AbstractActionBarActivity;
import cgeo.geocaching.list.PseudoList;
import cgeo.geocaching.list.StoredList;
@@ -10,7 +10,7 @@ import android.content.Intent;
import android.content.Intent.ShortcutIconResource;
import android.os.Bundle;
-public class CreateShortcutActivity extends AbstractActivity {
+public class CreateShortcutActivity extends AbstractActionBarActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -27,7 +27,7 @@ public class CreateShortcutActivity extends AbstractActivity {
@Override
public void call(final Integer listId) {
- final Intent shortcut = createShortcut(listId.intValue());
+ final Intent shortcut = createShortcut(listId);
setResult(RESULT_OK, shortcut);
// finish activity to return the shortcut
diff --git a/main/src/cgeo/geocaching/DataStore.java b/main/src/cgeo/geocaching/DataStore.java
index 32a4b64..e236f8f 100644
--- a/main/src/cgeo/geocaching/DataStore.java
+++ b/main/src/cgeo/geocaching/DataStore.java
@@ -16,6 +16,7 @@ import cgeo.geocaching.geopoint.Viewport;
import cgeo.geocaching.list.AbstractList;
import cgeo.geocaching.list.PseudoList;
import cgeo.geocaching.list.StoredList;
+import cgeo.geocaching.search.SearchSuggestionCursor;
import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.dialog.Dialogs;
import cgeo.geocaching.utils.FileUtils;
@@ -36,7 +37,6 @@ import rx.util.async.Async;
import android.app.Activity;
import android.app.ProgressDialog;
-import android.app.SearchManager;
import android.content.ContentValues;
import android.content.Context;
import android.content.ContextWrapper;
@@ -49,7 +49,6 @@ import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteDoneException;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteStatement;
-import android.provider.BaseColumns;
import java.io.File;
import java.io.FilenameFilter;
@@ -57,6 +56,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
+import java.util.Comparator;
import java.util.Date;
import java.util.EnumSet;
import java.util.HashMap;
@@ -325,7 +325,7 @@ public class DataStore {
final DbHelper dbHelper = new DbHelper(new DBContext(CgeoApplication.getInstance()));
try {
database = dbHelper.getWritableDatabase();
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("DataStore.init: unable to open database for R/W", e);
recreateDatabase(dbHelper);
}
@@ -347,7 +347,7 @@ public class DataStore {
}
try {
database = dbHelper.getWritableDatabase();
- } catch (Exception f) {
+ } catch (final Exception f) {
Log.e("DataStore.init: unable to recreate database and open it for R/W", f);
}
}
@@ -420,14 +420,14 @@ public class DataStore {
init();
return true;
}
- })).subscribe(new Action1<Boolean>() {
+ })).subscribeOn(Schedulers.io()).subscribe(new Action1<Boolean>() {
@Override
public void call(final Boolean success) {
dialog.dismiss();
final String message = success ? fromActivity.getString(R.string.init_dbmove_success) : fromActivity.getString(R.string.init_dbmove_failed);
Dialogs.message(fromActivity, R.string.init_dbmove_dbmove, message);
}
- }, Schedulers.io());
+ });
}
private static File databasePath(final boolean internal) {
@@ -464,7 +464,7 @@ public class DataStore {
private static class DBContext extends ContextWrapper {
- public DBContext(Context base) {
+ public DBContext(final Context base) {
super(base);
}
@@ -473,8 +473,8 @@ public class DataStore {
* causes issues on other devices too.
*/
@Override
- public SQLiteDatabase openOrCreateDatabase(String name, int mode,
- CursorFactory factory) {
+ public SQLiteDatabase openOrCreateDatabase(final String name, final int mode,
+ final CursorFactory factory) {
final File file = new File(name);
FileUtils.mkdirs(file.getParentFile());
return SQLiteDatabase.openOrCreateDatabase(file, factory);
@@ -486,12 +486,12 @@ public class DataStore {
private static boolean firstRun = true;
- DbHelper(Context context) {
+ DbHelper(final Context context) {
super(context, databasePath().getPath(), null, dbVersion);
}
@Override
- public void onCreate(SQLiteDatabase db) {
+ public void onCreate(final SQLiteDatabase db) {
newlyCreatedDatabase = true;
db.execSQL(dbCreateCaches);
db.execSQL(dbCreateLists);
@@ -528,7 +528,7 @@ public class DataStore {
}
@Override
- public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
+ public void onUpgrade(final SQLiteDatabase db, final int oldVersion, final int newVersion) {
Log.i("Upgrade database from ver. " + oldVersion + " to ver. " + newVersion + ": start");
try {
@@ -553,7 +553,7 @@ public class DataStore {
db.execSQL(dbCreateSearchDestinationHistory);
Log.i("Added table " + dbTableSearchDestionationHistory + ".");
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Failed to upgrade to ver. 52", e);
}
}
@@ -563,7 +563,7 @@ public class DataStore {
db.execSQL("alter table " + dbTableCaches + " add column onWatchlist integer");
Log.i("Column onWatchlist added to " + dbTableCaches + ".");
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Failed to upgrade to ver. 53", e);
}
}
@@ -571,7 +571,7 @@ public class DataStore {
if (oldVersion < 54) { // update to 54
try {
db.execSQL(dbCreateLogImages);
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Failed to upgrade to ver. 54", e);
}
@@ -580,7 +580,7 @@ public class DataStore {
if (oldVersion < 55) { // update to 55
try {
db.execSQL("alter table " + dbTableCaches + " add column personal_note text");
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Failed to upgrade to ver. 55", e);
}
}
@@ -592,7 +592,7 @@ public class DataStore {
db.execSQL("update " + dbTableAttributes + " set attribute = " +
"lower(attribute) where attribute like \"%_yes\" " +
"or attribute like \"%_no\"");
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Failed to upgrade to ver. 56", e);
}
}
@@ -607,7 +607,7 @@ public class DataStore {
db.execSQL("drop index in_e");
db.execSQL("drop index in_f");
createIndices(db);
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Failed to upgrade to ver. 57", e);
}
}
@@ -696,7 +696,7 @@ public class DataStore {
db.setTransactionSuccessful();
Log.i("Removed latitude_string and longitude_string columns");
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Failed to upgrade to ver. 58", e);
} finally {
db.endTransaction();
@@ -708,7 +708,7 @@ public class DataStore {
// Add new indices and remove obsolete cache files
createIndices(db);
removeObsoleteCacheDirectories(db);
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Failed to upgrade to ver. 59", e);
}
}
@@ -716,7 +716,7 @@ public class DataStore {
if (oldVersion < 60) {
try {
removeSecEmptyDirs();
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Failed to upgrade to ver. 60", e);
}
}
@@ -724,7 +724,7 @@ public class DataStore {
try {
db.execSQL("alter table " + dbTableLogs + " add column friend integer");
db.execSQL("alter table " + dbTableCaches + " add column coordsChanged integer default 0");
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Failed to upgrade to ver. 61", e);
}
@@ -735,7 +735,7 @@ public class DataStore {
db.execSQL("alter table " + dbTableCaches + " add column finalDefined integer default 0");
db.execSQL("alter table " + dbTableWaypoints + " add column own integer default 0");
db.execSQL("update " + dbTableWaypoints + " set own = 1 where type = 'own'");
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Failed to upgrade to ver. 62", e);
}
@@ -743,7 +743,7 @@ public class DataStore {
if (oldVersion < 63) {
try {
removeDoubleUnderscoreMapFiles();
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Failed to upgrade to ver. 63", e);
}
@@ -755,7 +755,7 @@ public class DataStore {
// rather than symbolic ones because the fix must be applied with the values at the time
// of the problem. The problem was introduced in release 2012.06.01.
db.execSQL("update " + dbTableCaches + " set reason=1 where reason=2");
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Failed to upgrade to ver. 64", e);
}
}
@@ -764,7 +764,7 @@ public class DataStore {
try {
// Set all waypoints where name is Original coordinates to type ORIGINAL
db.execSQL("update " + dbTableWaypoints + " set type='original', own=0 where name='Original Coordinates'");
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Failed to upgrade to ver. 65:", e);
}
}
@@ -772,7 +772,7 @@ public class DataStore {
if (oldVersion < 66) {
try {
db.execSQL("alter table " + dbTableWaypoints + " add column visited integer default 0");
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Failed to upgrade to ver. 66", e);
}
@@ -782,7 +782,7 @@ public class DataStore {
try {
db.execSQL("update " + dbTableAttributes + " set attribute = 'easy_climbing_yes' where geocode like 'OC%' and attribute = 'climbing_yes'");
db.execSQL("update " + dbTableAttributes + " set attribute = 'easy_climbing_no' where geocode like 'OC%' and attribute = 'climbing_no'");
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Failed to upgrade to ver. 67", e);
}
@@ -791,7 +791,7 @@ public class DataStore {
if (oldVersion < 68) {
try {
db.execSQL("alter table " + dbTableCaches + " add column logPasswordRequired integer default 0");
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Failed to upgrade to ver. 68", e);
}
@@ -838,7 +838,7 @@ public class DataStore {
if (ArrayUtils.isNotEmpty(geocodeDirs)) {
final FilenameFilter filter = new FilenameFilter() {
@Override
- public boolean accept(File dir, String filename) {
+ public boolean accept(final File dir, final String filename) {
return filename.startsWith("map_") && filename.contains("__");
}
};
@@ -872,7 +872,7 @@ public class DataStore {
if (ArrayUtils.isNotEmpty(files)) {
final Pattern oldFilePattern = Pattern.compile("^[GC|TB|EC|GK|O][A-Z0-9]{4,7}$");
final SQLiteStatement select = db.compileStatement("select count(*) from " + dbTableCaches + " where geocode = ?");
- final ArrayList<File> toRemove = new ArrayList<File>(files.length);
+ final ArrayList<File> toRemove = new ArrayList<>(files.length);
for (final File file : files) {
if (file.isDirectory()) {
final String geocode = file.getName();
@@ -914,7 +914,7 @@ public class DataStore {
}
}
- private static void dropDatabase(SQLiteDatabase db) {
+ private static void dropDatabase(final SQLiteDatabase db) {
db.execSQL("drop table if exists " + dbTableCaches);
db.execSQL("drop table if exists " + dbTableAttributes);
db.execSQL("drop table if exists " + dbTableWaypoints);
@@ -925,7 +925,7 @@ public class DataStore {
db.execSQL("drop table if exists " + dbTableTrackables);
}
- public static boolean isThere(String geocode, String guid, boolean detailed, boolean checkTime) {
+ public static boolean isThere(final String geocode, final String guid, final boolean detailed, final boolean checkTime) {
init();
long dataUpdated = 0;
@@ -990,7 +990,7 @@ public class DataStore {
}
/** is cache stored in one of the lists (not only temporary) */
- public static boolean isOffline(String geocode, String guid) {
+ public static boolean isOffline(final String geocode, final String guid) {
if (StringUtils.isBlank(geocode) && StringUtils.isBlank(guid)) {
return false;
}
@@ -1011,16 +1011,16 @@ public class DataStore {
listId.bindString(1, value);
return listId.simpleQueryForLong() != StoredList.TEMPORARY_LIST_ID;
}
- } catch (SQLiteDoneException e) {
+ } catch (final SQLiteDoneException e) {
// Do nothing, it only means we have no information on the cache
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("DataStore.isOffline", e);
}
return false;
}
- public static String getGeocodeForGuid(String guid) {
+ public static String getGeocodeForGuid(final String guid) {
if (StringUtils.isBlank(guid)) {
return null;
}
@@ -1032,16 +1032,16 @@ public class DataStore {
description.bindString(1, guid);
return description.simpleQueryForString();
}
- } catch (SQLiteDoneException e) {
+ } catch (final SQLiteDoneException e) {
// Do nothing, it only means we have no information on the cache
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("DataStore.getGeocodeForGuid", e);
}
return null;
}
- public static String getCacheidForGeocode(String geocode) {
+ public static String getCacheidForGeocode(final String geocode) {
if (StringUtils.isBlank(geocode)) {
return null;
}
@@ -1053,9 +1053,9 @@ public class DataStore {
description.bindString(1, geocode);
return description.simpleQueryForString();
}
- } catch (SQLiteDoneException e) {
+ } catch (final SQLiteDoneException e) {
// Do nothing, it only means we have no information on the cache
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("DataStore.getCacheidForGeocode", e);
}
@@ -1070,7 +1070,7 @@ public class DataStore {
* @param saveFlags
*
*/
- public static void saveCache(Geocache cache, EnumSet<LoadFlags.SaveFlag> saveFlags) {
+ public static void saveCache(final Geocache cache, final EnumSet<LoadFlags.SaveFlag> saveFlags) {
saveCaches(Collections.singletonList(cache), saveFlags);
}
@@ -1082,15 +1082,15 @@ public class DataStore {
* @param saveFlags
*
*/
- public static void saveCaches(Collection<Geocache> caches, EnumSet<LoadFlags.SaveFlag> saveFlags) {
+ public static void saveCaches(final Collection<Geocache> caches, final EnumSet<LoadFlags.SaveFlag> saveFlags) {
if (CollectionUtils.isEmpty(caches)) {
return;
}
- final ArrayList<String> cachesFromDatabase = new ArrayList<String>();
- final HashMap<String, Geocache> existingCaches = new HashMap<String, Geocache>();
+ final ArrayList<String> cachesFromDatabase = new ArrayList<>();
+ final HashMap<String, Geocache> existingCaches = new HashMap<>();
// first check which caches are in the memory cache
- for (Geocache cache : caches) {
+ for (final Geocache cache : caches) {
final String geocode = cache.getGeocode();
final Geocache cacheFromCache = cacheCache.getCacheFromCache(geocode);
if (cacheFromCache == null) {
@@ -1102,18 +1102,18 @@ public class DataStore {
}
// then load all remaining caches from the database in one step
- for (Geocache cacheFromDatabase : loadCaches(cachesFromDatabase, LoadFlags.LOAD_ALL_DB_ONLY)) {
+ for (final Geocache cacheFromDatabase : loadCaches(cachesFromDatabase, LoadFlags.LOAD_ALL_DB_ONLY)) {
existingCaches.put(cacheFromDatabase.getGeocode(), cacheFromDatabase);
}
- final ArrayList<Geocache> toBeStored = new ArrayList<Geocache>();
+ final ArrayList<Geocache> toBeStored = new ArrayList<>();
// Merge with the data already stored in the CacheCache or in the database if
// the cache had not been loaded before, and update the CacheCache.
// Also, a DB update is required if the merge data comes from the CacheCache
// (as it may be more recent than the version in the database), or if the
// version coming from the database is different than the version we are entering
// into the cache (that includes absence from the database).
- for (Geocache cache : caches) {
+ for (final Geocache cache : caches) {
final String geocode = cache.getGeocode();
final Geocache existingCache = existingCaches.get(geocode);
final boolean dbUpdateRequired = !cache.gatherMissingFrom(existingCache) || cacheCache.getCacheFromCache(geocode) != null;
@@ -1122,12 +1122,12 @@ public class DataStore {
// Only save the cache in the database if it is requested by the caller and
// the cache contains detailed information.
- if (saveFlags.contains(SaveFlag.SAVE_DB) && cache.isDetailed() && dbUpdateRequired) {
+ if (saveFlags.contains(SaveFlag.DB) && cache.isDetailed() && dbUpdateRequired) {
toBeStored.add(cache);
}
}
- for (Geocache geocache : toBeStored) {
+ for (final Geocache geocache : toBeStored) {
storeIntoDatabase(geocache);
}
}
@@ -1137,7 +1137,7 @@ public class DataStore {
cacheCache.putCacheInCache(cache);
Log.d("Saving " + cache.toString() + " (" + cache.getListId() + ") to DB");
- ContentValues values = new ContentValues();
+ final ContentValues values = new ContentValues();
if (cache.getUpdated() == 0) {
values.put("updated", System.currentTimeMillis());
@@ -1200,7 +1200,7 @@ public class DataStore {
saveLogCountsWithoutTransaction(cache);
saveInventoryWithoutTransaction(cache.getGeocode(), cache.getInventory());
- int rows = database.update(dbTableCaches, values, "geocode = ?", new String[] { cache.getGeocode() });
+ final int rows = database.update(dbTableCaches, values, "geocode = ?", new String[] { cache.getGeocode() });
if (rows == 0) {
// cache is not in the DB, insert it
/* long id = */
@@ -1208,7 +1208,7 @@ public class DataStore {
}
database.setTransactionSuccessful();
return true;
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("SaveCache", e);
} finally {
database.endTransaction();
@@ -1228,7 +1228,7 @@ public class DataStore {
if (attributes.isEmpty()) {
return;
}
- SQLiteStatement statement = PreparedStatements.getInsertAttribute();
+ final SQLiteStatement statement = PreparedStatements.getInsertAttribute();
final long timestamp = System.currentTimeMillis();
for (final String attribute : attributes) {
statement.bindString(1, geocode);
@@ -1251,10 +1251,10 @@ public class DataStore {
database.beginTransaction();
try {
- SQLiteStatement insertDestination = PreparedStatements.getInsertSearchDestination(destination);
+ final SQLiteStatement insertDestination = PreparedStatements.getInsertSearchDestination(destination);
insertDestination.executeInsert();
database.setTransactionSuccessful();
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Updating searchedDestinations db failed", e);
} finally {
database.endTransaction();
@@ -1269,7 +1269,7 @@ public class DataStore {
saveWaypointsWithoutTransaction(cache);
database.setTransactionSuccessful();
return true;
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("saveWaypoints", e);
} finally {
database.endTransaction();
@@ -1278,14 +1278,14 @@ public class DataStore {
}
private static void saveWaypointsWithoutTransaction(final Geocache cache) {
- String geocode = cache.getGeocode();
+ final String geocode = cache.getGeocode();
- List<Waypoint> waypoints = cache.getWaypoints();
+ final List<Waypoint> waypoints = cache.getWaypoints();
if (CollectionUtils.isNotEmpty(waypoints)) {
- final ArrayList<String> currentWaypointIds = new ArrayList<String>();
- ContentValues values = new ContentValues();
- long timeStamp = System.currentTimeMillis();
- for (Waypoint oneWaypoint : waypoints) {
+ final ArrayList<String> currentWaypointIds = new ArrayList<>();
+ final ContentValues values = new ContentValues();
+ final long timeStamp = System.currentTimeMillis();
+ for (final Waypoint oneWaypoint : waypoints) {
values.clear();
values.put("geocode", geocode);
@@ -1356,7 +1356,7 @@ public class DataStore {
return new Geopoint(cursor.getDouble(indexLat), cursor.getDouble(indexLon));
}
- private static boolean saveWaypointInternal(int id, String geocode, Waypoint waypoint) {
+ private static boolean saveWaypointInternal(final int id, final String geocode, final Waypoint waypoint) {
if ((StringUtils.isBlank(geocode) && id <= 0) || waypoint == null) {
return false;
}
@@ -1366,7 +1366,7 @@ public class DataStore {
database.beginTransaction();
boolean ok = false;
try {
- ContentValues values = new ContentValues();
+ final ContentValues values = new ContentValues();
values.put("geocode", geocode);
values.put("updated", System.currentTimeMillis());
values.put("type", waypoint.getWaypointType() != null ? waypoint.getWaypointType().id : null);
@@ -1394,7 +1394,7 @@ public class DataStore {
return ok;
}
- public static boolean deleteWaypoint(int id) {
+ public static boolean deleteWaypoint(final int id) {
if (id == 0) {
return false;
}
@@ -1405,14 +1405,14 @@ public class DataStore {
}
private static void saveSpoilersWithoutTransaction(final Geocache cache) {
- String geocode = cache.getGeocode();
+ final String geocode = cache.getGeocode();
database.delete(dbTableSpoilers, "geocode = ?", new String[]{geocode});
- List<Image> spoilers = cache.getSpoilers();
+ final List<Image> spoilers = cache.getSpoilers();
if (CollectionUtils.isNotEmpty(spoilers)) {
- SQLiteStatement insertSpoiler = PreparedStatements.getInsertSpoiler();
+ final SQLiteStatement insertSpoiler = PreparedStatements.getInsertSpoiler();
final long timestamp = System.currentTimeMillis();
- for (Image spoiler : spoilers) {
+ for (final Image spoiler : spoilers) {
insertSpoiler.bindString(1, geocode);
insertSpoiler.bindLong(2, timestamp);
insertSpoiler.bindString(3, spoiler.getUrl());
@@ -1429,17 +1429,13 @@ public class DataStore {
}
}
- public static void saveLogsWithoutTransaction(final String geocode, final List<LogEntry> logs) {
+ public static void saveLogsWithoutTransaction(final String geocode, final Iterable<LogEntry> logs) {
// TODO delete logimages referring these logs
database.delete(dbTableLogs, "geocode = ?", new String[]{geocode});
- if (logs.isEmpty()) {
- return;
- }
-
- SQLiteStatement insertLog = PreparedStatements.getInsertLog();
+ final SQLiteStatement insertLog = PreparedStatements.getInsertLog();
final long timestamp = System.currentTimeMillis();
- for (LogEntry log : logs) {
+ for (final LogEntry log : logs) {
insertLog.bindString(1, geocode);
insertLog.bindLong(2, timestamp);
insertLog.bindLong(3, log.type.id);
@@ -1448,10 +1444,10 @@ public class DataStore {
insertLog.bindLong(6, log.date);
insertLog.bindLong(7, log.found);
insertLog.bindLong(8, log.friend ? 1 : 0);
- long logId = insertLog.executeInsert();
+ final long logId = insertLog.executeInsert();
if (log.hasLogImages()) {
- SQLiteStatement insertImage = PreparedStatements.getInsertLogImage();
- for (Image img : log.getLogImages()) {
+ final SQLiteStatement insertImage = PreparedStatements.getInsertLogImage();
+ for (final Image img : log.getLogImages()) {
insertImage.bindLong(1, logId);
insertImage.bindString(2, img.getTitle());
insertImage.bindString(3, img.getUrl());
@@ -1462,15 +1458,15 @@ public class DataStore {
}
private static void saveLogCountsWithoutTransaction(final Geocache cache) {
- String geocode = cache.getGeocode();
+ final String geocode = cache.getGeocode();
database.delete(dbTableLogCount, "geocode = ?", new String[]{geocode});
- Map<LogType, Integer> logCounts = cache.getLogCounts();
+ final Map<LogType, Integer> logCounts = cache.getLogCounts();
if (MapUtils.isNotEmpty(logCounts)) {
- Set<Entry<LogType, Integer>> logCountsItems = logCounts.entrySet();
- SQLiteStatement insertLogCounts = PreparedStatements.getInsertLogCounts();
+ final Set<Entry<LogType, Integer>> logCountsItems = logCounts.entrySet();
+ final SQLiteStatement insertLogCounts = PreparedStatements.getInsertLogCounts();
final long timestamp = System.currentTimeMillis();
- for (Entry<LogType, Integer> pair : logCountsItems) {
+ for (final Entry<LogType, Integer> pair : logCountsItems) {
insertLogCounts.bindString(1, geocode);
insertLogCounts.bindLong(2, timestamp);
insertLogCounts.bindLong(3, pair.getKey().id);
@@ -1499,9 +1495,9 @@ public class DataStore {
}
if (CollectionUtils.isNotEmpty(trackables)) {
- ContentValues values = new ContentValues();
- long timeStamp = System.currentTimeMillis();
- for (Trackable trackable : trackables) {
+ final ContentValues values = new ContentValues();
+ final long timeStamp = System.currentTimeMillis();
+ for (final Trackable trackable : trackables) {
final String tbCode = trackable.getGeocode();
if (StringUtils.isNotBlank(tbCode)) {
database.delete(dbTableTrackables, "tbcode = ?", new String[] { tbCode });
@@ -1563,15 +1559,15 @@ public class DataStore {
*/
public static Set<Geocache> loadCaches(final Collection<String> geocodes, final EnumSet<LoadFlag> loadFlags) {
if (CollectionUtils.isEmpty(geocodes)) {
- return new HashSet<Geocache>();
+ return new HashSet<>();
}
- Set<Geocache> result = new HashSet<Geocache>();
- Set<String> remaining = new HashSet<String>(geocodes);
+ final Set<Geocache> result = new HashSet<>();
+ final Set<String> remaining = new HashSet<>(geocodes);
- if (loadFlags.contains(LoadFlag.LOAD_CACHE_BEFORE)) {
- for (String geocode : new HashSet<String>(remaining)) {
- Geocache cache = cacheCache.getCacheFromCache(geocode);
+ if (loadFlags.contains(LoadFlag.CACHE_BEFORE)) {
+ for (final String geocode : new HashSet<>(remaining)) {
+ final Geocache cache = cacheCache.getCacheFromCache(geocode);
if (cache != null) {
result.add(cache);
remaining.remove(cache.getGeocode());
@@ -1579,13 +1575,13 @@ public class DataStore {
}
}
- if (loadFlags.contains(LoadFlag.LOAD_DB_MINIMAL) ||
- loadFlags.contains(LoadFlag.LOAD_ATTRIBUTES) ||
- loadFlags.contains(LoadFlag.LOAD_WAYPOINTS) ||
- loadFlags.contains(LoadFlag.LOAD_SPOILERS) ||
- loadFlags.contains(LoadFlag.LOAD_LOGS) ||
- loadFlags.contains(LoadFlag.LOAD_INVENTORY) ||
- loadFlags.contains(LoadFlag.LOAD_OFFLINE_LOG)) {
+ if (loadFlags.contains(LoadFlag.DB_MINIMAL) ||
+ loadFlags.contains(LoadFlag.ATTRIBUTES) ||
+ loadFlags.contains(LoadFlag.WAYPOINTS) ||
+ loadFlags.contains(LoadFlag.SPOILERS) ||
+ loadFlags.contains(LoadFlag.LOGS) ||
+ loadFlags.contains(LoadFlag.INVENTORY) ||
+ loadFlags.contains(LoadFlag.OFFLINE_LOG)) {
final Set<Geocache> cachesFromDB = loadCachesFromGeocodes(remaining, loadFlags);
result.addAll(cachesFromDB);
@@ -1594,9 +1590,9 @@ public class DataStore {
}
}
- if (loadFlags.contains(LoadFlag.LOAD_CACHE_AFTER)) {
- for (String geocode : new HashSet<String>(remaining)) {
- Geocache cache = cacheCache.getCacheFromCache(geocode);
+ if (loadFlags.contains(LoadFlag.CACHE_AFTER)) {
+ for (final String geocode : new HashSet<>(remaining)) {
+ final Geocache cache = cacheCache.getCacheFromCache(geocode);
if (cache != null) {
result.add(cache);
remaining.remove(cache.getGeocode());
@@ -1626,43 +1622,43 @@ public class DataStore {
init();
final StringBuilder query = new StringBuilder(QUERY_CACHE_DATA);
- if (loadFlags.contains(LoadFlag.LOAD_OFFLINE_LOG)) {
+ if (loadFlags.contains(LoadFlag.OFFLINE_LOG)) {
query.append(',').append(dbTableLogsOffline).append(".log");
}
query.append(" FROM ").append(dbTableCaches);
- if (loadFlags.contains(LoadFlag.LOAD_OFFLINE_LOG)) {
+ if (loadFlags.contains(LoadFlag.OFFLINE_LOG)) {
query.append(" LEFT OUTER JOIN ").append(dbTableLogsOffline).append(" ON ( ").append(dbTableCaches).append(".geocode == ").append(dbTableLogsOffline).append(".geocode) ");
}
query.append(" WHERE ").append(dbTableCaches).append('.');
query.append(DataStore.whereGeocodeIn(geocodes));
- Cursor cursor = database.rawQuery(query.toString(), null);
+ final Cursor cursor = database.rawQuery(query.toString(), null);
try {
- final Set<Geocache> caches = new HashSet<Geocache>();
+ final Set<Geocache> caches = new HashSet<>();
int logIndex = -1;
while (cursor.moveToNext()) {
- Geocache cache = DataStore.createCacheFromDatabaseContent(cursor);
+ final Geocache cache = DataStore.createCacheFromDatabaseContent(cursor);
- if (loadFlags.contains(LoadFlag.LOAD_ATTRIBUTES)) {
+ if (loadFlags.contains(LoadFlag.ATTRIBUTES)) {
cache.setAttributes(loadAttributes(cache.getGeocode()));
}
- if (loadFlags.contains(LoadFlag.LOAD_WAYPOINTS)) {
+ if (loadFlags.contains(LoadFlag.WAYPOINTS)) {
final List<Waypoint> waypoints = loadWaypoints(cache.getGeocode());
if (CollectionUtils.isNotEmpty(waypoints)) {
cache.setWaypoints(waypoints, false);
}
}
- if (loadFlags.contains(LoadFlag.LOAD_SPOILERS)) {
+ if (loadFlags.contains(LoadFlag.SPOILERS)) {
final List<Image> spoilers = loadSpoilers(cache.getGeocode());
cache.setSpoilers(spoilers);
}
- if (loadFlags.contains(LoadFlag.LOAD_LOGS)) {
+ if (loadFlags.contains(LoadFlag.LOGS)) {
final Map<LogType, Integer> logCounts = loadLogCounts(cache.getGeocode());
if (MapUtils.isNotEmpty(logCounts)) {
cache.getLogCounts().clear();
@@ -1670,7 +1666,7 @@ public class DataStore {
}
}
- if (loadFlags.contains(LoadFlag.LOAD_INVENTORY)) {
+ if (loadFlags.contains(LoadFlag.INVENTORY)) {
final List<Trackable> inventory = loadInventory(cache.getGeocode());
if (CollectionUtils.isNotEmpty(inventory)) {
if (cache.getInventory() == null) {
@@ -1682,7 +1678,7 @@ public class DataStore {
}
}
- if (loadFlags.contains(LoadFlag.LOAD_OFFLINE_LOG)) {
+ if (loadFlags.contains(LoadFlag.OFFLINE_LOG)) {
if (logIndex < 0) {
logIndex = cursor.getColumnIndex("log");
}
@@ -1718,8 +1714,8 @@ public class DataStore {
* @param cursor
* @return Cache from DB
*/
- private static Geocache createCacheFromDatabaseContent(Cursor cursor) {
- Geocache cache = new Geocache();
+ private static Geocache createCacheFromDatabaseContent(final Cursor cursor) {
+ final Geocache cache = new Geocache();
cache.setUpdated(cursor.getLong(0));
cache.setListId(cursor.getInt(1));
@@ -1733,7 +1729,7 @@ public class DataStore {
cache.setName(cursor.getString(9));
cache.setOwnerDisplayName(cursor.getString(10));
cache.setOwnerUserId(cursor.getString(11));
- long dateValue = cursor.getLong(12);
+ final long dateValue = cursor.getLong(12);
if (dateValue != 0) {
cache.setHidden(new Date(dateValue));
}
@@ -1779,7 +1775,7 @@ public class DataStore {
return cache;
}
- public static List<String> loadAttributes(String geocode) {
+ public static List<String> loadAttributes(final String geocode) {
if (StringUtils.isBlank(geocode)) {
return null;
}
@@ -1796,7 +1792,7 @@ public class DataStore {
GET_STRING_0);
}
- public static Waypoint loadWaypoint(int id) {
+ public static Waypoint loadWaypoint(final int id) {
if (id == 0) {
return null;
}
@@ -1915,7 +1911,7 @@ public class DataStore {
database.delete(dbTableSearchDestionationHistory, null, null);
database.setTransactionSuccessful();
return true;
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Unable to clear searched destinations", e);
} finally {
database.endTransaction();
@@ -1929,8 +1925,8 @@ public class DataStore {
* @return an immutable, non null list of logs
*/
@NonNull
- public static List<LogEntry> loadLogs(String geocode) {
- List<LogEntry> logs = new ArrayList<LogEntry>();
+ public static List<LogEntry> loadLogs(final String geocode) {
+ final List<LogEntry> logs = new ArrayList<>();
if (StringUtils.isBlank(geocode)) {
return logs;
@@ -1967,14 +1963,14 @@ public class DataStore {
return Collections.unmodifiableList(logs);
}
- public static Map<LogType, Integer> loadLogCounts(String geocode) {
+ public static Map<LogType, Integer> loadLogCounts(final String geocode) {
if (StringUtils.isBlank(geocode)) {
return null;
}
init();
- final Map<LogType, Integer> logCounts = new HashMap<LogType, Integer>();
+ final Map<LogType, Integer> logCounts = new HashMap<>();
final Cursor cursor = database.query(
dbTableLogCount,
@@ -1995,14 +1991,14 @@ public class DataStore {
return logCounts;
}
- private static List<Trackable> loadInventory(String geocode) {
+ private static List<Trackable> loadInventory(final String geocode) {
if (StringUtils.isBlank(geocode)) {
return null;
}
init();
- final List<Trackable> trackables = new ArrayList<Trackable>();
+ final List<Trackable> trackables = new ArrayList<>();
final Cursor cursor = database.query(
dbTableTrackables,
@@ -2056,7 +2052,7 @@ public class DataStore {
final String released = cursor.getString(cursor.getColumnIndex("released"));
if (released != null) {
try {
- long releaseMilliSeconds = Long.parseLong(released);
+ final long releaseMilliSeconds = Long.parseLong(released);
trackable.setReleased(new Date(releaseMilliSeconds));
} catch (final NumberFormatException e) {
Log.e("createTrackableFromDatabaseContent", e);
@@ -2085,7 +2081,7 @@ public class DataStore {
init();
try {
- StringBuilder sql = new StringBuilder("select count(_id) from " + dbTableCaches + " where detailed = 1");
+ final StringBuilder sql = new StringBuilder("select count(_id) from " + dbTableCaches + " where detailed = 1");
String typeKey;
int reasonIndex;
if (cacheType != CacheType.ALL) {
@@ -2106,9 +2102,9 @@ public class DataStore {
listKey = "list";
}
- String key = "CountCaches_" + typeKey + "_" + listKey;
+ final String key = "CountCaches_" + typeKey + "_" + listKey;
- SQLiteStatement compiledStmnt = PreparedStatements.getStatement(key, sql.toString());
+ final SQLiteStatement compiledStmnt = PreparedStatements.getStatement(key, sql.toString());
if (cacheType != CacheType.ALL) {
compiledStmnt.bindString(1, cacheType.id);
}
@@ -2116,7 +2112,7 @@ public class DataStore {
compiledStmnt.bindLong(reasonIndex, list);
}
return (int) compiledStmnt.simpleQueryForLong();
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("DataStore.loadAllStoredCachesCount", e);
}
@@ -2128,7 +2124,7 @@ public class DataStore {
try {
return (int) PreparedStatements.getCountHistoryCaches().simpleQueryForLong();
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("DataStore.getAllHistoricCachesCount", e);
}
@@ -2239,7 +2235,7 @@ public class DataStore {
null,
new HashSet<String>(),
GET_STRING_0);
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("DataStore.loadBatchOfHistoricGeocodes", e);
}
@@ -2269,7 +2265,7 @@ public class DataStore {
* @return Set with geocodes
*/
private static SearchResult loadInViewport(final boolean stored, final Viewport viewport, final CacheType cacheType) {
- final Set<String> geocodes = new HashSet<String>();
+ final Set<String> geocodes = new HashSet<>();
// if not stored only, get codes from CacheCache as well
if (!stored) {
@@ -2323,7 +2319,7 @@ public class DataStore {
Log.d("Database clean: started");
try {
- Set<String> geocodes = new HashSet<String>();
+ Set<String> geocodes = new HashSet<>();
if (more) {
queryToColl(dbTableCaches,
new String[]{"geocode"},
@@ -2399,7 +2395,7 @@ public class DataStore {
cacheCache.removeAllFromCache();
}
- public static void removeCache(final String geocode, EnumSet<LoadFlags.RemoveFlag> removeFlags) {
+ public static void removeCache(final String geocode, final EnumSet<LoadFlags.RemoveFlag> removeFlags) {
removeCaches(Collections.singleton(geocode), removeFlags);
}
@@ -2409,22 +2405,22 @@ public class DataStore {
* @param geocodes
* list of geocodes to drop from cache
*/
- public static void removeCaches(final Set<String> geocodes, EnumSet<LoadFlags.RemoveFlag> removeFlags) {
+ public static void removeCaches(final Set<String> geocodes, final EnumSet<LoadFlags.RemoveFlag> removeFlags) {
if (CollectionUtils.isEmpty(geocodes)) {
return;
}
init();
- if (removeFlags.contains(RemoveFlag.REMOVE_CACHE)) {
+ if (removeFlags.contains(RemoveFlag.CACHE)) {
for (final String geocode : geocodes) {
cacheCache.removeCacheFromCache(geocode);
}
}
- if (removeFlags.contains(RemoveFlag.REMOVE_DB)) {
+ if (removeFlags.contains(RemoveFlag.DB)) {
// Drop caches from the database
- final ArrayList<String> quotedGeocodes = new ArrayList<String>(geocodes.size());
+ final ArrayList<String> quotedGeocodes = new ArrayList<>(geocodes.size());
for (final String geocode : geocodes) {
quotedGeocodes.add(DatabaseUtils.sqlEscapeString(geocode));
}
@@ -2440,7 +2436,7 @@ public class DataStore {
database.delete(dbTableLogCount, baseWhereClause, null);
database.delete(dbTableLogsOffline, baseWhereClause, null);
String wayPointClause = baseWhereClause;
- if (!removeFlags.contains(RemoveFlag.REMOVE_OWN_WAYPOINTS_ONLY_FOR_TESTING)) {
+ if (!removeFlags.contains(RemoveFlag.OWN_WAYPOINTS_ONLY_FOR_TESTING)) {
wayPointClause += " and type <> 'own'";
}
database.delete(dbTableWaypoints, wayPointClause, null);
@@ -2457,7 +2453,7 @@ public class DataStore {
}
}
- public static boolean saveLogOffline(String geocode, Date date, LogType type, String log) {
+ public static boolean saveLogOffline(final String geocode, final Date date, final LogType type, final String log) {
if (StringUtils.isBlank(geocode)) {
Log.e("DataStore.saveLogOffline: cannot log a blank geocode");
return false;
@@ -2484,7 +2480,7 @@ public class DataStore {
return id != -1;
}
- public static LogEntry loadLogOffline(String geocode) {
+ public static LogEntry loadLogOffline(final String geocode) {
if (StringUtils.isBlank(geocode)) {
return null;
}
@@ -2515,7 +2511,7 @@ public class DataStore {
return log;
}
- public static void clearLogOffline(String geocode) {
+ public static void clearLogOffline(final String geocode) {
if (StringUtils.isBlank(geocode)) {
return;
}
@@ -2525,15 +2521,15 @@ public class DataStore {
database.delete(dbTableLogsOffline, "geocode = ?", new String[]{geocode});
}
- public static void clearLogsOffline(List<Geocache> caches) {
+ public static void clearLogsOffline(final List<Geocache> caches) {
if (CollectionUtils.isEmpty(caches)) {
return;
}
init();
- Set<String> geocodes = new HashSet<String>(caches.size());
- for (Geocache cache : caches) {
+ final Set<String> geocodes = new HashSet<>(caches.size());
+ for (final Geocache cache : caches) {
geocodes.add(cache.getGeocode());
cache.setLogOffline(false);
}
@@ -2553,14 +2549,14 @@ public class DataStore {
logCount.bindString(1, geocode);
return logCount.simpleQueryForLong() > 0;
}
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("DataStore.hasLogOffline", e);
}
return false;
}
- private static void setVisitDate(List<String> geocodes, long visitedDate) {
+ private static void setVisitDate(final List<String> geocodes, final long visitedDate) {
if (geocodes.isEmpty()) {
return;
}
@@ -2569,9 +2565,9 @@ public class DataStore {
database.beginTransaction();
try {
- SQLiteStatement setVisit = PreparedStatements.getUpdateVisitDate();
+ final SQLiteStatement setVisit = PreparedStatements.getUpdateVisitDate();
- for (String geocode : geocodes) {
+ for (final String geocode : geocodes) {
setVisit.bindLong(1, visitedDate);
setVisit.bindString(2, geocode);
setVisit.execute();
@@ -2587,7 +2583,7 @@ public class DataStore {
init();
final Resources res = CgeoApplication.getInstance().getResources();
- final List<StoredList> lists = new ArrayList<StoredList>();
+ final List<StoredList> lists = new ArrayList<>();
lists.add(new StoredList(StoredList.STANDARD_LIST_ID, res.getString(R.string.list_inbox), (int) PreparedStatements.getCountCachesOnStandardList().simpleQueryForLong()));
try {
@@ -2617,10 +2613,10 @@ public class DataStore {
});
}
- public static StoredList getList(int id) {
+ public static StoredList getList(final int id) {
init();
if (id >= customListIdOffset) {
- Cursor cursor = database.query(
+ final Cursor cursor = database.query(
dbTableLists,
new String[]{"_id", "title"},
"_id = ? ",
@@ -2628,13 +2624,13 @@ public class DataStore {
null,
null,
null);
- ArrayList<StoredList> lists = getListsFromCursor(cursor);
+ final ArrayList<StoredList> lists = getListsFromCursor(cursor);
if (!lists.isEmpty()) {
return lists.get(0);
}
}
- Resources res = CgeoApplication.getInstance().getResources();
+ final Resources res = CgeoApplication.getInstance().getResources();
if (id == PseudoList.ALL_LIST.id) {
return new StoredList(PseudoList.ALL_LIST.id, res.getString(R.string.list_all_lists), getAllCachesCount());
}
@@ -2658,7 +2654,7 @@ public class DataStore {
* Name
* @return new listId
*/
- public static int createList(String name) {
+ public static int createList(final String name) {
int id = -1;
if (StringUtils.isBlank(name)) {
return id;
@@ -2668,7 +2664,7 @@ public class DataStore {
database.beginTransaction();
try {
- ContentValues values = new ContentValues();
+ final ContentValues values = new ContentValues();
values.put("title", name);
values.put("updated", System.currentTimeMillis());
@@ -2698,7 +2694,7 @@ public class DataStore {
database.beginTransaction();
int count = 0;
try {
- ContentValues values = new ContentValues();
+ final ContentValues values = new ContentValues();
values.put("title", name);
values.put("updated", System.currentTimeMillis());
@@ -2717,7 +2713,7 @@ public class DataStore {
* @param listId
* @return true if the list got deleted, false else
*/
- public static boolean removeList(int listId) {
+ public static boolean removeList(final int listId) {
if (listId < customListIdOffset) {
return false;
}
@@ -2727,11 +2723,11 @@ public class DataStore {
database.beginTransaction();
boolean status = false;
try {
- int cnt = database.delete(dbTableLists, "_id = " + (listId - customListIdOffset), null);
+ final int cnt = database.delete(dbTableLists, "_id = " + (listId - customListIdOffset), null);
if (cnt > 0) {
// move caches from deleted list to standard list
- SQLiteStatement moveToStandard = PreparedStatements.getMoveToStandardList();
+ final SQLiteStatement moveToStandard = PreparedStatements.getMoveToStandardList();
moveToStandard.bindLong(1, listId);
moveToStandard.execute();
@@ -2763,11 +2759,11 @@ public class DataStore {
}
init();
- SQLiteStatement move = PreparedStatements.getMoveToList();
+ final SQLiteStatement move = PreparedStatements.getMoveToList();
database.beginTransaction();
try {
- for (Geocache cache : caches) {
+ for (final Geocache cache : caches) {
move.bindLong(1, listId);
move.bindString(2, cache.getGeocode());
move.execute();
@@ -2783,7 +2779,7 @@ public class DataStore {
return database != null;
}
- public static boolean removeSearchedDestination(Destination destination) {
+ public static boolean removeSearchedDestination(final Destination destination) {
if (destination == null) {
return false;
}
@@ -2794,7 +2790,7 @@ public class DataStore {
database.delete(dbTableSearchDestionationHistory, "_id = " + destination.getId(), null);
database.setTransactionSuccessful();
return true;
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("Unable to remove searched destination", e);
} finally {
database.endTransaction();
@@ -2839,9 +2835,9 @@ public class DataStore {
}
cursor.close();
- } catch (SQLiteDoneException e) {
+ } catch (final SQLiteDoneException e) {
// Do nothing, it only means we have no information on the cache
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("DataStore.getCacheDescription", e);
}
@@ -2888,13 +2884,14 @@ public class DataStore {
* @return
*/
- public static Set<Waypoint> loadWaypoints(final Viewport viewport, boolean excludeMine, boolean excludeDisabled, CacheType type) {
+ public static Set<Waypoint> loadWaypoints(final Viewport viewport, final boolean excludeMine, final boolean excludeDisabled, final CacheType type) {
final StringBuilder where = buildCoordinateWhere(dbTableWaypoints, viewport);
if (excludeMine) {
where.append(" and ").append(dbTableCaches).append(".found == 0");
}
if (excludeDisabled) {
where.append(" and ").append(dbTableCaches).append(".disabled == 0");
+ where.append(" and ").append(dbTableCaches).append(".archived == 0");
}
if (type != CacheType.ALL) {
where.append(" and ").append(dbTableCaches).append(".type == '").append(type.id).append('\'');
@@ -2916,13 +2913,13 @@ public class DataStore {
});
}
- public static void saveChangedCache(Geocache cache) {
- DataStore.saveCache(cache, cache.getStorageLocation().contains(StorageLocation.DATABASE) ? LoadFlags.SAVE_ALL : EnumSet.of(SaveFlag.SAVE_CACHE));
+ public static void saveChangedCache(final Geocache cache) {
+ DataStore.saveCache(cache, cache.getStorageLocation().contains(StorageLocation.DATABASE) ? LoadFlags.SAVE_ALL : EnumSet.of(SaveFlag.CACHE));
}
private static class PreparedStatements {
- private static HashMap<String, SQLiteStatement> statements = new HashMap<String, SQLiteStatement>();
+ private static HashMap<String, SQLiteStatement> statements = new HashMap<>();
public static SQLiteStatement getMoveToStandardList() {
return getStatement("MoveToStandardList", "UPDATE " + dbTableCaches + " SET reason = " + StoredList.STANDARD_LIST_ID + " WHERE reason = ?");
@@ -2948,7 +2945,7 @@ public class DataStore {
return getStatement("InsertSpoiler", "INSERT INTO " + dbTableSpoilers + " (geocode, updated, url, title, description) VALUES (?, ?, ?, ?, ?)");
}
- public static SQLiteStatement getInsertSearchDestination(Destination destination) {
+ public static SQLiteStatement getInsertSearchDestination(final Destination destination) {
final SQLiteStatement statement = getStatement("InsertSearch", "INSERT INTO " + dbTableSearchDestionationHistory + " (date, latitude, longitude) VALUES (?, ?, ?)");
statement.bindLong(1, destination.getDate());
final Geopoint coords = destination.getCoords();
@@ -2958,7 +2955,7 @@ public class DataStore {
}
private static void clearPreparedStatements() {
- for (SQLiteStatement statement : statements.values()) {
+ for (final SQLiteStatement statement : statements.values()) {
statement.close();
}
statements.clear();
@@ -3020,11 +3017,11 @@ public class DataStore {
setVisitDate(Collections.singletonList(geocode), System.currentTimeMillis());
}
- public static void markDropped(List<Geocache> caches) {
+ public static void markDropped(final List<Geocache> caches) {
moveToList(caches, StoredList.TEMPORARY_LIST_ID);
}
- public static Viewport getBounds(String geocode) {
+ public static Viewport getBounds(final String geocode) {
if (geocode == null) {
return null;
}
@@ -3032,23 +3029,23 @@ public class DataStore {
return DataStore.getBounds(Collections.singleton(geocode));
}
- public static void clearVisitDate(String[] selected) {
+ public static void clearVisitDate(final String[] selected) {
setVisitDate(Arrays.asList(selected), 0);
}
- public static SearchResult getBatchOfStoredCaches(Geopoint coords, CacheType cacheType, int listId) {
+ public static SearchResult getBatchOfStoredCaches(final Geopoint coords, final CacheType cacheType, final int listId) {
final Set<String> geocodes = DataStore.loadBatchOfStoredGeocodes(coords, cacheType, listId);
return new SearchResult(geocodes, DataStore.getAllStoredCachesCount(cacheType, listId));
}
- public static SearchResult getHistoryOfCaches(boolean detailedOnly, CacheType cacheType) {
+ public static SearchResult getHistoryOfCaches(final boolean detailedOnly, final CacheType cacheType) {
final Set<String> geocodes = DataStore.loadBatchOfHistoricGeocodes(detailedOnly, cacheType);
return new SearchResult(geocodes, DataStore.getAllHistoryCachesCount());
}
- public static boolean saveWaypoint(int id, String geocode, Waypoint waypoint) {
+ public static boolean saveWaypoint(final int id, final String geocode, final Waypoint waypoint) {
if (DataStore.saveWaypointInternal(id, geocode, waypoint)) {
- DataStore.removeCache(geocode, EnumSet.of(RemoveFlag.REMOVE_CACHE));
+ DataStore.removeCache(geocode, EnumSet.of(RemoveFlag.CACHE));
return true;
}
return false;
@@ -3057,7 +3054,7 @@ public class DataStore {
public static Set<String> getCachedMissingFromSearch(final SearchResult searchResult, final Set<Tile> tiles, final IConnector connector, final int maxZoom) {
// get cached CacheListActivity
- final Set<String> cachedGeocodes = new HashSet<String>();
+ final Set<String> cachedGeocodes = new HashSet<>();
for (final Tile tile : tiles) {
cachedGeocodes.addAll(cacheCache.getInViewport(tile.getViewport(), CacheType.ALL));
}
@@ -3065,7 +3062,7 @@ public class DataStore {
cachedGeocodes.removeAll(searchResult.getGeocodes());
// check remaining against viewports
- final Set<String> missingFromSearch = new HashSet<String>();
+ final Set<String> missingFromSearch = new HashSet<>();
for (final String geocode : cachedGeocodes) {
if (connector.canHandle(geocode)) {
final Geocache geocache = cacheCache.getCacheFromCache(geocode);
@@ -3090,13 +3087,7 @@ public class DataStore {
return null;
}
init();
- final MatrixCursor resultCursor = new MatrixCursor(new String[] {
- BaseColumns._ID,
- SearchManager.SUGGEST_COLUMN_TEXT_1,
- SearchManager.SUGGEST_COLUMN_TEXT_2,
- SearchManager.SUGGEST_COLUMN_INTENT_ACTION,
- SearchManager.SUGGEST_COLUMN_QUERY
- });
+ final SearchSuggestionCursor resultCursor = new SearchSuggestionCursor();
try {
final String selectionArg = getSuggestionArgument(searchTerm);
findCaches(resultCursor, selectionArg);
@@ -3107,10 +3098,10 @@ public class DataStore {
return resultCursor;
}
- private static void findCaches(final MatrixCursor resultCursor, final String selectionArg) {
- Cursor cursor = database.query(
+ private static void findCaches(final SearchSuggestionCursor resultCursor, final String selectionArg) {
+ final Cursor cursor = database.query(
dbTableCaches,
- new String[] { "geocode", "name" },
+ new String[] { "geocode", "name", "type" },
"geocode IS NOT NULL AND geocode != '' AND (geocode LIKE ? OR name LIKE ? OR owner LIKE ?)",
new String[] { selectionArg, selectionArg, selectionArg },
null,
@@ -3118,23 +3109,19 @@ public class DataStore {
"name");
while (cursor.moveToNext()) {
final String geocode = cursor.getString(0);
- resultCursor.addRow(new String[] {
- String.valueOf(resultCursor.getCount()),
- cursor.getString(1),
- geocode,
- Intents.ACTION_GEOCACHE,
- geocode
- });
+ final String cacheName = cursor.getString(1);
+ final String type = cursor.getString(2);
+ resultCursor.addCache(geocode, cacheName, type);
}
cursor.close();
}
- private static String getSuggestionArgument(String input) {
+ private static String getSuggestionArgument(final String input) {
return "%" + StringUtils.trim(input) + "%";
}
private static void findTrackables(final MatrixCursor resultCursor, final String selectionArg) {
- Cursor cursor = database.query(
+ final Cursor cursor = database.query(
dbTableTrackables,
new String[] { "tbcode", "title" },
"tbcode IS NOT NULL AND tbcode != '' AND (tbcode LIKE ? OR title LIKE ?)",
@@ -3156,31 +3143,53 @@ public class DataStore {
}
public static String[] getSuggestions(final String table, final String column, final String input) {
- Cursor cursor = database.rawQuery("SELECT DISTINCT " + column
+ final Cursor cursor = database.rawQuery("SELECT DISTINCT " + column
+ " FROM " + table
+ " WHERE " + column + " LIKE ?"
+ " ORDER BY " + column + " COLLATE NOCASE ASC;", new String[] { getSuggestionArgument(input) });
return cursorToColl(cursor, new LinkedList<String>(), GET_STRING_0).toArray(new String[cursor.getCount()]);
}
- public static String[] getSuggestionsOwnerName(String input) {
- return getSuggestions(dbTableCaches, "owner", input);
+ public static String[] getSuggestionsOwnerName(final String input) {
+ return getSuggestions(dbTableCaches, "owner_real", input);
}
- public static String[] getSuggestionsTrackableCode(String input) {
+ public static String[] getSuggestionsTrackableCode(final String input) {
return getSuggestions(dbTableTrackables, "tbcode", input);
}
- public static String[] getSuggestionsFinderName(String input) {
+ public static String[] getSuggestionsFinderName(final String input) {
return getSuggestions(dbTableLogs, "author", input);
}
- public static String[] getSuggestionsGeocode(String input) {
+ public static String[] getSuggestionsGeocode(final String input) {
return getSuggestions(dbTableCaches, "geocode", input);
}
- public static String[] getSuggestionsKeyword(String input) {
+ public static String[] getSuggestionsKeyword(final String input) {
return getSuggestions(dbTableCaches, "name", input);
}
+ /**
+ *
+ * @return list of last caches opened in the details view, ordered by most recent first
+ */
+ public static ArrayList<Geocache> getLastOpenedCaches() {
+ final List<String> geocodes = Settings.getLastOpenedCaches();
+ final Set<Geocache> cachesSet = DataStore.loadCaches(geocodes, LoadFlags.LOAD_CACHE_OR_DB);
+
+ // order result set by time again
+ final ArrayList<Geocache> caches = new ArrayList<>(cachesSet);
+ Collections.sort(caches, new Comparator<Geocache>() {
+
+ @Override
+ public int compare(final Geocache lhs, final Geocache rhs) {
+ final int lhsIndex = geocodes.indexOf(lhs.getGeocode());
+ final int rhsIndex = geocodes.indexOf(rhs.getGeocode());
+ return lhsIndex < rhsIndex ? -1 : (lhsIndex == rhsIndex ? 0 : 1);
+ }
+ });
+ return caches;
+ }
+
}
diff --git a/main/src/cgeo/geocaching/EditWaypointActivity.java b/main/src/cgeo/geocaching/EditWaypointActivity.java
index 55de0a6..73cb477 100644
--- a/main/src/cgeo/geocaching/EditWaypointActivity.java
+++ b/main/src/cgeo/geocaching/EditWaypointActivity.java
@@ -1,6 +1,6 @@
package cgeo.geocaching;
-import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.AbstractActionBarActivity;
import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.connector.IConnector;
import cgeo.geocaching.enumerations.CacheType;
@@ -48,8 +48,8 @@ import java.util.EnumSet;
import java.util.List;
@EActivity
-public class EditWaypointActivity extends AbstractActivity {
- private static final ArrayList<WaypointType> POSSIBLE_WAYPOINT_TYPES = new ArrayList<WaypointType>(WaypointType.ALL_TYPES_EXCEPT_OWN_AND_ORIGINAL);
+public class EditWaypointActivity extends AbstractActionBarActivity implements CoordinatesInputDialog.CoordinateUpdate {
+ private static final ArrayList<WaypointType> POSSIBLE_WAYPOINT_TYPES = new ArrayList<>(WaypointType.ALL_TYPES_EXCEPT_OWN_AND_ORIGINAL);
@ViewById(R.id.buttonLatitude) protected Button buttonLat;
@ViewById(R.id.buttonLongitude) protected Button buttonLon;
@@ -159,11 +159,11 @@ public class EditWaypointActivity extends AbstractActivity {
addWaypoint.setOnClickListener(new SaveWaypointListener());
- List<String> wayPointNames = new ArrayList<String>();
+ List<String> wayPointNames = new ArrayList<>();
for (WaypointType wpt : WaypointType.ALL_TYPES_EXCEPT_OWN_AND_ORIGINAL) {
wayPointNames.add(wpt.getL10n());
}
- ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, wayPointNames);
+ ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_dropdown_item_1line, wayPointNames);
waypointName.setAdapter(adapter);
if (savedInstanceState != null) {
@@ -205,7 +205,7 @@ public class EditWaypointActivity extends AbstractActivity {
}
private void initializeWaypointTypeSelector() {
- ArrayAdapter<WaypointType> wpAdapter = new ArrayAdapter<WaypointType>(this, android.R.layout.simple_spinner_item, POSSIBLE_WAYPOINT_TYPES.toArray(new WaypointType[POSSIBLE_WAYPOINT_TYPES.size()]));
+ ArrayAdapter<WaypointType> wpAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, POSSIBLE_WAYPOINT_TYPES.toArray(new WaypointType[POSSIBLE_WAYPOINT_TYPES.size()]));
wpAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
waypointTypeSelector.setAdapter(wpAdapter);
@@ -247,7 +247,7 @@ public class EditWaypointActivity extends AbstractActivity {
}
private void initializeDistanceUnitSelector() {
- distanceUnits = new ArrayList<String>(Arrays.asList(res.getStringArray(R.array.distance_units)));
+ distanceUnits = new ArrayList<>(Arrays.asList(res.getStringArray(R.array.distance_units)));
if (initViews) {
distanceUnitSelector.setSelection(Settings.isUseImperialUnits() ? 2 : 0); //0:m, 2:ft
}
@@ -294,17 +294,18 @@ public class EditWaypointActivity extends AbstractActivity {
// button text is blank when creating new waypoint
}
Geocache cache = DataStore.loadCache(geocode, LoadFlags.LOAD_WAYPOINTS);
- CoordinatesInputDialog coordsDialog = new CoordinatesInputDialog(EditWaypointActivity.this, cache, gp, app.currentGeo());
+ CoordinatesInputDialog coordsDialog = CoordinatesInputDialog.getInstance(cache, gp, app.currentGeo());
coordsDialog.setCancelable(true);
- coordsDialog.setOnCoordinateUpdate(new CoordinatesInputDialog.CoordinateUpdate() {
- @Override
- public void update(final Geopoint gp) {
- buttonLat.setText(gp.format(GeopointFormatter.Format.LAT_DECMINUTE));
- buttonLon.setText(gp.format(GeopointFormatter.Format.LON_DECMINUTE));
- }
- });
- coordsDialog.show();
+ coordsDialog.show(getSupportFragmentManager(),"wpeditdialog");
}
+
+
+ }
+
+ @Override
+ public void updateCoordinates(Geopoint gp) {
+ buttonLat.setText(gp.format(GeopointFormatter.Format.LAT_DECMINUTE));
+ buttonLon.setText(gp.format(GeopointFormatter.Format.LON_DECMINUTE));
}
public static final int SUCCESS = 0;
@@ -438,11 +439,11 @@ public class EditWaypointActivity extends AbstractActivity {
}
Waypoint oldWaypoint = cache.getWaypointById(id);
if (cache.addOrChangeWaypoint(waypoint, true)) {
- DataStore.saveCache(cache, EnumSet.of(SaveFlag.SAVE_DB));
+ DataStore.saveCache(cache, EnumSet.of(SaveFlag.DB));
if (!StaticMapsProvider.hasAllStaticMapsForWaypoint(geocode, waypoint)) {
StaticMapsProvider.removeWpStaticMaps(oldWaypoint, geocode);
if (Settings.isStoreOfflineWpMaps()) {
- StaticMapsProvider.storeWaypointStaticMap(cache, waypoint, false);
+ StaticMapsProvider.storeWaypointStaticMap(cache, waypoint).subscribe();
}
}
if (modifyLocal.isChecked() || modifyBoth.isChecked()) {
diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java
index 19c15fd..e0daae1 100644
--- a/main/src/cgeo/geocaching/Geocache.java
+++ b/main/src/cgeo/geocaching/Geocache.java
@@ -2,6 +2,7 @@ package cgeo.geocaching;
import cgeo.geocaching.DataStore.StorageLocation;
import cgeo.geocaching.activity.ActivityMixin;
+import cgeo.geocaching.activity.SimpleWebviewActivity;
import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.connector.IConnector;
import cgeo.geocaching.connector.ILoggingManager;
@@ -10,6 +11,7 @@ import cgeo.geocaching.connector.capability.ISearchByGeocode;
import cgeo.geocaching.connector.gc.GCConnector;
import cgeo.geocaching.connector.gc.GCConstants;
import cgeo.geocaching.connector.gc.Tile;
+import cgeo.geocaching.connector.gc.UncertainProperty;
import cgeo.geocaching.enumerations.CacheAttribute;
import cgeo.geocaching.enumerations.CacheSize;
import cgeo.geocaching.enumerations.CacheType;
@@ -32,7 +34,7 @@ import cgeo.geocaching.utils.Log;
import cgeo.geocaching.utils.LogTemplateProvider;
import cgeo.geocaching.utils.LogTemplateProvider.LogContext;
import cgeo.geocaching.utils.MatcherWrapper;
-import cgeo.geocaching.utils.UncertainProperty;
+import cgeo.geocaching.utils.RxUtils;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -46,9 +48,8 @@ import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import rx.Scheduler;
-import rx.Scheduler.Inner;
import rx.Subscription;
-import rx.functions.Action1;
+import rx.functions.Action0;
import android.app.Activity;
import android.content.Intent;
@@ -58,6 +59,7 @@ import android.net.Uri;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
+import android.os.Parcelable;
import android.text.Html;
import android.text.Html.ImageGetter;
@@ -80,10 +82,6 @@ import java.util.regex.Pattern;
/**
* Internal c:geo representation of a "cache"
*/
-/**
- * @author kep9fe
- *
- */
public class Geocache implements ICache, IWaypoint {
private static final int OWN_WP_PREFIX_OFFSET = 17;
@@ -95,7 +93,7 @@ public class Geocache implements ICache, IWaypoint {
private String geocode = "";
private String cacheId = "";
private String guid = "";
- private UncertainProperty<CacheType> cacheType = new UncertainProperty<CacheType>(CacheType.UNKNOWN, Tile.ZOOMLEVEL_MIN - 1);
+ private UncertainProperty<CacheType> cacheType = new UncertainProperty<>(CacheType.UNKNOWN, Tile.ZOOMLEVEL_MIN - 1);
private String name = "";
private String ownerDisplayName = "";
private String ownerUserId = "";
@@ -113,7 +111,7 @@ public class Geocache implements ICache, IWaypoint {
* lazy initialized
*/
private String location = null;
- private UncertainProperty<Geopoint> coords = new UncertainProperty<Geopoint>(null);
+ private UncertainProperty<Geopoint> coords = new UncertainProperty<>(null);
private boolean reliableLatLon = false;
private String personalNote = null;
/**
@@ -151,7 +149,7 @@ public class Geocache implements ICache, IWaypoint {
private List<Image> spoilers = null;
private List<Trackable> inventory = null;
- private Map<LogType, Integer> logCounts = new HashMap<LogType, Integer>();
+ private Map<LogType, Integer> logCounts = new HashMap<>();
private boolean userModifiedCoords = false;
// temporary values
private boolean statusChecked = false;
@@ -160,7 +158,6 @@ public class Geocache implements ICache, IWaypoint {
private final EnumSet<StorageLocation> storageLocation = EnumSet.of(StorageLocation.HEAP);
private boolean finalDefined = false;
private boolean logPasswordRequired = false;
- // private int zoomlevel = Tile.ZOOMLEVEL_MIN - 1;
private static final Pattern NUMBER_PATTERN = Pattern.compile("\\d+");
@@ -183,13 +180,13 @@ public class Geocache implements ICache, IWaypoint {
*
* @param gpxParser
*/
- public Geocache(GPXParser gpxParser) {
+ public Geocache(final GPXParser gpxParser) {
setReliableLatLon(true);
setAttributes(Collections.<String> emptyList());
setWaypoints(Collections.<Waypoint> emptyList(), false);
}
- public void setChangeNotificationHandler(Handler newNotificationHandler) {
+ public void setChangeNotificationHandler(final Handler newNotificationHandler) {
changeNotificationHandler = newNotificationHandler;
}
@@ -339,7 +336,7 @@ public class Geocache implements ICache, IWaypoint {
this.setWaypoints(other.waypoints, false);
}
else {
- final ArrayList<Waypoint> newPoints = new ArrayList<Waypoint>(waypoints);
+ final ArrayList<Waypoint> newPoints = new ArrayList<>(waypoints);
Waypoint.mergeWayPoints(newPoints, other.waypoints, false);
this.setWaypoints(newPoints, false);
}
@@ -471,7 +468,7 @@ public class Geocache implements ICache, IWaypoint {
logOffline(fromActivity, initial, Calendar.getInstance(), logType);
}
- void logOffline(final Activity fromActivity, final String log, Calendar date, final LogType logType) {
+ void logOffline(final Activity fromActivity, final String log, final Calendar date, final LogType logType) {
if (logType == LogType.UNKNOWN) {
return;
}
@@ -498,18 +495,30 @@ public class Geocache implements ICache, IWaypoint {
return getConnector().getPossibleLogTypes(this);
}
- public void openInBrowser(Activity fromActivity) {
- fromActivity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getBrowserCacheUrl())));
+ public void openInBrowser(final Activity fromActivity) {
+ final Intent viewIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(getLongUrl()));
+
+ // Check if cgeo is the default, show the chooser to let the user choose a browser
+ if (viewIntent.resolveActivity(fromActivity.getPackageManager()).getPackageName().equals(fromActivity.getPackageName())) {
+ final Intent chooser = Intent.createChooser(viewIntent, fromActivity.getString(R.string.cache_menu_browser));
+
+ final Intent internalBrowser = new Intent(fromActivity, SimpleWebviewActivity.class);
+ internalBrowser.setData(Uri.parse(getUrl()));
+
+ chooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Parcelable[] {internalBrowser});
+
+
+ fromActivity.startActivity(chooser);
+ } else {
+ fromActivity.startActivity(viewIntent);
+ }
}
+
private String getCacheUrl() {
return getConnector().getCacheUrl(this);
}
- private String getBrowserCacheUrl() {
- return getConnector().getLongCacheUrl(this);
- }
-
private IConnector getConnector() {
return ConnectorFactory.getConnector(this);
}
@@ -589,7 +598,7 @@ public class Geocache implements ICache, IWaypoint {
return BooleanUtils.isTrue(premiumMembersOnly);
}
- public void setPremiumMembersOnly(boolean members) {
+ public void setPremiumMembersOnly(final boolean members) {
this.premiumMembersOnly = members;
}
@@ -704,11 +713,16 @@ public class Geocache implements ICache, IWaypoint {
return getConnector() instanceof ISearchByCenter;
}
- public void shareCache(Activity fromActivity, Resources res) {
+ public void shareCache(final Activity fromActivity, final Resources res) {
if (geocode == null) {
return;
}
+ final Intent intent = getShareIntent();
+
+ fromActivity.startActivity(Intent.createChooser(intent, res.getText(R.string.cache_menu_share)));
+ }
+ public Intent getShareIntent() {
final StringBuilder subject = new StringBuilder("Geocache ");
subject.append(geocode);
if (StringUtils.isNotBlank(name)) {
@@ -720,13 +734,19 @@ public class Geocache implements ICache, IWaypoint {
intent.putExtra(Intent.EXTRA_SUBJECT, subject.toString());
intent.putExtra(Intent.EXTRA_TEXT, getUrl());
- fromActivity.startActivity(Intent.createChooser(intent, res.getText(R.string.action_bar_share_title)));
+ return intent;
}
public String getUrl() {
return getConnector().getCacheUrl(this);
}
+ public String getLongUrl() {
+ return getConnector().getLongCacheUrl(this);
+ }
+
+ public String getCgeoUrl() { return getConnector().getCacheUrl(this); }
+
public boolean supportsGCVote() {
return StringUtils.startsWithIgnoreCase(geocode, "GC");
}
@@ -745,7 +765,7 @@ public class Geocache implements ICache, IWaypoint {
return BooleanUtils.isTrue(favorite);
}
- public void setFavorite(boolean favorite) {
+ public void setFavorite(final boolean favorite) {
this.favorite = favorite;
}
@@ -767,7 +787,7 @@ public class Geocache implements ICache, IWaypoint {
public void addSpoiler(final Image spoiler) {
if (spoilers == null) {
- spoilers = new ArrayList<Image>();
+ spoilers = new ArrayList<>();
}
spoilers.add(spoiler);
}
@@ -816,7 +836,7 @@ public class Geocache implements ICache, IWaypoint {
return updated;
}
- public void setUpdated(long updated) {
+ public void setUpdated(final long updated) {
this.updated = updated;
}
@@ -824,7 +844,7 @@ public class Geocache implements ICache, IWaypoint {
return detailedUpdate;
}
- public void setDetailedUpdate(long detailedUpdate) {
+ public void setDetailedUpdate(final long detailedUpdate) {
this.detailedUpdate = detailedUpdate;
}
@@ -832,7 +852,7 @@ public class Geocache implements ICache, IWaypoint {
return visitedDate;
}
- public void setVisitedDate(long visitedDate) {
+ public void setVisitedDate(final long visitedDate) {
this.visitedDate = visitedDate;
}
@@ -840,7 +860,7 @@ public class Geocache implements ICache, IWaypoint {
return listId;
}
- public void setListId(int listId) {
+ public void setListId(final int listId) {
this.listId = listId;
}
@@ -848,7 +868,7 @@ public class Geocache implements ICache, IWaypoint {
return detailed;
}
- public void setDetailed(boolean detailed) {
+ public void setDetailed(final boolean detailed) {
this.detailed = detailed;
}
@@ -865,7 +885,7 @@ public class Geocache implements ICache, IWaypoint {
return direction;
}
- public void setDirection(Float direction) {
+ public void setDirection(final Float direction) {
this.direction = direction;
}
@@ -873,7 +893,7 @@ public class Geocache implements ICache, IWaypoint {
return distance;
}
- public void setDistance(Float distance) {
+ public void setDistance(final Float distance) {
this.distance = distance;
}
@@ -891,8 +911,8 @@ public class Geocache implements ICache, IWaypoint {
*
* @param coords
*/
- public void setCoords(Geopoint coords) {
- this.coords = new UncertainProperty<Geopoint>(coords);
+ public void setCoords(final Geopoint coords) {
+ this.coords = new UncertainProperty<>(coords);
}
/**
@@ -901,8 +921,8 @@ public class Geocache implements ICache, IWaypoint {
* @param coords
* @param zoomlevel
*/
- public void setCoords(Geopoint coords, int zoomlevel) {
- this.coords = new UncertainProperty<Geopoint>(coords, zoomlevel);
+ public void setCoords(final Geopoint coords, final int zoomlevel) {
+ this.coords = new UncertainProperty<>(coords, zoomlevel);
}
/**
@@ -912,15 +932,15 @@ public class Geocache implements ICache, IWaypoint {
return getConnector().isReliableLatLon(reliableLatLon);
}
- public void setReliableLatLon(boolean reliableLatLon) {
+ public void setReliableLatLon(final boolean reliableLatLon) {
this.reliableLatLon = reliableLatLon;
}
- public void setShortDescription(String shortdesc) {
+ public void setShortDescription(final String shortdesc) {
this.shortdesc = shortdesc;
}
- public void setFavoritePoints(int favoriteCnt) {
+ public void setFavoritePoints(final int favoriteCnt) {
this.favoritePoints = favoriteCnt;
}
@@ -928,7 +948,7 @@ public class Geocache implements ICache, IWaypoint {
return rating;
}
- public void setRating(float rating) {
+ public void setRating(final float rating) {
this.rating = rating;
}
@@ -936,7 +956,7 @@ public class Geocache implements ICache, IWaypoint {
return votes;
}
- public void setVotes(int votes) {
+ public void setVotes(final int votes) {
this.votes = votes;
}
@@ -944,7 +964,7 @@ public class Geocache implements ICache, IWaypoint {
return myVote;
}
- public void setMyVote(float myVote) {
+ public void setMyVote(final float myVote) {
this.myVote = myVote;
}
@@ -952,7 +972,7 @@ public class Geocache implements ICache, IWaypoint {
return inventoryItems;
}
- public void setInventoryItems(int inventoryItems) {
+ public void setInventoryItems(final int inventoryItems) {
this.inventoryItems = inventoryItems;
}
@@ -961,7 +981,7 @@ public class Geocache implements ICache, IWaypoint {
return BooleanUtils.isTrue(onWatchlist);
}
- public void setOnWatchlist(boolean onWatchlist) {
+ public void setOnWatchlist(final boolean onWatchlist) {
this.onWatchlist = onWatchlist;
}
@@ -982,7 +1002,7 @@ public class Geocache implements ICache, IWaypoint {
* called while loading or building a cache
* @return <code>true</code> if waypoints successfully added to waypoint database
*/
- public boolean setWaypoints(List<Waypoint> waypoints, boolean saveToDatabase) {
+ public boolean setWaypoints(final List<Waypoint> waypoints, final boolean saveToDatabase) {
this.waypoints.clear();
if (waypoints != null) {
this.waypoints.addAll(waypoints);
@@ -1016,7 +1036,7 @@ public class Geocache implements ICache, IWaypoint {
*/
@NonNull
public List<LogEntry> getFriendsLogs() {
- final ArrayList<LogEntry> friendLogs = new ArrayList<LogEntry>();
+ final ArrayList<LogEntry> friendLogs = new ArrayList<>();
for (final LogEntry log : getLogs()) {
if (log.friend) {
friendLogs.add(log);
@@ -1029,7 +1049,7 @@ public class Geocache implements ICache, IWaypoint {
return BooleanUtils.isTrue(logOffline);
}
- public void setLogOffline(boolean logOffline) {
+ public void setLogOffline(final boolean logOffline) {
this.logOffline = logOffline;
}
@@ -1037,7 +1057,7 @@ public class Geocache implements ICache, IWaypoint {
return statusChecked;
}
- public void setStatusChecked(boolean statusChecked) {
+ public void setStatusChecked(final boolean statusChecked) {
this.statusChecked = statusChecked;
}
@@ -1045,39 +1065,39 @@ public class Geocache implements ICache, IWaypoint {
return directionImg;
}
- public void setDirectionImg(String directionImg) {
+ public void setDirectionImg(final String directionImg) {
this.directionImg = directionImg;
}
- public void setGeocode(String geocode) {
+ public void setGeocode(final String geocode) {
this.geocode = StringUtils.upperCase(geocode);
}
- public void setCacheId(String cacheId) {
+ public void setCacheId(final String cacheId) {
this.cacheId = cacheId;
}
- public void setGuid(String guid) {
+ public void setGuid(final String guid) {
this.guid = guid;
}
- public void setName(String name) {
+ public void setName(final String name) {
this.name = name;
}
- public void setOwnerDisplayName(String ownerDisplayName) {
+ public void setOwnerDisplayName(final String ownerDisplayName) {
this.ownerDisplayName = ownerDisplayName;
}
- public void setOwnerUserId(String ownerUserId) {
+ public void setOwnerUserId(final String ownerUserId) {
this.ownerUserId = ownerUserId;
}
- public void setHint(String hint) {
+ public void setHint(final String hint) {
this.hint = hint;
}
- public void setSize(CacheSize size) {
+ public void setSize(final CacheSize size) {
if (size == null) {
this.size = CacheSize.UNKNOWN;
}
@@ -1086,50 +1106,50 @@ public class Geocache implements ICache, IWaypoint {
}
}
- public void setDifficulty(float difficulty) {
+ public void setDifficulty(final float difficulty) {
this.difficulty = difficulty;
}
- public void setTerrain(float terrain) {
+ public void setTerrain(final float terrain) {
this.terrain = terrain;
}
- public void setLocation(String location) {
+ public void setLocation(final String location) {
this.location = location;
}
- public void setPersonalNote(String personalNote) {
+ public void setPersonalNote(final String personalNote) {
this.personalNote = StringUtils.trimToNull(personalNote);
}
- public void setDisabled(boolean disabled) {
+ public void setDisabled(final boolean disabled) {
this.disabled = disabled;
}
- public void setArchived(boolean archived) {
+ public void setArchived(final boolean archived) {
this.archived = archived;
}
- public void setFound(boolean found) {
+ public void setFound(final boolean found) {
this.found = found;
}
- public void setAttributes(List<String> attributes) {
+ public void setAttributes(final List<String> attributes) {
this.attributes.clear();
if (attributes != null) {
this.attributes.addAll(attributes);
}
}
- public void setSpoilers(List<Image> spoilers) {
+ public void setSpoilers(final List<Image> spoilers) {
this.spoilers = spoilers;
}
- public void setInventory(List<Trackable> inventory) {
+ public void setInventory(final List<Trackable> inventory) {
this.inventory = inventory;
}
- public void setLogCounts(Map<LogType, Integer> logCounts) {
+ public void setLogCounts(final Map<LogType, Integer> logCounts) {
this.logCounts = logCounts;
}
@@ -1145,18 +1165,18 @@ public class Geocache implements ICache, IWaypoint {
return cacheType.getValue();
}
- public void setType(CacheType cacheType) {
+ public void setType(final CacheType cacheType) {
if (cacheType == null || CacheType.ALL == cacheType) {
throw new IllegalArgumentException("Illegal cache type");
}
- this.cacheType = new UncertainProperty<CacheType>(cacheType);
+ this.cacheType = new UncertainProperty<>(cacheType);
}
- public void setType(CacheType cacheType, final int zoomlevel) {
+ public void setType(final CacheType cacheType, final int zoomlevel) {
if (cacheType == null || CacheType.ALL == cacheType) {
throw new IllegalArgumentException("Illegal cache type");
}
- this.cacheType = new UncertainProperty<CacheType>(cacheType, zoomlevel);
+ this.cacheType = new UncertainProperty<>(cacheType, zoomlevel);
}
public boolean hasDifficulty() {
@@ -1190,7 +1210,7 @@ public class Geocache implements ICache, IWaypoint {
* called while loading or building a cache
* @return <code>true</code> if waypoint successfully added to waypoint database
*/
- public boolean addOrChangeWaypoint(final Waypoint waypoint, boolean saveToDatabase) {
+ public boolean addOrChangeWaypoint(final Waypoint waypoint, final boolean saveToDatabase) {
waypoint.setGeocode(geocode);
if (waypoint.getId() < 0) { // this is a new waypoint
@@ -1202,7 +1222,7 @@ public class Geocache implements ICache, IWaypoint {
} else { // this is a waypoint being edited
final int index = getWaypointIndex(waypoint);
if (index >= 0) {
- Waypoint oldWaypoint = waypoints.remove(index);
+ final Waypoint oldWaypoint = waypoints.remove(index);
waypoint.setPrefix(oldWaypoint.getPrefix());
//migration
if (StringUtils.isBlank(waypoint.getPrefix())
@@ -1221,15 +1241,15 @@ public class Geocache implements ICache, IWaypoint {
* Assigns a unique two-digit (compatibility with gc.com)
* prefix within the scope of this cache.
*/
- private void assignUniquePrefix(Waypoint waypoint) {
+ private void assignUniquePrefix(final Waypoint waypoint) {
// gather existing prefixes
- Set<String> assignedPrefixes = new HashSet<String>();
- for (Waypoint wp : waypoints) {
+ final Set<String> assignedPrefixes = new HashSet<>();
+ for (final Waypoint wp : waypoints) {
assignedPrefixes.add(wp.getPrefix());
}
for (int i = OWN_WP_PREFIX_OFFSET; i < 100; i++) {
- String prefixCandidate = StringUtils.leftPad(String.valueOf(i), 2, '0');
+ final String prefixCandidate = StringUtils.leftPad(String.valueOf(i), 2, '0');
if (!assignedPrefixes.contains(prefixCandidate)) {
waypoint.setPrefix(prefixCandidate);
break;
@@ -1247,7 +1267,7 @@ public class Geocache implements ICache, IWaypoint {
}
// Only for loading
- public void setFinalDefined(boolean finalDefined) {
+ public void setFinalDefined(final boolean finalDefined) {
this.finalDefined = finalDefined;
}
@@ -1268,7 +1288,7 @@ public class Geocache implements ICache, IWaypoint {
return userModifiedCoords;
}
- public void setUserModifiedCoords(boolean coordsChanged) {
+ public void setUserModifiedCoords(final boolean coordsChanged) {
userModifiedCoords = coordsChanged;
}
@@ -1309,7 +1329,7 @@ public class Geocache implements ICache, IWaypoint {
final int index = getWaypointIndex(waypoint);
waypoints.remove(index);
DataStore.deleteWaypoint(waypoint.getId());
- DataStore.removeCache(geocode, EnumSet.of(RemoveFlag.REMOVE_CACHE));
+ DataStore.removeCache(geocode, EnumSet.of(RemoveFlag.CACHE));
// Check status if Final is defined
if (waypoint.isFinalWithCoords()) {
resetFinalDefined();
@@ -1325,11 +1345,11 @@ public class Geocache implements ICache, IWaypoint {
* @param waypoint
*/
- public void deleteWaypointForce(Waypoint waypoint) {
+ public void deleteWaypointForce(final Waypoint waypoint) {
final int index = getWaypointIndex(waypoint);
waypoints.remove(index);
DataStore.deleteWaypoint(waypoint.getId());
- DataStore.removeCache(geocode, EnumSet.of(RemoveFlag.REMOVE_CACHE));
+ DataStore.removeCache(geocode, EnumSet.of(RemoveFlag.CACHE));
resetFinalDefined();
}
@@ -1405,17 +1425,17 @@ public class Geocache implements ICache, IWaypoint {
}
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
// TODO: explain the following line or remove this non-standard equality method
// just compare the geocode even if that is not what "equals" normally does
return this == obj || (obj instanceof Geocache && StringUtils.isNotEmpty(geocode) && geocode.equals(((Geocache) obj).geocode));
}
- public void store(CancellableHandler handler) {
+ public void store(final CancellableHandler handler) {
store(StoredList.TEMPORARY_LIST_ID, handler);
}
- public void store(final int listId, CancellableHandler handler) {
+ public void store(final int listId, final CancellableHandler handler) {
final int newListId = listId < StoredList.STANDARD_LIST_ID
? Math.max(getListId(), StoredList.STANDARD_LIST_ID)
: listId;
@@ -1438,9 +1458,9 @@ public class Geocache implements ICache, IWaypoint {
}
public Subscription drop(final Handler handler, final Scheduler scheduler) {
- return scheduler.schedule(new Action1<Inner>() {
+ return scheduler.createWorker().schedule(new Action0() {
@Override
- public void call(final Inner inner) {
+ public void call() {
try {
dropSynchronous();
handler.sendMessage(Message.obtain());
@@ -1453,7 +1473,7 @@ public class Geocache implements ICache, IWaypoint {
public void dropSynchronous() {
DataStore.markDropped(Collections.singletonList(this));
- DataStore.removeCache(getGeocode(), EnumSet.of(RemoveFlag.REMOVE_CACHE));
+ DataStore.removeCache(getGeocode(), EnumSet.of(RemoveFlag.CACHE));
}
public void checkFields() {
@@ -1498,22 +1518,22 @@ public class Geocache implements ICache, IWaypoint {
}
}
- public Subscription refresh(final int newListId, final CancellableHandler handler, final Scheduler scheduler) {
- return scheduler.schedule(new Action1<Inner>() {
+ public Subscription refresh(final CancellableHandler handler, final Scheduler scheduler) {
+ return scheduler.createWorker().schedule(new Action0() {
@Override
- public void call(final Inner inner) {
- refreshSynchronous(newListId, handler);
+ public void call() {
+ refreshSynchronous(handler);
handler.sendEmptyMessage(CancellableHandler.DONE);
}
});
}
- public void refreshSynchronous(final int newListId, final CancellableHandler handler) {
- DataStore.removeCache(geocode, EnumSet.of(RemoveFlag.REMOVE_CACHE));
- storeCache(null, geocode, newListId, true, handler);
+ public void refreshSynchronous(final CancellableHandler handler) {
+ DataStore.removeCache(geocode, EnumSet.of(RemoveFlag.CACHE));
+ storeCache(null, geocode, listId, true, handler);
}
- public static void storeCache(Geocache origCache, String geocode, int listId, boolean forceRedownload, CancellableHandler handler) {
+ public static void storeCache(final Geocache origCache, final String geocode, final int listId, final boolean forceRedownload, final CancellableHandler handler) {
try {
Geocache cache = null;
// get cache details, they may not yet be complete
@@ -1585,15 +1605,13 @@ public class Geocache implements ICache, IWaypoint {
}
cache.setListId(listId);
- DataStore.saveCache(cache, EnumSet.of(SaveFlag.SAVE_DB));
+ DataStore.saveCache(cache, EnumSet.of(SaveFlag.DB));
if (CancellableHandler.isCancelled(handler)) {
return;
}
- StaticMapsProvider.downloadMaps(cache);
-
- imgGetter.waitForBackgroundLoading(handler);
+ RxUtils.waitForCompletion(StaticMapsProvider.downloadMaps(cache), imgGetter.waitForEndObservable(handler));
if (handler != null) {
handler.sendMessage(Message.obtain());
@@ -1643,7 +1661,7 @@ public class Geocache implements ICache, IWaypoint {
}
final String hourLocalized = CgeoApplication.getInstance().getString(R.string.cache_time_full_hours);
- ArrayList<Pattern> patterns = new ArrayList<Pattern>();
+ final ArrayList<Pattern> patterns = new ArrayList<>();
// 12:34
patterns.add(Pattern.compile("\\b(\\d{1,2})\\:(\\d\\d)\\b"));
@@ -1655,7 +1673,7 @@ public class Geocache implements ICache, IWaypoint {
}
final String searchText = getShortDescription() + ' ' + getDescription();
- for (Pattern pattern : patterns) {
+ for (final Pattern pattern : patterns) {
final MatcherWrapper matcher = new MatcherWrapper(pattern, searchText);
while (matcher.find()) {
try {
@@ -1683,8 +1701,8 @@ public class Geocache implements ICache, IWaypoint {
* true if we are looking for the attribute_yes version, false for the attribute_no version
* @return
*/
- public boolean hasAttribute(CacheAttribute attribute, boolean yes) {
- Geocache fullCache = DataStore.loadCache(getGeocode(), EnumSet.of(LoadFlag.LOAD_ATTRIBUTES));
+ public boolean hasAttribute(final CacheAttribute attribute, final boolean yes) {
+ Geocache fullCache = DataStore.loadCache(getGeocode(), EnumSet.of(LoadFlag.ATTRIBUTES));
if (fullCache == null) {
fullCache = this;
}
@@ -1703,7 +1721,7 @@ public class Geocache implements ICache, IWaypoint {
};
private void addDescriptionImagesUrls(final Collection<Image> images) {
- final Set<String> urls = new LinkedHashSet<String>();
+ final Set<String> urls = new LinkedHashSet<>();
for (final Image image : images) {
urls.add(image.getUrl());
}
@@ -1720,13 +1738,13 @@ public class Geocache implements ICache, IWaypoint {
}
public Collection<Image> getImages() {
- final LinkedList<Image> result = new LinkedList<Image>();
+ final LinkedList<Image> result = new LinkedList<>();
result.addAll(getSpoilers());
addLocalSpoilersTo(result);
for (final LogEntry log : getLogs()) {
result.addAll(log.getLogImages());
}
- final Set<String> urls = new HashSet<String>(result.size());
+ final Set<String> urls = new HashSet<>(result.size());
for (final Image image : result) {
urls.add(image.getUrl());
}
@@ -1762,7 +1780,7 @@ public class Geocache implements ICache, IWaypoint {
* Gets whether the user has logged the specific log type for this cache. Only checks the currently stored logs of
* the cache, so the result might be wrong.
*/
- public boolean hasOwnLog(LogType logType) {
+ public boolean hasOwnLog(final LogType logType) {
for (final LogEntry logEntry : getLogs()) {
if (logEntry.type == logType && logEntry.isOwn()) {
return true;
@@ -1779,15 +1797,15 @@ public class Geocache implements ICache, IWaypoint {
return logPasswordRequired;
}
- public void setLogPasswordRequired(boolean required) {
+ public void setLogPasswordRequired(final boolean required) {
logPasswordRequired = required;
}
- public String getWaypointGpxId(String prefix) {
+ public String getWaypointGpxId(final String prefix) {
return getConnector().getWaypointGpxId(prefix, geocode);
}
- public String getWaypointPrefix(String name) {
+ public String getWaypointPrefix(final String name) {
return getConnector().getWaypointPrefix(name);
}
@@ -1800,7 +1818,7 @@ public class Geocache implements ICache, IWaypoint {
if (getLogCounts().isEmpty()) {
setLogCounts(DataStore.loadLogCounts(getGeocode()));
}
- Integer logged = getLogCounts().get(LogType.FOUND_IT);
+ final Integer logged = getLogCounts().get(LogType.FOUND_IT);
if (logged != null) {
return logged;
}
@@ -1814,7 +1832,7 @@ public class Geocache implements ICache, IWaypoint {
public LogType getDefaultLogType() {
if (isEventCache()) {
final Date eventDate = getHiddenDate();
- boolean expired = DateUtils.isPastEvent(this);
+ final boolean expired = DateUtils.isPastEvent(this);
if (hasOwnLog(LogType.WILL_ATTEND) || expired || (eventDate != null && DateUtils.daysSince(eventDate.getTime()) == 0)) {
return hasOwnLog(LogType.ATTENDED) ? LogType.NOTE : LogType.ATTENDED;
diff --git a/main/src/cgeo/geocaching/ImageSelectActivity.java b/main/src/cgeo/geocaching/ImageSelectActivity.java
index b5fb38e..a64b4cf 100644
--- a/main/src/cgeo/geocaching/ImageSelectActivity.java
+++ b/main/src/cgeo/geocaching/ImageSelectActivity.java
@@ -3,7 +3,7 @@ package cgeo.geocaching;
import butterknife.ButterKnife;
import butterknife.InjectView;
-import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.AbstractActionBarActivity;
import cgeo.geocaching.files.LocalStorage;
import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.dialog.Dialogs;
@@ -37,7 +37,7 @@ import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
-public class ImageSelectActivity extends AbstractActivity {
+public class ImageSelectActivity extends AbstractActionBarActivity {
@InjectView(R.id.caption) protected EditText captionView;
@InjectView(R.id.description) protected EditText descriptionView;
diff --git a/main/src/cgeo/geocaching/ImagesActivity.java b/main/src/cgeo/geocaching/ImagesActivity.java
index 3da1ade..b75e5eb 100644
--- a/main/src/cgeo/geocaching/ImagesActivity.java
+++ b/main/src/cgeo/geocaching/ImagesActivity.java
@@ -1,6 +1,6 @@
package cgeo.geocaching;
-import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.AbstractActionBarActivity;
import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.ImagesList;
import cgeo.geocaching.ui.ImagesList.ImageType;
@@ -19,7 +19,7 @@ import android.view.View;
import java.util.ArrayList;
import java.util.List;
-public class ImagesActivity extends AbstractActivity {
+public class ImagesActivity extends AbstractActionBarActivity {
private boolean offline;
private ArrayList<Image> imageNames;
@@ -90,7 +90,7 @@ public class ImagesActivity extends AbstractActivity {
.putExtra(Intents.EXTRA_TYPE, imageType);
// avoid forcing the array list as parameter type
- final ArrayList<Image> arrayList = new ArrayList<Image>(logImages);
+ final ArrayList<Image> arrayList = new ArrayList<>(logImages);
logImgIntent.putParcelableArrayListExtra(Intents.EXTRA_IMAGES, arrayList);
fromActivity.startActivity(logImgIntent);
}
diff --git a/main/src/cgeo/geocaching/LogCacheActivity.java b/main/src/cgeo/geocaching/LogCacheActivity.java
index 2b05263..83bbdf2 100644
--- a/main/src/cgeo/geocaching/LogCacheActivity.java
+++ b/main/src/cgeo/geocaching/LogCacheActivity.java
@@ -1,5 +1,7 @@
package cgeo.geocaching;
+import butterknife.ButterKnife;
+
import cgeo.geocaching.connector.ILoggingManager;
import cgeo.geocaching.connector.ImageResult;
import cgeo.geocaching.connector.LogResult;
@@ -10,11 +12,11 @@ import cgeo.geocaching.enumerations.StatusCode;
import cgeo.geocaching.gcvote.GCVote;
import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.twitter.Twitter;
-import cgeo.geocaching.ui.Formatter;
import cgeo.geocaching.ui.dialog.DateDialog;
import cgeo.geocaching.ui.dialog.Dialogs;
import cgeo.geocaching.utils.AsyncTaskWithProgress;
import cgeo.geocaching.utils.DateUtils;
+import cgeo.geocaching.utils.Formatter;
import cgeo.geocaching.utils.Log;
import cgeo.geocaching.utils.LogTemplateProvider;
import cgeo.geocaching.utils.LogTemplateProvider.LogContext;
@@ -25,7 +27,6 @@ import org.apache.commons.lang3.StringUtils;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
-import android.app.Dialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
@@ -35,12 +36,13 @@ import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
-import android.view.SubMenu;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.LinearLayout;
+import android.widget.RatingBar;
+import android.widget.RatingBar.OnRatingBarChangeListener;
import android.widget.TextView;
import java.util.ArrayList;
@@ -52,7 +54,6 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
static final String EXTRAS_GEOCODE = "geocode";
static final String EXTRAS_ID = "id";
- private static final int SUBMENU_VOTE = 3;
private static final String SAVED_STATE_RATING = "cgeo.geocaching.saved_state_rating";
private static final String SAVED_STATE_TYPE = "cgeo.geocaching.saved_state_type";
private static final String SAVED_STATE_DATE = "cgeo.geocaching.saved_state_date";
@@ -66,13 +67,11 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
private Geocache cache = null;
private String geocode = null;
private String text = null;
- private List<LogType> possibleLogTypes = new ArrayList<LogType>();
+ private List<LogType> possibleLogTypes = new ArrayList<>();
private List<TrackableLog> trackables = null;
- private Button postButton = null;
private CheckBox tweetCheck = null;
private LinearLayout tweetBox = null;
private LinearLayout logPasswordBox = null;
- private boolean tbChanged = false;
private SparseArray<TrackableLog> actionButtons;
private ILoggingManager loggingManager;
@@ -84,6 +83,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
private String imageCaption;
private String imageDescription;
private Uri imageUri;
+ private boolean sendButtonEnabled;
public void onLoadFinished() {
@@ -123,9 +123,8 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
private void initializeTrackablesAction() {
if (Settings.isTrackableAutoVisit()) {
- for (TrackableLog trackable : trackables) {
+ for (final TrackableLog trackable : trackables) {
trackable.action = LogTypeTrackable.VISITED;
- tbChanged = true;
}
}
}
@@ -137,24 +136,26 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
if (inflater == null) {
inflater = getLayoutInflater();
}
- actionButtons = new SparseArray<TrackableLog>();
+ actionButtons = new SparseArray<>();
final LinearLayout inventoryView = (LinearLayout) findViewById(R.id.inventory);
inventoryView.removeAllViews();
- for (TrackableLog tb : trackables) {
- LinearLayout inventoryItem = (LinearLayout) inflater.inflate(R.layout.logcache_trackable_item, null);
+ for (final TrackableLog tb : trackables) {
+ final LinearLayout inventoryItem = (LinearLayout) inflater.inflate(R.layout.logcache_trackable_item, inventoryView, false);
- ((TextView) inventoryItem.findViewById(R.id.trackcode)).setText(tb.trackCode);
- ((TextView) inventoryItem.findViewById(R.id.name)).setText(tb.name);
- final TextView actionButton = (TextView) inventoryItem.findViewById(R.id.action);
+ final TextView codeView = ButterKnife.findById(inventoryItem, R.id.trackcode);
+ codeView.setText(tb.trackCode);
+ final TextView nameView = ButterKnife.findById(inventoryItem, R.id.name);
+ nameView.setText(tb.name);
+ final TextView actionButton = ButterKnife.findById(inventoryItem, R.id.action);
actionButton.setId(tb.id);
actionButtons.put(actionButton.getId(), tb);
actionButton.setText(tb.action.getLabel() + " ▼");
actionButton.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View view) {
+ public void onClick(final View view) {
selectTrackableAction(view);
}
});
@@ -164,7 +165,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
inventoryItem.findViewById(R.id.info).setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View view) {
+ public void onClick(final View view) {
final Intent trackablesIntent = new Intent(LogCacheActivity.this, TrackableActivity.class);
trackablesIntent.putExtra(Intents.EXTRA_GEOCODE, tbCode);
startActivity(trackablesIntent);
@@ -180,11 +181,11 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
if (inventoryView.getChildCount() > 1) {
final LinearLayout inventoryChangeAllView = (LinearLayout) findViewById(R.id.inventory_changeall);
- final Button changeButton = (Button) inventoryChangeAllView.findViewById(R.id.changebutton);
+ final Button changeButton = ButterKnife.findById(inventoryChangeAllView, R.id.changebutton);
changeButton.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View view) {
+ public void onClick(final View view) {
selectAllTrackablesAction();
}
});
@@ -193,33 +194,9 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
}
}
- private void enablePostButton(boolean enabled) {
- postButton.setEnabled(enabled);
- if (enabled) {
- postButton.setOnClickListener(new PostListener());
- }
- else {
- postButton.setOnTouchListener(null);
- postButton.setOnClickListener(null);
- }
- updatePostButtonText();
- }
-
- private void updatePostButtonText() {
- postButton.setText(getPostButtonText());
- }
-
- private String getPostButtonText() {
- if (!postButton.isEnabled()) {
- return res.getString(R.string.log_post_not_possible);
- }
- if (!GCVote.isVotingPossible(cache)) {
- return res.getString(R.string.log_post);
- }
- if (GCVote.isValidRating(rating)) {
- return res.getString(R.string.log_post_rate) + " " + GCVote.getRatingText(rating) + "*";
- }
- return res.getString(R.string.log_post_no_rate);
+ private void enablePostButton(final boolean enabled) {
+ sendButtonEnabled = enabled;
+ invalidateOptionsMenuCompatible();
}
@Override
@@ -239,6 +216,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
}
cache = DataStore.loadCache(geocode, LoadFlags.LOAD_CACHE_OR_DB);
+ invalidateOptionsMenuCompatible();
possibleLogTypes = cache.getPossibleLogTypes();
if (StringUtils.isNotBlank(cache.getName())) {
@@ -248,11 +226,13 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
}
// Get ids for later use
- postButton = (Button) findViewById(R.id.post);
tweetBox = (LinearLayout) findViewById(R.id.tweet_box);
tweetCheck = (CheckBox) findViewById(R.id.tweet);
logPasswordBox = (LinearLayout) findViewById(R.id.log_password_box);
+ final RatingBar ratingBar = (RatingBar) findViewById(R.id.gcvoteRating);
+ initializeRatingBar(ratingBar);
+
// initialize with default values
setDefaultValues();
@@ -277,8 +257,6 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
insertIntoLog(LogTemplateProvider.applyTemplates(Settings.getSignature(), new LogContext(cache, null)), false);
}
}
- updatePostButtonText();
- updateImageButton();
enablePostButton(false);
final Button typeButton = (Button) findViewById(R.id.type);
@@ -286,7 +264,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
typeButton.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View view) {
+ public void onClick(final View view) {
selectLogType();
}
});
@@ -305,36 +283,30 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
updateTweetBox(typeSelected);
updateLogPasswordBox(typeSelected);
- final Button imageButton = (Button) findViewById(R.id.image_btn);
- imageButton.setOnClickListener(new View.OnClickListener() {
-
- @Override
- public void onClick(View view) {
- selectImage();
- }
- });
-
- final Button saveButton = (Button) findViewById(R.id.save);
- saveButton.setOnClickListener(new View.OnClickListener() {
+ loggingManager = cache.getLoggingManager(this);
- @Override
- public void onClick(View v) {
- saveLog(true);
- }
- });
+ loggingManager.init();
+ }
- final Button clearButton = (Button) findViewById(R.id.clear);
- clearButton.setOnClickListener(new View.OnClickListener() {
+ private void initializeRatingBar(final RatingBar ratingBar) {
+ final TextView label = (TextView) findViewById(R.id.gcvoteLabel);
+ if (GCVote.isVotingPossible(cache)) {
+ ratingBar.setVisibility(View.VISIBLE);
+ label.setVisibility(View.VISIBLE);
+ }
+ ratingBar.setOnRatingBarChangeListener(new OnRatingBarChangeListener() {
@Override
- public void onClick(View v) {
- clearLog();
+ public void onRatingChanged(final RatingBar ratingBar, final float stars, final boolean fromUser) {
+ // 0.5 is not a valid rating, therefore we must limit
+ rating = GCVote.isValidRating(stars) ? stars : 0;
+ if (rating < stars) {
+ ratingBar.setRating(rating);
+ }
+ label.setText(GCVote.getDescription(rating));
}
});
-
- loggingManager = cache.getLoggingManager(this);
-
- loggingManager.init();
+ ratingBar.setRating(cache.getMyVote());
}
private void setDefaultValues() {
@@ -364,8 +336,6 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
final EditText logPasswordView = (EditText) findViewById(R.id.log_password);
logPasswordView.setText(StringUtils.EMPTY);
- updateImageButton();
-
showToast(res.getString(R.string.info_log_cleared));
}
@@ -382,53 +352,6 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
}
@Override
- public boolean onCreateOptionsMenu(final Menu menu) {
- super.onCreateOptionsMenu(menu);
-
- final SubMenu menuStars = menu.addSubMenu(0, SUBMENU_VOTE, 0, res.getString(R.string.log_rating)).setIcon(R.drawable.ic_menu_sort_by_size);
- menuStars.add(0, 10, 0, res.getString(R.string.log_no_rating));
- menuStars.add(0, 19, 0, res.getString(R.string.log_stars_5) + " (" + res.getString(R.string.log_stars_5_description) + ")");
- menuStars.add(0, 18, 0, res.getString(R.string.log_stars_45) + " (" + res.getString(R.string.log_stars_45_description) + ")");
- menuStars.add(0, 17, 0, res.getString(R.string.log_stars_4) + " (" + res.getString(R.string.log_stars_4_description) + ")");
- menuStars.add(0, 16, 0, res.getString(R.string.log_stars_35) + " (" + res.getString(R.string.log_stars_35_description) + ")");
- menuStars.add(0, 15, 0, res.getString(R.string.log_stars_3) + " (" + res.getString(R.string.log_stars_3_description) + ")");
- menuStars.add(0, 14, 0, res.getString(R.string.log_stars_25) + " (" + res.getString(R.string.log_stars_25_description) + ")");
- menuStars.add(0, 13, 0, res.getString(R.string.log_stars_2) + " (" + res.getString(R.string.log_stars_2_description) + ")");
- menuStars.add(0, 12, 0, res.getString(R.string.log_stars_15) + " (" + res.getString(R.string.log_stars_15_description) + ")");
- menuStars.add(0, 11, 0, res.getString(R.string.log_stars_1) + " (" + res.getString(R.string.log_stars_1_description) + ")");
-
- return true;
- }
-
- @Override
- public boolean onPrepareOptionsMenu(Menu menu) {
- super.onPrepareOptionsMenu(menu);
-
- menu.findItem(SUBMENU_VOTE).setVisible(GCVote.isVotingPossible(cache));
-
- return true;
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- if (super.onOptionsItemSelected(item)) {
- return true;
- }
-
- final int id = item.getItemId();
- if (id >= 10 && id <= 19) {
- rating = (id - 9) / 2.0f;
- if (!GCVote.isValidRating(rating)) {
- rating = GCVote.NO_RATING;
- }
- updatePostButtonText();
- return true;
- }
-
- return false;
- }
-
- @Override
protected void onSaveInstanceState(final Bundle outState) {
super.onSaveInstanceState(outState);
outState.putDouble(SAVED_STATE_RATING, rating);
@@ -440,32 +363,24 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
}
@Override
- public void setDate(Calendar dateIn) {
+ public void setDate(final Calendar dateIn) {
date = dateIn;
final Button dateButton = (Button) findViewById(R.id.date);
dateButton.setText(Formatter.formatShortDateVerbally(date.getTime().getTime()));
}
- public void setType(LogType type) {
+ public void setType(final LogType type) {
final Button typeButton = (Button) findViewById(R.id.type);
typeSelected = type;
typeButton.setText(typeSelected.getL10n());
- if (LogType.FOUND_IT == type && !tbChanged) {
- // TODO: change action
- } else if (LogType.FOUND_IT != type && !tbChanged) {
- // TODO: change action
- }
-
updateTweetBox(type);
updateLogPasswordBox(type);
-
- updatePostButtonText();
}
- private void updateTweetBox(LogType type) {
+ private void updateTweetBox(final LogType type) {
if (type == LogType.FOUND_IT && Settings.isUseTwitter() && Settings.isTwitterLoginValid()) {
tweetBox.setVisibility(View.VISIBLE);
} else {
@@ -473,7 +388,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
}
}
- private void updateLogPasswordBox(LogType type) {
+ private void updateLogPasswordBox(final LogType type) {
if (type == LogType.FOUND_IT && cache.isLogPasswordRequired()) {
logPasswordBox.setVisibility(View.VISIBLE);
} else {
@@ -484,20 +399,10 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
private class DateListener implements View.OnClickListener {
@Override
- public void onClick(View arg0) {
- final Dialog dateDialog = new DateDialog(LogCacheActivity.this, LogCacheActivity.this, date);
+ public void onClick(final View arg0) {
+ final DateDialog dateDialog = DateDialog.getInstance(date);
dateDialog.setCancelable(true);
- dateDialog.show();
- }
- }
-
- private class PostListener implements View.OnClickListener {
- @Override
- public void onClick(View arg0) {
- final String message = res.getString(StringUtils.isBlank(imageUri.getPath()) ?
- R.string.log_saving :
- R.string.log_saving_and_uploading);
- new Poster(LogCacheActivity.this, message).execute(currentLogText(), currentLogPassword());
+ dateDialog.show(getSupportFragmentManager(), "date_dialog");
}
}
@@ -516,15 +421,16 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
if (logResult.getPostLogResult() == StatusCode.NO_ERROR) {
// update geocache in DB
- if (typeSelected == LogType.FOUND_IT || typeSelected == LogType.ATTENDED) {
+ if (typeSelected == LogType.FOUND_IT || typeSelected == LogType.ATTENDED || typeSelected == LogType.WEBCAM_PHOTO_TAKEN) {
cache.setFound(true);
cache.setVisitedDate(new Date().getTime());
}
DataStore.saveChangedCache(cache);
// update logs in DB
- ArrayList<LogEntry> newLogs = new ArrayList<LogEntry>(cache.getLogs());
+ final ArrayList<LogEntry> newLogs = new ArrayList<>(cache.getLogs());
final LogEntry logNow = new LogEntry(date.getTimeInMillis(), typeSelected, log);
+ logNow.friend = true;
newLogs.add(0, logNow);
DataStore.saveLogsWithoutTransaction(cache.getGeocode(), newLogs);
@@ -541,7 +447,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
}
if (StringUtils.isNotBlank(imageUri.getPath())) {
- ImageResult imageResult = loggingManager.postLogImage(logResult.getLogId(), imageCaption, imageDescription, imageUri);
+ final ImageResult imageResult = loggingManager.postLogImage(logResult.getLogId(), imageCaption, imageDescription, imageUri);
final String uploadedImageUrl = imageResult.getImageUri();
if (StringUtils.isNotEmpty(uploadedImageUrl)) {
logNow.addLogImage(new Image(uploadedImageUrl, imageCaption, imageDescription));
@@ -552,7 +458,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
}
return logResult.getPostLogResult();
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
Log.e("VisitCacheActivity.Poster.doInBackgroundInternal", e);
}
@@ -601,18 +507,17 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
}
private void selectAllTrackablesAction() {
- Builder alert = new AlertDialog.Builder(this);
+ final Builder alert = new AlertDialog.Builder(this);
alert.setTitle(res.getString(R.string.log_tb_changeall));
- String[] tbLogTypes = getTBLogTypes();
+ final String[] tbLogTypes = getTBLogTypes();
alert.setItems(tbLogTypes, new OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int position) {
+ public void onClick(final DialogInterface dialog, final int position) {
final LogTypeTrackable logType = LogTypeTrackable.values()[position];
- for (TrackableLog tb : trackables) {
+ for (final TrackableLog tb : trackables) {
tb.action = logType;
}
- tbChanged = true;
updateTrackablesList();
dialog.dismiss();
}
@@ -622,7 +527,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
private static String[] getTBLogTypes() {
final LogTypeTrackable[] logTypeValues = LogTypeTrackable.values();
- String[] logTypes = new String[logTypeValues.length];
+ final String[] logTypes = new String[logTypeValues.length];
for (int i = 0; i < logTypes.length; i++) {
logTypes[i] = logTypeValues[i].getLabel();
}
@@ -631,17 +536,17 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
private void selectLogType() {
// use a local copy of the possible types, as that one might be modified in the background by the loader
- final ArrayList<LogType> possible = new ArrayList<LogType>(possibleLogTypes);
+ final ArrayList<LogType> possible = new ArrayList<>(possibleLogTypes);
- Builder alert = new AlertDialog.Builder(this);
- String[] choices = new String[possible.size()];
+ final Builder alert = new AlertDialog.Builder(this);
+ final String[] choices = new String[possible.size()];
for (int i = 0; i < choices.length; i++) {
choices[i] = possible.get(i).getL10n();
}
alert.setSingleChoiceItems(choices, possible.indexOf(typeSelected), new OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int position) {
+ public void onClick(final DialogInterface dialog, final int position) {
setType(possible.get(position));
dialog.dismiss();
}
@@ -649,18 +554,17 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
alert.create().show();
}
- private void selectTrackableAction(View view) {
+ private void selectTrackableAction(final View view) {
final int realViewId = view.getId();
- Builder alert = new AlertDialog.Builder(this);
+ final Builder alert = new AlertDialog.Builder(this);
final TrackableLog trackableLog = actionButtons.get(realViewId);
alert.setTitle(trackableLog.name);
- String[] tbLogTypes = getTBLogTypes();
+ final String[] tbLogTypes = getTBLogTypes();
alert.setItems(tbLogTypes, new OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int position) {
+ public void onClick(final DialogInterface dialog, final int position) {
final LogTypeTrackable logType = LogTypeTrackable.values()[position];
- tbChanged = true;
trackableLog.action = logType;
Log.i("Trackable " + trackableLog.trackCode + " (" + trackableLog.name + ") has new action: #" + logType);
updateTrackablesList();
@@ -671,7 +575,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
}
private void selectImage() {
- Intent selectImageIntent = new Intent(this, ImageSelectActivity.class);
+ final Intent selectImageIntent = new Intent(this, ImageSelectActivity.class);
selectImageIntent.putExtra(ImageSelectActivity.EXTRAS_CAPTION, imageCaption);
selectImageIntent.putExtra(ImageSelectActivity.EXTRAS_DESCRIPTION, imageDescription);
selectImageIntent.putExtra(ImageSelectActivity.EXTRAS_URI_AS_STRING, imageUri.toString());
@@ -680,7 +584,7 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
}
@Override
- protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ protected void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
if (requestCode == SELECT_IMAGE) {
if (resultCode == RESULT_OK) {
imageCaption = data.getStringExtra(ImageSelectActivity.EXTRAS_CAPTION);
@@ -690,19 +594,51 @@ public class LogCacheActivity extends AbstractLoggingActivity implements DateDia
// Image capture failed, advise user
showToast(getResources().getString(R.string.err_select_logimage_failed));
}
- updateImageButton();
+ }
+ }
+ @Override
+ public boolean onOptionsItemSelected(final MenuItem item) {
+ switch (item.getItemId()) {
+ case R.id.menu_send:
+ sendLog();
+ return true;
+ case R.id.menu_image:
+ selectImage();
+ return true;
+ case R.id.save:
+ saveLog(true);
+ finish();
+ return true;
+ case R.id.clear:
+ clearLog();
+ return true;
+ default:
+ break;
}
+
+ return super.onOptionsItemSelected(item);
}
- private void updateImageButton() {
- final Button imageButton = (Button) findViewById(R.id.image_btn);
- if (cache.supportsLogImages()) {
- imageButton.setVisibility(View.VISIBLE);
- imageButton.setText(StringUtils.isNotBlank(imageUri.getPath()) ?
- res.getString(R.string.log_image_edit) : res.getString(R.string.log_image_attach));
- } else {
- imageButton.setVisibility(View.GONE);
+ private void sendLog() {
+ if (!sendButtonEnabled) {
+ Dialogs.message(this, R.string.log_post_not_possible);
}
+ else {
+ final String message = res.getString(StringUtils.isBlank(imageUri.getPath()) ?
+ R.string.log_saving :
+ R.string.log_saving_and_uploading);
+ new Poster(this, message).execute(currentLogText(), currentLogPassword());
+ }
+ }
+
+ @Override
+ public boolean onCreateOptionsMenu(final Menu menu) {
+ super.onCreateOptionsMenu(menu);
+ menu.findItem(R.id.menu_image).setVisible(cache.supportsLogImages());
+ menu.findItem(R.id.save).setVisible(true);
+ menu.findItem(R.id.clear).setVisible(true);
+ return true;
}
+
}
diff --git a/main/src/cgeo/geocaching/LogEntry.java b/main/src/cgeo/geocaching/LogEntry.java
index ca4a3d1..b4b346c 100644
--- a/main/src/cgeo/geocaching/LogEntry.java
+++ b/main/src/cgeo/geocaching/LogEntry.java
@@ -68,7 +68,7 @@ public final class LogEntry {
public void addLogImage(final Image image) {
if (logImages == null) {
- logImages = new ArrayList<Image>();
+ logImages = new ArrayList<>();
}
logImages.add(image);
}
@@ -88,7 +88,7 @@ public final class LogEntry {
}
public CharSequence getImageTitles() {
- final List<String> titles = new ArrayList<String>(5);
+ final List<String> titles = new ArrayList<>(5);
for (Image image : getLogImages()) {
if (StringUtils.isNotBlank(image.getTitle())) {
titles.add(HtmlUtils.extractText(image.getTitle()));
diff --git a/main/src/cgeo/geocaching/LogTrackableActivity.java b/main/src/cgeo/geocaching/LogTrackableActivity.java
index fabe391..b16b4f4 100644
--- a/main/src/cgeo/geocaching/LogTrackableActivity.java
+++ b/main/src/cgeo/geocaching/LogTrackableActivity.java
@@ -11,16 +11,15 @@ import cgeo.geocaching.network.Network;
import cgeo.geocaching.network.Parameters;
import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.twitter.Twitter;
-import cgeo.geocaching.ui.Formatter;
import cgeo.geocaching.ui.dialog.DateDialog;
import cgeo.geocaching.ui.dialog.Dialogs;
+import cgeo.geocaching.utils.Formatter;
import cgeo.geocaching.utils.Log;
import cgeo.geocaching.utils.LogTemplateProvider.LogContext;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
-import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
@@ -42,14 +41,13 @@ import java.util.List;
public class LogTrackableActivity extends AbstractLoggingActivity implements DateDialog.DateDialogParent {
- @InjectView(R.id.post) protected Button buttonPost;
@InjectView(R.id.type) protected Button typeButton;
@InjectView(R.id.date) protected Button dateButton;
@InjectView(R.id.tracking) protected EditText trackingEditText;
@InjectView(R.id.tweet) protected CheckBox tweetCheck;
@InjectView(R.id.tweet_box) protected LinearLayout tweetBox;
- private List<LogType> possibleLogTypes = new ArrayList<LogType>();
+ private List<LogType> possibleLogTypes = new ArrayList<>();
private ProgressDialog waitDialog = null;
private String guid = null;
private String geocode = null;
@@ -60,14 +58,14 @@ public class LogTrackableActivity extends AbstractLoggingActivity implements Dat
private int attempts = 0;
private Trackable trackable;
- private Handler showProgressHandler = new Handler() {
+ private final Handler showProgressHandler = new Handler() {
@Override
- public void handleMessage(Message msg) {
+ public void handleMessage(final Message msg) {
showProgress(true);
}
};
- private Handler loadDataHandler = new Handler() {
+ private final Handler loadDataHandler = new Handler() {
@Override
public void handleMessage(final Message msg) {
@@ -89,9 +87,7 @@ public class LogTrackableActivity extends AbstractLoggingActivity implements Dat
}
gettingViewstate = false; // we're done, user can post log
-
- buttonPost.setEnabled(true);
- buttonPost.setOnClickListener(new PostListener());
+ setLoggingEnabled(true);
showProgress(false);
}
@@ -116,7 +112,7 @@ public class LogTrackableActivity extends AbstractLoggingActivity implements Dat
};
@Override
- public void onCreate(Bundle savedInstanceState) {
+ public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState, R.layout.logtrackable_activity);
ButterKnife.inject(this);
@@ -151,14 +147,14 @@ public class LogTrackableActivity extends AbstractLoggingActivity implements Dat
}
@Override
- public void onConfigurationChanged(Configuration newConfig) {
+ public void onConfigurationChanged(final Configuration newConfig) {
super.onConfigurationChanged(newConfig);
init();
}
@Override
- public void onCreateContextMenu(ContextMenu menu, View view, ContextMenu.ContextMenuInfo info) {
+ public void onCreateContextMenu(final ContextMenu menu, final View view, final ContextMenu.ContextMenuInfo info) {
super.onCreateContextMenu(menu, view, info);
final int viewId = view.getId();
@@ -170,7 +166,7 @@ public class LogTrackableActivity extends AbstractLoggingActivity implements Dat
}
@Override
- public boolean onContextItemSelected(MenuItem item) {
+ public boolean onContextItemSelected(final MenuItem item) {
final int group = item.getGroupId();
final int id = item.getItemId();
@@ -187,7 +183,7 @@ public class LogTrackableActivity extends AbstractLoggingActivity implements Dat
registerForContextMenu(typeButton);
typeButton.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View view) {
+ public void onClick(final View view) {
openContextMenu(view);
}
});
@@ -203,26 +199,22 @@ public class LogTrackableActivity extends AbstractLoggingActivity implements Dat
}
if (GCLogin.isEmpty(viewstates)) {
- buttonPost.setEnabled(false);
- buttonPost.setOnTouchListener(null);
- buttonPost.setOnClickListener(null);
-
+ setLoggingEnabled(false);
new LoadDataThread().start();
} else {
- buttonPost.setEnabled(true);
- buttonPost.setOnClickListener(new PostListener());
+ setLoggingEnabled(true);
}
disableSuggestions(trackingEditText);
}
@Override
- public void setDate(Calendar dateIn) {
+ public void setDate(final Calendar dateIn) {
date = dateIn;
dateButton.setText(Formatter.formatShortDateVerbally(date.getTime().getTime()));
}
- public void setType(LogType type) {
+ public void setType(final LogType type) {
typeSelected = type;
typeButton.setText(typeSelected.getL10n());
}
@@ -239,31 +231,10 @@ public class LogTrackableActivity extends AbstractLoggingActivity implements Dat
private class DateListener implements View.OnClickListener {
@Override
- public void onClick(View arg0) {
- final Dialog dateDialog = new DateDialog(LogTrackableActivity.this, LogTrackableActivity.this, date);
+ public void onClick(final View arg0) {
+ final DateDialog dateDialog = DateDialog.getInstance(date);
dateDialog.setCancelable(true);
- dateDialog.show();
- }
- }
-
- private class PostListener implements View.OnClickListener {
-
- protected EditText logEditText = (EditText) findViewById(R.id.log);
-
- @Override
- public void onClick(View arg0) {
- if (!gettingViewstate) {
- waitDialog = ProgressDialog.show(LogTrackableActivity.this, null, res.getString(R.string.log_saving), true);
- waitDialog.setCancelable(true);
-
- Settings.setTrackableAction(typeSelected.id);
-
- final String tracking = trackingEditText.getText().toString();
- final String log = logEditText.getText().toString();
- new PostLogThread(postLogHandler, tracking, log).start();
- } else {
- showToast(res.getString(R.string.err_log_load_data_still));
- }
+ dateDialog.show(getSupportFragmentManager(),"date_dialog");
}
}
@@ -303,7 +274,7 @@ public class LogTrackableActivity extends AbstractLoggingActivity implements Dat
possibleLogTypes.clear();
possibleLogTypes.addAll(typesPre);
}
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("LogTrackableActivity.LoadDataThread.run", e);
}
@@ -330,7 +301,7 @@ public class LogTrackableActivity extends AbstractLoggingActivity implements Dat
}
}
- public StatusCode postLogFn(String tracking, String log) {
+ public StatusCode postLogFn(final String tracking, final String log) {
try {
final StatusCode status = GCParser.postLogTrackable(guid, tracking, viewstates, typeSelected, date.get(Calendar.YEAR), (date.get(Calendar.MONTH) + 1), date.get(Calendar.DATE), log);
@@ -341,7 +312,7 @@ public class LogTrackableActivity extends AbstractLoggingActivity implements Dat
}
return status;
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("LogTrackableActivity.postLogFn", e);
}
@@ -360,4 +331,34 @@ public class LogTrackableActivity extends AbstractLoggingActivity implements Dat
protected LogContext getLogContext() {
return new LogContext(trackable, null);
}
+
+ @Override
+ public boolean onOptionsItemSelected(final MenuItem item) {
+ switch (item.getItemId()) {
+ case R.id.menu_send:
+ sendLog();
+ return true;
+ default:
+ break;
+ }
+
+ return super.onOptionsItemSelected(item);
+ }
+
+ private void sendLog() {
+ if (!gettingViewstate) {
+ waitDialog = ProgressDialog.show(this, null, res.getString(R.string.log_saving), true);
+ waitDialog.setCancelable(true);
+
+ Settings.setTrackableAction(typeSelected.id);
+
+ final EditText logEditText = (EditText) findViewById(R.id.log);
+ final String tracking = trackingEditText.getText().toString();
+ final String log = logEditText.getText().toString();
+ new PostLogThread(postLogHandler, tracking, log).start();
+ } else {
+ showToast(res.getString(R.string.err_log_load_data_still));
+ }
+ }
+
}
diff --git a/main/src/cgeo/geocaching/MainActivity.java b/main/src/cgeo/geocaching/MainActivity.java
index 42dd58d..2d6e9f0 100644
--- a/main/src/cgeo/geocaching/MainActivity.java
+++ b/main/src/cgeo/geocaching/MainActivity.java
@@ -3,9 +3,11 @@ package cgeo.geocaching;
import butterknife.ButterKnife;
import butterknife.InjectView;
-import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.AbstractActionBarActivity;
import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.connector.capability.ILogin;
+import cgeo.geocaching.connector.gc.GCConnector;
+import cgeo.geocaching.connector.gc.GCLogin;
import cgeo.geocaching.enumerations.CacheType;
import cgeo.geocaching.enumerations.StatusCode;
import cgeo.geocaching.geopoint.Geopoint;
@@ -17,26 +19,30 @@ import cgeo.geocaching.sensors.GeoDirHandler;
import cgeo.geocaching.sensors.IGeoData;
import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.settings.SettingsActivity;
-import cgeo.geocaching.ui.Formatter;
import cgeo.geocaching.ui.dialog.Dialogs;
import cgeo.geocaching.utils.DatabaseBackupUtils;
+import cgeo.geocaching.utils.Formatter;
import cgeo.geocaching.utils.Log;
+import cgeo.geocaching.utils.RxUtils;
+import cgeo.geocaching.utils.TextUtils;
import cgeo.geocaching.utils.Version;
import com.google.zxing.integration.android.IntentIntegrator;
import com.google.zxing.integration.android.IntentResult;
+
import org.apache.commons.lang3.StringUtils;
+
import rx.Observable;
import rx.Observable.OnSubscribe;
import rx.Subscriber;
import rx.android.observables.AndroidObservable;
import rx.functions.Action1;
-import rx.schedulers.Schedulers;
import rx.subscriptions.Subscriptions;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.SearchManager;
+import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;
@@ -45,6 +51,8 @@ import android.location.Geocoder;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
+import android.support.v4.view.MenuItemCompat;
+import android.support.v7.widget.SearchView;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
@@ -61,7 +69,7 @@ import java.util.Comparator;
import java.util.List;
import java.util.Locale;
-public class MainActivity extends AbstractActivity {
+public class MainActivity extends AbstractActionBarActivity {
@InjectView(R.id.nav_satellites) protected TextView navSatellites;
@InjectView(R.id.filter_button_title)protected TextView filterTitle;
@InjectView(R.id.map) protected ImageView findOnMap;
@@ -86,24 +94,24 @@ public class MainActivity extends AbstractActivity {
private final UpdateLocation locationUpdater = new UpdateLocation();
- private Handler updateUserInfoHandler = new Handler() {
+ private final Handler updateUserInfoHandler = new Handler() {
@Override
public void handleMessage(final Message msg) {
// Get active connectors with login status
- ILogin[] loginConns = ConnectorFactory.getActiveLiveConnectors();
+ final ILogin[] loginConns = ConnectorFactory.getActiveLiveConnectors();
// Update UI
infoArea.removeAllViews();
- LayoutInflater inflater = getLayoutInflater();
+ final LayoutInflater inflater = getLayoutInflater();
- for (ILogin conn : loginConns) {
+ for (final ILogin conn : loginConns) {
- TextView connectorInfo = (TextView) inflater.inflate(R.layout.main_activity_connectorstatus, null);
+ final TextView connectorInfo = (TextView) inflater.inflate(R.layout.main_activity_connectorstatus, null);
infoArea.addView(connectorInfo);
- StringBuilder userInfo = new StringBuilder(conn.getName()).append(Formatter.SEPARATOR);
+ final StringBuilder userInfo = new StringBuilder(conn.getName()).append(Formatter.SEPARATOR);
if (conn.isLoggedIn()) {
userInfo.append(conn.getUserName());
if (conn.getCachesFound() >= 0) {
@@ -119,7 +127,7 @@ public class MainActivity extends AbstractActivity {
};
private static String formatAddress(final Address address) {
- final ArrayList<String> addressParts = new ArrayList<String>();
+ final ArrayList<String> addressParts = new ArrayList<>();
final String countryName = address.getCountryName();
if (countryName != null) {
@@ -167,9 +175,9 @@ public class MainActivity extends AbstractActivity {
}
- private SatellitesHandler satellitesHandler = new SatellitesHandler();
+ private final SatellitesHandler satellitesHandler = new SatellitesHandler();
- private Handler firstLoginHandler = new Handler() {
+ private final Handler firstLoginHandler = new Handler() {
@Override
public void handleMessage(final Message msg) {
@@ -179,7 +187,7 @@ public class MainActivity extends AbstractActivity {
if (reason != null && reason != StatusCode.NO_ERROR) { //LoginFailed
showToast(res.getString(reason == StatusCode.MAINTENANCE ? reason.getErrorString() : R.string.err_login_failed_toast));
}
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.w("MainActivity.firstLoginHander", e);
}
}
@@ -189,6 +197,10 @@ public class MainActivity extends AbstractActivity {
public void onCreate(final Bundle savedInstanceState) {
// don't call the super implementation with the layout argument, as that would set the wrong theme
super.onCreate(savedInstanceState);
+
+ // Disable the up navigation for this activity
+ getSupportActionBar().setDisplayHomeAsUpEnabled(false);
+
setContentView(R.layout.main_activity);
ButterKnife.inject(this);
@@ -204,6 +216,8 @@ public class MainActivity extends AbstractActivity {
Log.i("Starting " + getPackageName() + ' ' + version + " a.k.a " + Version.getVersionName(this));
init();
+
+ checkShowChangelog();
}
@Override
@@ -231,6 +245,10 @@ public class MainActivity extends AbstractActivity {
new Thread() {
@Override
public void run() {
+ if (mustLogin && conn == GCConnector.getInstance()) {
+ // Properly log out from geocaching.com
+ GCLogin.getInstance().logout();
+ }
conn.login(firstLoginHandler, MainActivity.this);
updateUserInfoHandler.sendEmptyMessage(-1);
}
@@ -262,6 +280,11 @@ public class MainActivity extends AbstractActivity {
@Override
public boolean onCreateOptionsMenu(final Menu menu) {
getMenuInflater().inflate(R.menu.main_activity_options, menu);
+ final SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
+ final MenuItem searchItem = menu.findItem(R.id.menu_gosearch);
+ final SearchView searchView = (SearchView) MenuItemCompat.getActionView(searchItem);
+ searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));
+
return true;
}
@@ -276,6 +299,10 @@ public class MainActivity extends AbstractActivity {
public boolean onOptionsItemSelected(final MenuItem item) {
final int id = item.getItemId();
switch (id) {
+ case android.R.id.home:
+ // this activity must handle the home navigation different than all others
+ showAbout(null);
+ return true;
case R.id.menu_about:
showAbout(null);
return true;
@@ -303,13 +330,12 @@ public class MainActivity extends AbstractActivity {
}
});
return true;
- default:
- return super.onOptionsItemSelected(item);
}
+ return super.onOptionsItemSelected(item);
}
private void startScannerApplication() {
- IntentIntegrator integrator = new IntentIntegrator(this);
+ final IntentIntegrator integrator = new IntentIntegrator(this);
// integrator dialog is English only, therefore localize it
integrator.setButtonYesByID(android.R.string.yes);
integrator.setButtonNoByID(android.R.string.no);
@@ -320,9 +346,9 @@ public class MainActivity extends AbstractActivity {
@Override
public void onActivityResult(final int requestCode, final int resultCode, final Intent intent) {
- IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
+ final IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
if (scanResult != null) {
- String scan = scanResult.getContents();
+ final String scan = scanResult.getContents();
if (StringUtils.isBlank(scan)) {
return;
}
@@ -425,7 +451,7 @@ public class MainActivity extends AbstractActivity {
}
protected void selectGlobalTypeFilter() {
- final List<CacheType> cacheTypes = new ArrayList<CacheType>();
+ final List<CacheType> cacheTypes = new ArrayList<>();
//first add the most used types
cacheTypes.add(CacheType.ALL);
@@ -434,7 +460,7 @@ public class MainActivity extends AbstractActivity {
cacheTypes.add(CacheType.MYSTERY);
// then add all other cache types sorted alphabetically
- List<CacheType> sorted = new ArrayList<CacheType>();
+ final List<CacheType> sorted = new ArrayList<>();
sorted.addAll(Arrays.asList(CacheType.values()));
sorted.removeAll(cacheTypes);
@@ -453,18 +479,18 @@ public class MainActivity extends AbstractActivity {
checkedItem = 0;
}
- String[] items = new String[cacheTypes.size()];
+ final String[] items = new String[cacheTypes.size()];
for (int i = 0; i < cacheTypes.size(); i++) {
items[i] = cacheTypes.get(i).getL10n();
}
- Builder builder = new AlertDialog.Builder(this);
+ final Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.menu_filter);
builder.setSingleChoiceItems(items, checkedItem, new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int position) {
- CacheType cacheType = cacheTypes.get(position);
+ final CacheType cacheType = cacheTypes.get(position);
Settings.setCacheType(cacheType);
setFilterTitle();
dialog.dismiss();
@@ -524,7 +550,7 @@ public class MainActivity extends AbstractActivity {
navType.setText(res.getString(geo.getLocationProvider().resourceId));
if (geo.getAccuracy() >= 0) {
- int speed = Math.round(geo.getSpeed()) * 60 * 60 / 1000;
+ final int speed = Math.round(geo.getSpeed()) * 60 * 60 / 1000;
navAccuracy.setText("±" + Units.getDistanceFromMeters(geo.getAccuracy()) + Formatter.SEPARATOR + Units.getSpeed(speed));
} else {
navAccuracy.setText(null);
@@ -553,12 +579,13 @@ public class MainActivity extends AbstractActivity {
}
});
AndroidObservable.bindActivity(MainActivity.this, address.onErrorResumeNext(Observable.from(geo.getCoords().toString())))
+ .subscribeOn(RxUtils.networkScheduler)
.subscribe(new Action1<String>() {
@Override
public void call(final String address) {
navLocation.setText(address);
}
- }, Schedulers.io());
+ });
}
} else {
navLocation.setText(geo.getCoords().toString());
@@ -633,7 +660,7 @@ public class MainActivity extends AbstractActivity {
}
private class CountBubbleUpdateThread extends Thread {
- private Handler countBubbleHandler = new Handler() {
+ private final Handler countBubbleHandler = new Handler() {
@Override
public void handleMessage(final Message msg) {
@@ -645,7 +672,7 @@ public class MainActivity extends AbstractActivity {
countBubble.bringToFront();
countBubble.setVisibility(View.VISIBLE);
}
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.w("MainActivity.countBubbleHander", e);
}
}
@@ -662,7 +689,7 @@ public class MainActivity extends AbstractActivity {
try {
sleep(500);
checks++;
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("MainActivity.CountBubbleUpdateThread.run", e);
}
@@ -705,20 +732,21 @@ public class MainActivity extends AbstractActivity {
}
}
- /**
- * @param view
- * unused here but needed since this method is referenced from XML layout
- */
- public void showAbout(final View view) {
- startActivity(new Intent(this, AboutActivity.class));
+ private void checkShowChangelog() {
+ final long lastChecksum = Settings.getLastChangelogChecksum();
+ final long checksum = TextUtils.checksum(getString(R.string.changelog_master) + getString(R.string.changelog_release));
+ Settings.setLastChangelogChecksum(checksum);
+ // don't show change log after new install...
+ if (lastChecksum > 0 && lastChecksum != checksum) {
+ AboutActivity.showChangeLog(this);
+ }
}
/**
* @param view
* unused here but needed since this method is referenced from XML layout
*/
- public void goSearch(final View view) {
- onSearchRequested();
+ public void showAbout(final View view) {
+ startActivity(new Intent(this, AboutActivity.class));
}
-
}
diff --git a/main/src/cgeo/geocaching/NavigateAnyPointActivity.java b/main/src/cgeo/geocaching/NavigateAnyPointActivity.java
index 0a750e0..48e0c17 100644
--- a/main/src/cgeo/geocaching/NavigateAnyPointActivity.java
+++ b/main/src/cgeo/geocaching/NavigateAnyPointActivity.java
@@ -4,7 +4,7 @@ import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.Optional;
-import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.AbstractActionBarActivity;
import cgeo.geocaching.apps.cache.navi.NavigationAppFactory;
import cgeo.geocaching.geopoint.DistanceParser;
import cgeo.geocaching.geopoint.Geopoint;
@@ -13,9 +13,9 @@ import cgeo.geocaching.sensors.GeoDirHandler;
import cgeo.geocaching.sensors.IGeoData;
import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.AbstractViewHolder;
-import cgeo.geocaching.ui.Formatter;
import cgeo.geocaching.ui.dialog.CoordinatesInputDialog;
import cgeo.geocaching.ui.dialog.Dialogs;
+import cgeo.geocaching.utils.Formatter;
import cgeo.geocaching.utils.Log;
import org.apache.commons.lang3.StringUtils;
@@ -44,7 +44,7 @@ import android.widget.TextView;
import java.util.List;
-public class NavigateAnyPointActivity extends AbstractActivity {
+public class NavigateAnyPointActivity extends AbstractActionBarActivity implements CoordinatesInputDialog.CoordinateUpdate {
@InjectView(R.id.historyList) protected ListView historyListView;
@@ -74,7 +74,7 @@ public class NavigateAnyPointActivity extends AbstractActivity {
@InjectView(R.id.simple_way_point_latitude) protected TextView latitude;
@InjectView(R.id.date) protected TextView date;
- public ViewHolder(View rowView) {
+ public ViewHolder(final View rowView) {
super(rowView);
}
}
@@ -82,8 +82,8 @@ public class NavigateAnyPointActivity extends AbstractActivity {
private static class DestinationHistoryAdapter extends ArrayAdapter<Destination> {
private LayoutInflater inflater = null;
- public DestinationHistoryAdapter(Context context,
- List<Destination> objects) {
+ public DestinationHistoryAdapter(final Context context,
+ final List<Destination> objects) {
super(context, 0, objects);
}
@@ -93,7 +93,7 @@ public class NavigateAnyPointActivity extends AbstractActivity {
ViewHolder viewHolder;
if (rowView == null) {
- rowView = getInflater().inflate(R.layout.simple_way_point, null);
+ rowView = getInflater().inflate(R.layout.simple_way_point, parent, false);
viewHolder = new ViewHolder(rowView);
}
else {
@@ -105,9 +105,9 @@ public class NavigateAnyPointActivity extends AbstractActivity {
return rowView;
}
- private static void fillViewHolder(ViewHolder viewHolder, Destination loc) {
- String lonString = loc.getCoords().format(GeopointFormatter.Format.LON_DECMINUTE);
- String latString = loc.getCoords().format(GeopointFormatter.Format.LAT_DECMINUTE);
+ private static void fillViewHolder(final ViewHolder viewHolder, final Destination loc) {
+ final String lonString = loc.getCoords().format(GeopointFormatter.Format.LON_DECMINUTE);
+ final String latString = loc.getCoords().format(GeopointFormatter.Format.LAT_DECMINUTE);
viewHolder.longitude.setText(lonString);
viewHolder.latitude.setText(latString);
@@ -124,7 +124,7 @@ public class NavigateAnyPointActivity extends AbstractActivity {
}
@Override
- public void onCreate(Bundle savedInstanceState) {
+ public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState, R.layout.navigateanypoint_activity);
ButterKnife.inject(this);
@@ -133,7 +133,7 @@ public class NavigateAnyPointActivity extends AbstractActivity {
}
private void createHistoryView() {
- final View pointControls = getLayoutInflater().inflate(R.layout.navigateanypoint_header, null);
+ final View pointControls = getLayoutInflater().inflate(R.layout.navigateanypoint_header, historyListView, false);
historyListView.addHeaderView(pointControls, null, false);
// inject a second time to also find the dynamically expanded views above
@@ -147,8 +147,8 @@ public class NavigateAnyPointActivity extends AbstractActivity {
historyListView.setOnItemClickListener(new OnItemClickListener() {
@Override
- public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
- long arg3) {
+ public void onItemClick(final AdapterView<?> arg0, final View arg1, final int arg2,
+ final long arg3) {
final Object selection = arg0.getItemAtPosition(arg2);
if (selection instanceof Destination) {
navigateTo(((Destination) selection).getCoords());
@@ -158,8 +158,8 @@ public class NavigateAnyPointActivity extends AbstractActivity {
historyListView.setOnCreateContextMenuListener(new OnCreateContextMenuListener() {
@Override
- public void onCreateContextMenu(ContextMenu menu, View v,
- ContextMenuInfo menuInfo) {
+ public void onCreateContextMenu(final ContextMenu menu, final View v,
+ final ContextMenuInfo menuInfo) {
menu.add(Menu.NONE, CONTEXT_MENU_NAVIGATE, Menu.NONE, res.getString(R.string.cache_menu_navigate));
menu.add(Menu.NONE, CONTEXT_MENU_EDIT_WAYPOINT, Menu.NONE, R.string.waypoint_edit);
menu.add(Menu.NONE, CONTEXT_MENU_DELETE_WAYPOINT, Menu.NONE, R.string.waypoint_delete);
@@ -168,10 +168,10 @@ public class NavigateAnyPointActivity extends AbstractActivity {
}
@Override
- public boolean onContextItemSelected(MenuItem item) {
- AdapterView.AdapterContextMenuInfo menuInfo = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo();
+ public boolean onContextItemSelected(final MenuItem item) {
+ final AdapterView.AdapterContextMenuInfo menuInfo = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo();
final int position = (null != menuInfo) ? menuInfo.position : contextMenuItemPosition;
- Object destination = historyListView.getItemAtPosition(position);
+ final Object destination = historyListView.getItemAtPosition(position);
switch (item.getItemId()) {
case CONTEXT_MENU_NAVIGATE:
@@ -203,7 +203,7 @@ public class NavigateAnyPointActivity extends AbstractActivity {
private TextView getEmptyHistoryFooter() {
if (historyFooter == null) {
- historyFooter = (TextView) getLayoutInflater().inflate(R.layout.cacheslist_footer, null);
+ historyFooter = (TextView) getLayoutInflater().inflate(R.layout.cacheslist_footer, historyListView, false);
historyFooter.setText(R.string.search_history_empty);
}
return historyFooter;
@@ -226,7 +226,7 @@ public class NavigateAnyPointActivity extends AbstractActivity {
}
@Override
- public void onConfigurationChanged(Configuration newConfig) {
+ public void onConfigurationChanged(final Configuration newConfig) {
super.onConfigurationChanged(newConfig);
init();
@@ -273,63 +273,62 @@ public class NavigateAnyPointActivity extends AbstractActivity {
private class CoordDialogListener implements View.OnClickListener {
@Override
- public void onClick(View arg0) {
+ public void onClick(final View arg0) {
Geopoint gp = null;
if (latButton.getText().length() > 0 && lonButton.getText().length() > 0) {
gp = new Geopoint(latButton.getText().toString() + " " + lonButton.getText().toString());
}
- CoordinatesInputDialog coordsDialog = new CoordinatesInputDialog(NavigateAnyPointActivity.this, null, gp, app.currentGeo());
+ final CoordinatesInputDialog coordsDialog = CoordinatesInputDialog.getInstance(null, gp, app.currentGeo());
coordsDialog.setCancelable(true);
- coordsDialog.setOnCoordinateUpdate(new CoordinatesInputDialog.CoordinateUpdate() {
- @Override
- public void update(Geopoint gp) {
- latButton.setText(gp.format(GeopointFormatter.Format.LAT_DECMINUTE));
- lonButton.setText(gp.format(GeopointFormatter.Format.LON_DECMINUTE));
- changed = true;
- }
- });
- coordsDialog.show();
+ coordsDialog.show(getSupportFragmentManager(),"wpedit_dialog");
}
+
+ }
+ @Override
+ public void updateCoordinates(final Geopoint gp) {
+ latButton.setText(gp.format(GeopointFormatter.Format.LAT_DECMINUTE));
+ lonButton.setText(gp.format(GeopointFormatter.Format.LON_DECMINUTE));
+ changed = true;
}
private static class ChangeDistanceUnit implements OnItemSelectedListener {
- private ChangeDistanceUnit(NavigateAnyPointActivity unitView) {
+ private ChangeDistanceUnit(final NavigateAnyPointActivity unitView) {
this.unitView = unitView;
}
- private NavigateAnyPointActivity unitView;
+ private final NavigateAnyPointActivity unitView;
@Override
- public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,
- long arg3) {
+ public void onItemSelected(final AdapterView<?> arg0, final View arg1, final int arg2,
+ final long arg3) {
unitView.distanceUnit = (String) arg0.getItemAtPosition(arg2);
}
@Override
- public void onNothingSelected(AdapterView<?> arg0) {
+ public void onNothingSelected(final AdapterView<?> arg0) {
}
}
@Override
- public boolean onCreateOptionsMenu(Menu menu) {
+ public boolean onCreateOptionsMenu(final Menu menu) {
getMenuInflater().inflate(R.menu.navigate_any_point_activity_options, menu);
menu.findItem(R.id.menu_default_navigation).setTitle(NavigationAppFactory.getDefaultNavigationApplication().getName());
return true;
}
@Override
- public boolean onPrepareOptionsMenu(Menu menu) {
+ public boolean onPrepareOptionsMenu(final Menu menu) {
super.onPrepareOptionsMenu(menu);
try {
- boolean visible = getDestination() != null;
+ final boolean visible = getDestination() != null;
menu.findItem(R.id.menu_navigate).setVisible(visible);
menu.findItem(R.id.menu_default_navigation).setVisible(visible);
menu.findItem(R.id.menu_caches_around).setVisible(visible);
- menu.findItem(R.id.menu_clear_history).setEnabled(!getHistoryOfSearchedLocations().isEmpty());
- } catch (RuntimeException e) {
+ menu.findItem(R.id.menu_clear_history).setVisible(!getHistoryOfSearchedLocations().isEmpty());
+ } catch (final RuntimeException e) {
// nothing
}
@@ -337,7 +336,7 @@ public class NavigateAnyPointActivity extends AbstractActivity {
}
@Override
- public boolean onOptionsItemSelected(MenuItem item) {
+ public boolean onOptionsItemSelected(final MenuItem item) {
final int menuItem = item.getItemId();
final Geopoint coords = getDestination();
@@ -362,9 +361,8 @@ public class NavigateAnyPointActivity extends AbstractActivity {
case R.id.menu_navigate:
NavigationAppFactory.showNavigationMenu(this, null, null, coords);
return true;
- default:
- return false;
}
+ return super.onOptionsItemSelected(item);
}
private void addToHistory(final Geopoint coords) {
@@ -389,7 +387,7 @@ public class NavigateAnyPointActivity extends AbstractActivity {
}
}
- private void removeFromHistory(Destination destination) {
+ private void removeFromHistory(final Destination destination) {
if (getHistoryOfSearchedLocations().contains(destination)) {
getHistoryOfSearchedLocations().remove(destination);
@@ -429,7 +427,7 @@ public class NavigateAnyPointActivity extends AbstractActivity {
navigateTo(getDestination());
}
- private void navigateTo(Geopoint geopoint) {
+ private void navigateTo(final Geopoint geopoint) {
NavigationAppFactory.startDefaultNavigationApplication(1, this, geopoint);
}
@@ -461,7 +459,7 @@ public class NavigateAnyPointActivity extends AbstractActivity {
private class CurrentListener implements View.OnClickListener {
@Override
- public void onClick(View arg0) {
+ public void onClick(final View arg0) {
final Geopoint coords = app.currentGeo().getCoords();
if (coords == null) {
showToast(res.getString(R.string.err_point_unknown_position));
@@ -476,11 +474,11 @@ public class NavigateAnyPointActivity extends AbstractActivity {
}
private Geopoint getDestination() {
- String bearingText = bearingEditText.getText().toString();
+ final String bearingText = bearingEditText.getText().toString();
// combine distance from EditText and distanceUnit saved from Spinner
- String distanceText = distanceEditText.getText().toString() + distanceUnit;
- String latText = latButton.getText().toString();
- String lonText = lonButton.getText().toString();
+ final String distanceText = distanceEditText.getText().toString() + distanceUnit;
+ final String latText = latButton.getText().toString();
+ final String lonText = lonButton.getText().toString();
if (StringUtils.isBlank(bearingText) && StringUtils.isBlank(distanceText)
&& StringUtils.isBlank(latText) && StringUtils.isBlank(lonText)) {
@@ -493,7 +491,7 @@ public class NavigateAnyPointActivity extends AbstractActivity {
if (StringUtils.isNotBlank(latText) && StringUtils.isNotBlank(lonText)) {
try {
coords = new Geopoint(latText, lonText);
- } catch (Geopoint.ParseException e) {
+ } catch (final Geopoint.ParseException e) {
showToast(res.getString(e.resource));
return null;
}
@@ -512,7 +510,7 @@ public class NavigateAnyPointActivity extends AbstractActivity {
double bearing;
try {
bearing = Double.parseDouble(bearingText);
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
Dialogs.message(this, R.string.err_point_bear_and_dist_title, R.string.err_point_bear_and_dist);
return null;
}
@@ -521,7 +519,7 @@ public class NavigateAnyPointActivity extends AbstractActivity {
try {
distance = DistanceParser.parseDistance(distanceText,
!Settings.isUseImperialUnits());
- } catch (NumberFormatException e) {
+ } catch (final NumberFormatException e) {
showToast(res.getString(R.string.err_parse_dist));
return null;
}
diff --git a/main/src/cgeo/geocaching/PocketQueryList.java b/main/src/cgeo/geocaching/PocketQueryList.java
index 2ac137f..21f306e 100644
--- a/main/src/cgeo/geocaching/PocketQueryList.java
+++ b/main/src/cgeo/geocaching/PocketQueryList.java
@@ -2,14 +2,15 @@ package cgeo.geocaching;
import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.connector.gc.GCParser;
+import cgeo.geocaching.utils.RxUtils;
import org.apache.commons.collections4.CollectionUtils;
+
import rx.Observable;
import rx.Observable.OnSubscribe;
import rx.Subscriber;
import rx.android.observables.AndroidObservable;
import rx.functions.Action1;
-import rx.schedulers.Schedulers;
import android.app.Activity;
import android.app.AlertDialog;
@@ -52,13 +53,13 @@ public final class PocketQueryList {
subscriber.onNext(GCParser.searchPocketQueryList());
subscriber.onCompleted();
}
- })).subscribe(new Action1<List<PocketQueryList>>() {
+ })).subscribeOn(RxUtils.networkScheduler).subscribe(new Action1<List<PocketQueryList>>() {
@Override
public void call(final List<PocketQueryList> pocketQueryLists) {
waitDialog.dismiss();
selectFromPocketQueries(activity, pocketQueryLists, runAfterwards);
}
- }, Schedulers.io());
+ });
}
private static void selectFromPocketQueries(final Activity activity, final List<PocketQueryList> pocketQueryList, final Action1<PocketQueryList> runAfterwards) {
if (CollectionUtils.isEmpty(pocketQueryList)) {
diff --git a/main/src/cgeo/geocaching/SearchActivity.java b/main/src/cgeo/geocaching/SearchActivity.java
index 2a37e27..81dec98 100644
--- a/main/src/cgeo/geocaching/SearchActivity.java
+++ b/main/src/cgeo/geocaching/SearchActivity.java
@@ -3,7 +3,7 @@ package cgeo.geocaching;
import butterknife.ButterKnife;
import butterknife.InjectView;
-import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.AbstractActionBarActivity;
import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.connector.IConnector;
import cgeo.geocaching.connector.capability.ISearchByGeocode;
@@ -37,7 +37,7 @@ import android.widget.Button;
import java.util.Locale;
-public class SearchActivity extends AbstractActivity {
+public class SearchActivity extends AbstractActionBarActivity implements CoordinatesInputDialog.CoordinateUpdate {
@InjectView(R.id.buttonLatitude) protected Button buttonLatitude;
@InjectView(R.id.buttonLongitude) protected Button buttonLongitude;
@@ -174,8 +174,20 @@ public class SearchActivity extends AbstractActivity {
}
private void init() {
- buttonLatitude.setOnClickListener(new FindByCoordsAction());
- buttonLongitude.setOnClickListener(new FindByCoordsAction());
+ buttonLatitude.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ updateCoordinates();
+ }
+ });
+ buttonLongitude.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ updateCoordinates();
+ }
+ });
buttonSearchCoords.setOnClickListener(new View.OnClickListener() {
@@ -277,21 +289,16 @@ public class SearchActivity extends AbstractActivity {
}
}
- private class FindByCoordsAction implements OnClickListener {
-
- @Override
- public void onClick(final View arg0) {
- final CoordinatesInputDialog coordsDialog = new CoordinatesInputDialog(SearchActivity.this, null, null, app.currentGeo());
- coordsDialog.setCancelable(true);
- coordsDialog.setOnCoordinateUpdate(new CoordinatesInputDialog.CoordinateUpdate() {
- @Override
- public void update(final Geopoint gp) {
- buttonLatitude.setText(gp.format(GeopointFormatter.Format.LAT_DECMINUTE));
- buttonLongitude.setText(gp.format(GeopointFormatter.Format.LON_DECMINUTE));
- }
- });
- coordsDialog.show();
- }
+ private void updateCoordinates() {
+ final CoordinatesInputDialog coordsDialog = CoordinatesInputDialog.getInstance(null, null, app.currentGeo());
+ coordsDialog.setCancelable(true);
+ coordsDialog.show(getSupportFragmentManager(), "wpedit_dialog");
+ }
+
+ @Override
+ public void updateCoordinates(final Geopoint gp) {
+ buttonLatitude.setText(gp.format(GeopointFormatter.Format.LAT_DECMINUTE));
+ buttonLongitude.setText(gp.format(GeopointFormatter.Format.LON_DECMINUTE));
}
private void findByCoordsFn() {
diff --git a/main/src/cgeo/geocaching/SearchResult.java b/main/src/cgeo/geocaching/SearchResult.java
index 12a2522..74cc59d 100644
--- a/main/src/cgeo/geocaching/SearchResult.java
+++ b/main/src/cgeo/geocaching/SearchResult.java
@@ -8,14 +8,16 @@ import cgeo.geocaching.enumerations.LoadFlags.LoadFlag;
import cgeo.geocaching.enumerations.LoadFlags.SaveFlag;
import cgeo.geocaching.enumerations.StatusCode;
import cgeo.geocaching.gcvote.GCVote;
+import cgeo.geocaching.utils.RxUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
+import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
+
import rx.Observable;
import rx.functions.Func1;
import rx.functions.Func2;
-import rx.schedulers.Schedulers;
import android.os.Parcel;
import android.os.Parcelable;
@@ -60,13 +62,21 @@ public class SearchResult implements Parcelable {
}
/**
+ * Build a new empty search result with an error status.
+ */
+ public SearchResult(final StatusCode statusCode) {
+ this();
+ error = statusCode;
+ }
+
+ /**
* Copy a search result, for example to apply different filters on it.
*
* @param searchResult the original search result, which cannot be null
*/
public SearchResult(final SearchResult searchResult) {
- geocodes = new HashSet<String>(searchResult.geocodes);
- filteredGeocodes = new HashSet<String>(searchResult.filteredGeocodes);
+ geocodes = new HashSet<>(searchResult.geocodes);
+ filteredGeocodes = new HashSet<>(searchResult.filteredGeocodes);
error = searchResult.error;
url = searchResult.url;
viewstates = searchResult.viewstates;
@@ -83,9 +93,9 @@ public class SearchResult implements Parcelable {
* from a web page)
*/
public SearchResult(final Collection<String> geocodes, final int totalCountGC) {
- this.geocodes = new HashSet<String>(geocodes.size());
+ this.geocodes = new HashSet<>(geocodes.size());
this.geocodes.addAll(geocodes);
- this.filteredGeocodes = new HashSet<String>();
+ this.filteredGeocodes = new HashSet<>();
this.setTotalCountGC(totalCountGC);
}
@@ -99,12 +109,12 @@ public class SearchResult implements Parcelable {
}
public SearchResult(final Parcel in) {
- final ArrayList<String> list = new ArrayList<String>();
+ final ArrayList<String> list = new ArrayList<>();
in.readStringList(list);
- geocodes = new HashSet<String>(list);
- final ArrayList<String> filteredList = new ArrayList<String>();
+ geocodes = new HashSet<>(list);
+ final ArrayList<String> filteredList = new ArrayList<>();
in.readStringList(filteredList);
- filteredGeocodes = new HashSet<String>(filteredList);
+ filteredGeocodes = new HashSet<>(filteredList);
error = (StatusCode) in.readSerializable();
url = in.readString();
final int length = in.readInt();
@@ -155,6 +165,7 @@ public class SearchResult implements Parcelable {
return 0;
}
+ @NonNull
public Set<String> getGeocodes() {
return Collections.unmodifiableSet(geocodes);
}
@@ -213,12 +224,12 @@ public class SearchResult implements Parcelable {
SearchResult result = new SearchResult(this);
result.geocodes.clear();
- final ArrayList<Geocache> includedCaches = new ArrayList<Geocache>();
+ final ArrayList<Geocache> includedCaches = new ArrayList<>();
final Set<Geocache> caches = DataStore.loadCaches(geocodes, LoadFlags.LOAD_CACHE_OR_DB);
int excluded = 0;
for (Geocache cache : caches) {
// Is there any reason to exclude the cache from the list?
- final boolean excludeCache = (excludeDisabled && cache.isDisabled()) ||
+ final boolean excludeCache = (excludeDisabled && (cache.isDisabled() || cache.isArchived())) ||
(excludeMine && (cache.isOwner() || cache.isFound())) ||
(!cacheType.contains(cache));
if (excludeCache) {
@@ -261,7 +272,7 @@ public class SearchResult implements Parcelable {
for (Geocache geocache : caches) {
addGeocode(geocache.getGeocode());
}
- DataStore.saveCaches(caches, EnumSet.of(SaveFlag.SAVE_CACHE));
+ DataStore.saveCaches(caches, EnumSet.of(SaveFlag.CACHE));
}
public boolean isEmpty() {
@@ -313,13 +324,13 @@ public class SearchResult implements Parcelable {
}
});
}
- }, Schedulers.io()).reduce(new SearchResult(), new Func2<SearchResult, SearchResult, SearchResult>() {
+ }, RxUtils.networkScheduler).reduce(new SearchResult(), new Func2<SearchResult, SearchResult, SearchResult>() {
@Override
public SearchResult call(final SearchResult searchResult, final SearchResult searchResult2) {
searchResult.addSearchResult(searchResult2);
return searchResult;
}
- }).toBlockingObservable().first();
+ }).toBlocking().first();
}
}
diff --git a/main/src/cgeo/geocaching/SelectMapfileActivity.java b/main/src/cgeo/geocaching/SelectMapfileActivity.java
index c617012..dc898d7 100644
--- a/main/src/cgeo/geocaching/SelectMapfileActivity.java
+++ b/main/src/cgeo/geocaching/SelectMapfileActivity.java
@@ -83,7 +83,7 @@ public class SelectMapfileActivity extends AbstractFileListActivity<FileSelectio
@Override
protected List<File> getBaseFolders() {
- List<File> folders = new ArrayList<File>();
+ List<File> folders = new ArrayList<>();
for (File dir : LocalStorage.getStorages()) {
folders.add(new File(dir, "mfmaps"));
folders.add(new File(new File(dir, "Locus"), "mapsVector"));
@@ -115,8 +115,7 @@ public class SelectMapfileActivity extends AbstractFileListActivity<FileSelectio
}
if (requestCode == REQUEST_DIRECTORY) {
- final String directory = new File(data.getData().getPath()).getAbsolutePath();
- mapFile = directory;
+ mapFile = new File(data.getData().getPath()).getAbsolutePath();
close();
}
}
diff --git a/main/src/cgeo/geocaching/StaticMapsActivity.java b/main/src/cgeo/geocaching/StaticMapsActivity.java
index 16fce37..ceceab9 100644
--- a/main/src/cgeo/geocaching/StaticMapsActivity.java
+++ b/main/src/cgeo/geocaching/StaticMapsActivity.java
@@ -1,8 +1,9 @@
package cgeo.geocaching;
-import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.AbstractActionBarActivity;
import cgeo.geocaching.enumerations.LoadFlags;
import cgeo.geocaching.utils.Log;
+import cgeo.geocaching.utils.RxUtils;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.Extra;
@@ -11,7 +12,6 @@ import org.androidannotations.annotations.OptionsMenu;
import org.apache.commons.collections4.CollectionUtils;
import android.app.ProgressDialog;
-import android.content.Context;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.Handler;
@@ -25,7 +25,7 @@ import java.util.List;
@EActivity
@OptionsMenu(R.menu.static_maps_activity_options)
-public class StaticMapsActivity extends AbstractActivity {
+public class StaticMapsActivity extends AbstractActionBarActivity {
private static final String EXTRAS_WAYPOINT = "waypoint";
private static final String EXTRAS_DOWNLOAD = "download";
@@ -35,7 +35,7 @@ public class StaticMapsActivity extends AbstractActivity {
@Extra(EXTRAS_WAYPOINT) Integer waypointId = null;
@Extra(EXTRAS_GEOCODE) String geocode = null;
- private final List<Bitmap> maps = new ArrayList<Bitmap>();
+ private final List<Bitmap> maps = new ArrayList<>();
private LayoutInflater inflater = null;
private ProgressDialog waitDialog = null;
private LinearLayout smapsView = null;
@@ -62,7 +62,7 @@ public class StaticMapsActivity extends AbstractActivity {
} else {
showStaticMaps();
}
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("StaticMapsActivity.loadMapsHandler", e);
}
}
@@ -83,7 +83,7 @@ public class StaticMapsActivity extends AbstractActivity {
for (final Bitmap image : maps) {
if (image != null) {
- final ImageView map = (ImageView) inflater.inflate(R.layout.staticmaps_activity_item, null);
+ final ImageView map = (ImageView) inflater.inflate(R.layout.staticmaps_activity_item, smapsView, false);
map.setImageBitmap(image);
smapsView.addView(map);
}
@@ -127,7 +127,7 @@ public class StaticMapsActivity extends AbstractActivity {
maps.add(image);
}
}
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("StaticMapsActivity.LoadMapsThread.run", e);
}
}
@@ -137,7 +137,7 @@ public class StaticMapsActivity extends AbstractActivity {
}
loadMapsHandler.sendMessage(Message.obtain());
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("StaticMapsActivity.LoadMapsThread.run", e);
}
}
@@ -153,7 +153,7 @@ public class StaticMapsActivity extends AbstractActivity {
final Geocache cache = DataStore.loadCache(geocode, LoadFlags.LOAD_CACHE_OR_DB);
if (waypointId == null) {
showToast(res.getString(R.string.info_storing_static_maps));
- StaticMapsProvider.storeCacheStaticMap(cache, true);
+ RxUtils.waitForCompletion(StaticMapsProvider.storeCacheStaticMap(cache));
return cache.hasStaticMap();
}
final Waypoint waypoint = cache.getWaypointById(waypointId);
@@ -161,18 +161,10 @@ public class StaticMapsActivity extends AbstractActivity {
showToast(res.getString(R.string.info_storing_static_maps));
// refresh always removes old waypoint files
StaticMapsProvider.removeWpStaticMaps(waypoint, geocode);
- StaticMapsProvider.storeWaypointStaticMap(cache, waypoint, true);
+ RxUtils.waitForCompletion(StaticMapsProvider.storeWaypointStaticMap(cache, waypoint));
return StaticMapsProvider.hasStaticMapForWaypoint(geocode, waypoint);
}
showToast(res.getString(R.string.err_detail_not_load_map_static));
return false;
}
-
- public static void startActivity(final Context activity, final String geocode, final boolean download, final Waypoint waypoint) {
- StaticMapsActivity_.IntentBuilder_ builder = StaticMapsActivity_.intent(activity).geocode(geocode).download(download);
- if (waypoint != null) {
- builder.waypointId(waypoint.getId());
- }
- builder.start();
- }
} \ No newline at end of file
diff --git a/main/src/cgeo/geocaching/StaticMapsProvider.java b/main/src/cgeo/geocaching/StaticMapsProvider.java
index eaab159..030c379 100644
--- a/main/src/cgeo/geocaching/StaticMapsProvider.java
+++ b/main/src/cgeo/geocaching/StaticMapsProvider.java
@@ -1,7 +1,6 @@
package cgeo.geocaching;
import cgeo.geocaching.compatibility.Compatibility;
-import cgeo.geocaching.concurrent.BlockingThreadPool;
import cgeo.geocaching.files.LocalStorage;
import cgeo.geocaching.geopoint.GeopointFormatter.Format;
import cgeo.geocaching.network.Network;
@@ -9,22 +8,30 @@ import cgeo.geocaching.network.Parameters;
import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.utils.FileUtils;
import cgeo.geocaching.utils.Log;
+import cgeo.geocaching.utils.RxUtils;
import ch.boye.httpclientandroidlib.HttpResponse;
+
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jdt.annotation.NonNull;
+import rx.Observable;
+import rx.functions.Action0;
+import rx.util.async.Async;
+
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Point;
import java.io.File;
-import java.util.concurrent.TimeUnit;
+import java.util.LinkedList;
+import java.util.List;
public final class StaticMapsProvider {
static final int MAPS_LEVEL_MAX = 5;
private static final String PREFIX_PREVIEW = "preview";
private static final String GOOGLE_STATICMAP_URL = "http://maps.google.com/maps/api/staticmap";
+ private static final int GOOGLE_MAX_ZOOM = 20;
private static final String SATELLITE = "satellite";
private static final String ROADMAP = "roadmap";
private static final String WAYPOINT_PREFIX = "wp";
@@ -34,9 +41,6 @@ public final class StaticMapsProvider {
/** We assume there is no real usable image with less than 1k. */
private static final int MIN_MAP_IMAGE_BYTES = 1000;
- /** ThreadPool restricting this to 1 Thread. **/
- private static final BlockingThreadPool POOL = new BlockingThreadPool(1, Thread.MIN_PRIORITY);
-
/**
* max size in free API version: https://developers.google.com/maps/documentation/staticmaps/#Imagesizes
*/
@@ -50,69 +54,85 @@ public final class StaticMapsProvider {
return LocalStorage.getStorageFile(geocode, MAP_FILENAME_PREFIX + prefix, false, createDirs);
}
- private static void downloadDifferentZooms(final String geocode, final String markerUrl, final String prefix, final String latlonMap, final int edge, final Parameters waypoints) {
- downloadMap(geocode, 20, SATELLITE, markerUrl, prefix + '1', "", latlonMap, edge, edge, waypoints);
- downloadMap(geocode, 18, SATELLITE, markerUrl, prefix + '2', "", latlonMap, edge, edge, waypoints);
- downloadMap(geocode, 16, ROADMAP, markerUrl, prefix + '3', "", latlonMap, edge, edge, waypoints);
- downloadMap(geocode, 14, ROADMAP, markerUrl, prefix + '4', "", latlonMap, edge, edge, waypoints);
- downloadMap(geocode, 11, ROADMAP, markerUrl, prefix + '5', "", latlonMap, edge, edge, waypoints);
+ private static Observable<String> downloadDifferentZooms(final String geocode, final String markerUrl, final String prefix, final String latlonMap, final int width, final int height, final Parameters waypoints) {
+ return Observable.merge(downloadMap(geocode, 20, SATELLITE, markerUrl, prefix + '1', "", latlonMap, width, height, waypoints),
+ downloadMap(geocode, 18, SATELLITE, markerUrl, prefix + '2', "", latlonMap, width, height, waypoints),
+ downloadMap(geocode, 16, ROADMAP, markerUrl, prefix + '3', "", latlonMap, width, height, waypoints),
+ downloadMap(geocode, 14, ROADMAP, markerUrl, prefix + '4', "", latlonMap, width, height, waypoints),
+ downloadMap(geocode, 11, ROADMAP, markerUrl, prefix + '5', "", latlonMap, width, height, waypoints));
}
- private static void downloadMap(final String geocode, final int zoom, final String mapType, final String markerUrl, final String prefix, final String shadow, final String latlonMap, final int width, final int height, final Parameters waypoints) {
- final Parameters params = new Parameters(
- "center", latlonMap,
- "zoom", String.valueOf(zoom),
- "size", String.valueOf(limitSize(width)) + 'x' + String.valueOf(limitSize(height)),
- "maptype", mapType,
- "markers", "icon:" + markerUrl + '|' + shadow + latlonMap,
- "sensor", "false");
- if (waypoints != null) {
- params.addAll(waypoints);
+ private static Observable<String> downloadMap(final String geocode, final int zoom, final String mapType, final String markerUrl, final String prefix, final String shadow, final String latlonMap, final int width, final int height, final Parameters waypoints) {
+ int scale = 1;
+ if (width > GOOGLE_MAPS_MAX_SIZE) {
+ scale = 2;
}
- final HttpResponse httpResponse = Network.getRequest(GOOGLE_STATICMAP_URL, params);
+ final float aspectRatio = width / (float) height;
+ final int requestWidth = Math.min(width / scale, GOOGLE_MAPS_MAX_SIZE);
+ final int requestHeight = (aspectRatio > 1) ? Math.round(requestWidth / aspectRatio) : requestWidth;
+ final int requestScale = scale;
+ final int requestZoom = Math.min((scale == 2) ? zoom + 1 : zoom, GOOGLE_MAX_ZOOM);
+ return Async.fromAction(new Action0() {
+ @Override
+ public void call() {
+ final Parameters params = new Parameters(
+ "center", latlonMap,
+ "zoom", String.valueOf(requestZoom),
+ "size", String.valueOf(requestWidth) + 'x' + String.valueOf(requestHeight),
+ "scale", String.valueOf(requestScale),
+ "maptype", mapType,
+ "markers", "icon:" + markerUrl + '|' + shadow + latlonMap,
+ "sensor", "false");
+ if (waypoints != null) {
+ params.addAll(waypoints);
+ }
+ final HttpResponse httpResponse = Network.getRequest(GOOGLE_STATICMAP_URL, params);
- if (httpResponse == null) {
- Log.e("StaticMapsProvider.downloadMap: httpResponse is null");
- return;
- }
- if (httpResponse.getStatusLine().getStatusCode() != 200) {
- Log.d("StaticMapsProvider.downloadMap: httpResponseCode = " + httpResponse.getStatusLine().getStatusCode());
- return;
- }
- final File file = getMapFile(geocode, prefix, true);
- if (LocalStorage.saveEntityToFile(httpResponse, file)) {
- // Delete image if it has no contents
- final long fileSize = file.length();
- if (fileSize < MIN_MAP_IMAGE_BYTES) {
- FileUtils.deleteIgnoringFailure(file);
+ if (httpResponse == null) {
+ Log.e("StaticMapsProvider.downloadMap: httpResponse is null");
+ return;
+ }
+ if (httpResponse.getStatusLine().getStatusCode() != 200) {
+ Log.d("StaticMapsProvider.downloadMap: httpResponseCode = " + httpResponse.getStatusLine().getStatusCode());
+ return;
+ }
+ final File file = getMapFile(geocode, prefix, true);
+ if (LocalStorage.saveEntityToFile(httpResponse, file)) {
+ // Delete image if it has no contents
+ final long fileSize = file.length();
+ if (fileSize < MIN_MAP_IMAGE_BYTES) {
+ FileUtils.deleteIgnoringFailure(file);
+ }
+ }
}
- }
+ }, prefix, RxUtils.networkScheduler);
}
- private static int limitSize(final int imageSize) {
- return Math.min(imageSize, GOOGLE_MAPS_MAX_SIZE);
- }
-
- public static void downloadMaps(final Geocache cache) {
+ public static Observable<String> downloadMaps(final Geocache cache) {
if ((!Settings.isStoreOfflineMaps() && !Settings.isStoreOfflineWpMaps()) || StringUtils.isBlank(cache.getGeocode())) {
- return;
+ return Observable.empty();
}
- int edge = guessMaxDisplaySide();
+ // TODO Check if this is also OK, was width -25
+ final Point displaySize = Compatibility.getDisplaySize();
+
+ final List<Observable<String>> downloaders = new LinkedList<>();
if (Settings.isStoreOfflineMaps() && cache.getCoords() != null) {
- storeCachePreviewMap(cache);
- storeCacheStaticMap(cache, edge, false);
+ downloaders.add(storeCachePreviewMap(cache));
+ downloaders.add(storeCacheStaticMap(cache, displaySize.x, displaySize.y));
}
// clean old and download static maps for waypoints if one is missing
if (Settings.isStoreOfflineWpMaps()) {
for (final Waypoint waypoint : cache.getWaypoints()) {
if (!hasAllStaticMapsForWaypoint(cache.getGeocode(), waypoint)) {
- refreshAllWpStaticMaps(cache, edge);
+ downloaders.add(refreshAllWpStaticMaps(cache, displaySize.x, displaySize.y));
}
}
}
+
+ return Observable.merge(downloaders);
}
/**
@@ -123,44 +143,49 @@ public final class StaticMapsProvider {
* @param edge
* The boundings
*/
- private static void refreshAllWpStaticMaps(final Geocache cache, final int edge) {
+ private static Observable<String> refreshAllWpStaticMaps(final Geocache cache, final int width, final int height) {
LocalStorage.deleteFilesWithPrefix(cache.getGeocode(), MAP_FILENAME_PREFIX + WAYPOINT_PREFIX);
- for (Waypoint waypoint : cache.getWaypoints()) {
- storeWaypointStaticMap(cache.getGeocode(), edge, waypoint, false);
+ final List<Observable<String>> downloaders = new LinkedList<>();
+ for (final Waypoint waypoint : cache.getWaypoints()) {
+ downloaders.add(storeWaypointStaticMap(cache.getGeocode(), width, height, waypoint));
}
+ return Observable.merge(downloaders);
}
- public static void storeWaypointStaticMap(final Geocache cache, final Waypoint waypoint, final boolean waitForResult) {
- int edge = StaticMapsProvider.guessMaxDisplaySide();
- storeWaypointStaticMap(cache.getGeocode(), edge, waypoint, waitForResult);
+ public static Observable<String> storeWaypointStaticMap(final Geocache cache, final Waypoint waypoint) {
+ // TODO Check if this is also OK, was width -25
+ final Point displaySize = Compatibility.getDisplaySize();
+ return storeWaypointStaticMap(cache.getGeocode(), displaySize.x, displaySize.y, waypoint);
}
- private static void storeWaypointStaticMap(final String geocode, final int edge, final Waypoint waypoint, final boolean waitForResult) {
+ private static Observable<String> storeWaypointStaticMap(final String geocode, final int width, final int height, final Waypoint waypoint) {
if (geocode == null) {
Log.e("storeWaypointStaticMap - missing input parameter geocode");
- return;
+ return Observable.empty();
}
if (waypoint == null) {
Log.e("storeWaypointStaticMap - missing input parameter waypoint");
- return;
+ return Observable.empty();
}
if (waypoint.getCoords() == null) {
- return;
+ return Observable.empty();
}
- String wpLatlonMap = waypoint.getCoords().format(Format.LAT_LON_DECDEGREE_COMMA);
- String wpMarkerUrl = getWpMarkerUrl(waypoint);
+ final String wpLatlonMap = waypoint.getCoords().format(Format.LAT_LON_DECDEGREE_COMMA);
+ final String wpMarkerUrl = getWpMarkerUrl(waypoint);
if (!hasAllStaticMapsForWaypoint(geocode, waypoint)) {
// download map images in separate background thread for higher performance
- downloadMaps(geocode, wpMarkerUrl, WAYPOINT_PREFIX + waypoint.getId() + '_' + waypoint.getStaticMapsHashcode() + "_", wpLatlonMap, edge, null, waitForResult);
+ return downloadMaps(geocode, wpMarkerUrl, WAYPOINT_PREFIX + waypoint.getId() + '_' + waypoint.getStaticMapsHashcode() + "_", wpLatlonMap, width, height, null);
}
+ return Observable.empty();
}
- public static void storeCacheStaticMap(final Geocache cache, final boolean waitForResult) {
- int edge = guessMaxDisplaySide();
- storeCacheStaticMap(cache, edge, waitForResult);
+ public static Observable<String> storeCacheStaticMap(final Geocache cache) {
+ // TODO Check if this is also OK, was width -25
+ final Point displaySize = Compatibility.getDisplaySize();
+ return storeCacheStaticMap(cache, displaySize.x, displaySize.y);
}
- private static void storeCacheStaticMap(final Geocache cache, final int edge, final boolean waitForResult) {
+ private static Observable<String> storeCacheStaticMap(final Geocache cache, final int width, final int height) {
final String latlonMap = cache.getCoords().format(Format.LAT_LON_DECDEGREE_COMMA);
final Parameters waypoints = new Parameters();
for (final Waypoint waypoint : cache.getWaypoints()) {
@@ -172,48 +197,29 @@ public final class StaticMapsProvider {
}
// download map images in separate background thread for higher performance
final String cacheMarkerUrl = getCacheMarkerUrl(cache);
- downloadMaps(cache.getGeocode(), cacheMarkerUrl, "", latlonMap, edge, waypoints, waitForResult);
+ return downloadMaps(cache.getGeocode(), cacheMarkerUrl, "", latlonMap, width, height, waypoints);
}
- public static void storeCachePreviewMap(final Geocache cache) {
+ public static Observable<String> storeCachePreviewMap(final Geocache cache) {
final String latlonMap = cache.getCoords().format(Format.LAT_LON_DECDEGREE_COMMA);
final Point displaySize = Compatibility.getDisplaySize();
final int minSize = Math.min(displaySize.x, displaySize.y);
final String markerUrl = MARKERS_URL + "my_location_mdpi.png";
- downloadMap(cache.getGeocode(), 15, ROADMAP, markerUrl, PREFIX_PREVIEW, "shadow:false|", latlonMap, minSize, minSize, null);
- }
-
- private static int guessMaxDisplaySide() {
- Point displaySize = Compatibility.getDisplaySize();
- return Math.max(displaySize.x, displaySize.y) - 25;
+ return downloadMap(cache.getGeocode(), 15, ROADMAP, markerUrl, PREFIX_PREVIEW, "shadow:false|", latlonMap, minSize, minSize, null);
}
- private static void downloadMaps(final String geocode, final String markerUrl, final String prefix, final String latlonMap, final int edge,
- final Parameters waypoints, final boolean waitForResult) {
- if (waitForResult) {
- downloadDifferentZooms(geocode, markerUrl, prefix, latlonMap, edge, waypoints);
- }
- else {
- final Runnable currentTask = new Runnable() {
- @Override
- public void run() {
- downloadDifferentZooms(geocode, markerUrl, prefix, latlonMap, edge, waypoints);
- }
- };
- try {
- POOL.add(currentTask, 20, TimeUnit.SECONDS);
- } catch (InterruptedException e) {
- Log.e("StaticMapsProvider.downloadMaps error adding task", e);
- }
- }
+ private static Observable<String> downloadMaps(final String geocode, final String markerUrl, final String prefix,
+ final String latlonMap, final int width, final int height,
+ final Parameters waypoints) {
+ return downloadDifferentZooms(geocode, markerUrl, prefix, latlonMap, width, height, waypoints);
}
private static String getCacheMarkerUrl(final Geocache cache) {
- StringBuilder url = new StringBuilder(MARKERS_URL);
+ final StringBuilder url = new StringBuilder(MARKERS_URL);
url.append("marker_cache_").append(cache.getType().id);
if (cache.isFound()) {
url.append("_found");
- } else if (cache.isDisabled()) {
+ } else if (cache.isDisabled() || cache.isArchived()) {
url.append("_disabled");
}
url.append(".png");
@@ -221,7 +227,7 @@ public final class StaticMapsProvider {
}
private static String getWpMarkerUrl(final Waypoint waypoint) {
- String type = waypoint.getWaypointType() != null ? waypoint.getWaypointType().id : null;
+ final String type = waypoint.getWaypointType() != null ? waypoint.getWaypointType().id : null;
return MARKERS_URL + "marker_waypoint_" + type + ".png";
}
@@ -229,8 +235,8 @@ public final class StaticMapsProvider {
if (waypoint == null) {
return;
}
- int waypointId = waypoint.getId();
- int waypointMapHash = waypoint.getStaticMapsHashcode();
+ final int waypointId = waypoint.getId();
+ final int waypointMapHash = waypoint.getStaticMapsHashcode();
for (int level = 1; level <= MAPS_LEVEL_MAX; level++) {
final File mapFile = StaticMapsProvider.getMapFile(geocode, WAYPOINT_PREFIX + waypointId + "_" + waypointMapHash + '_' + level, false);
if (!FileUtils.delete(mapFile)) {
@@ -251,7 +257,7 @@ public final class StaticMapsProvider {
return false;
}
for (int level = 1; level <= MAPS_LEVEL_MAX; level++) {
- File mapFile = StaticMapsProvider.getMapFile(geocode, String.valueOf(level), false);
+ final File mapFile = StaticMapsProvider.getMapFile(geocode, String.valueOf(level), false);
if (mapFile.exists()) {
return true;
}
@@ -267,10 +273,10 @@ public final class StaticMapsProvider {
* @return <code>true</code> if at least one map file exists; <code>false</code> otherwise
*/
public static boolean hasStaticMapForWaypoint(final String geocode, final Waypoint waypoint) {
- int waypointId = waypoint.getId();
- int waypointMapHash = waypoint.getStaticMapsHashcode();
+ final int waypointId = waypoint.getId();
+ final int waypointMapHash = waypoint.getStaticMapsHashcode();
for (int level = 1; level <= MAPS_LEVEL_MAX; level++) {
- File mapFile = StaticMapsProvider.getMapFile(geocode, WAYPOINT_PREFIX + waypointId + "_" + waypointMapHash + "_" + level, false);
+ final File mapFile = StaticMapsProvider.getMapFile(geocode, WAYPOINT_PREFIX + waypointId + "_" + waypointMapHash + "_" + level, false);
if (mapFile.exists()) {
return true;
}
@@ -286,11 +292,11 @@ public final class StaticMapsProvider {
* @return <code>true</code> if all map files exist; <code>false</code> otherwise
*/
public static boolean hasAllStaticMapsForWaypoint(final String geocode, final Waypoint waypoint) {
- int waypointId = waypoint.getId();
- int waypointMapHash = waypoint.getStaticMapsHashcode();
+ final int waypointId = waypoint.getId();
+ final int waypointMapHash = waypoint.getStaticMapsHashcode();
for (int level = 1; level <= MAPS_LEVEL_MAX; level++) {
- File mapFile = StaticMapsProvider.getMapFile(geocode, WAYPOINT_PREFIX + waypointId + "_" + waypointMapHash + "_" + level, false);
- boolean mapExists = mapFile.exists();
+ final File mapFile = StaticMapsProvider.getMapFile(geocode, WAYPOINT_PREFIX + waypointId + "_" + waypointMapHash + "_" + level, false);
+ final boolean mapExists = mapFile.exists();
if (!mapExists) {
return false;
}
@@ -303,8 +309,8 @@ public final class StaticMapsProvider {
}
public static Bitmap getWaypointMap(final String geocode, final Waypoint waypoint, final int level) {
- int waypointId = waypoint.getId();
- int waypointMapHash = waypoint.getStaticMapsHashcode();
+ final int waypointId = waypoint.getId();
+ final int waypointMapHash = waypoint.getStaticMapsHashcode();
return decodeFile(StaticMapsProvider.getMapFile(geocode, WAYPOINT_PREFIX + waypointId + "_" + waypointMapHash + "_" + level, false));
}
diff --git a/main/src/cgeo/geocaching/StatusFragment.java b/main/src/cgeo/geocaching/StatusFragment.java
index f8552d7..a228363 100644
--- a/main/src/cgeo/geocaching/StatusFragment.java
+++ b/main/src/cgeo/geocaching/StatusFragment.java
@@ -1,5 +1,7 @@
package cgeo.geocaching;
+import butterknife.ButterKnife;
+
import cgeo.geocaching.network.StatusUpdater;
import cgeo.geocaching.network.StatusUpdater.Status;
import cgeo.geocaching.utils.Log;
@@ -8,6 +10,7 @@ import rx.Subscription;
import rx.android.observables.AndroidObservable;
import rx.functions.Action1;
import rx.schedulers.Schedulers;
+import rx.subscriptions.Subscriptions;
import android.content.Intent;
import android.content.res.Resources;
@@ -23,15 +26,16 @@ import android.widget.TextView;
public class StatusFragment extends Fragment {
- private Subscription statusSubscription;
+ private Subscription statusSubscription = Subscriptions.empty();
@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
final ViewGroup statusGroup = (ViewGroup) inflater.inflate(R.layout.status, container, false);
- final ImageView statusIcon = (ImageView) statusGroup.findViewById(R.id.status_icon);
- final TextView statusMessage = (TextView) statusGroup.findViewById(R.id.status_message);
- statusSubscription = AndroidObservable.bindFragment(this, StatusUpdater.latestStatus).subscribe(new Action1<Status>() {
+ final ImageView statusIcon = ButterKnife.findById(statusGroup, R.id.status_icon);
+ final TextView statusMessage = ButterKnife.findById(statusGroup, R.id.status_message);
+ statusSubscription = AndroidObservable.bindFragment(this, StatusUpdater.latestStatus).subscribeOn(Schedulers.io())
+ .subscribe(new Action1<Status>() {
@Override
public void call(final Status status) {
if (status == null) {
@@ -77,7 +81,7 @@ public class StatusFragment extends Fragment {
statusGroup.setClickable(false);
}
}
- }, Schedulers.io());
+ });
return statusGroup;
}
diff --git a/main/src/cgeo/geocaching/Trackable.java b/main/src/cgeo/geocaching/Trackable.java
index d532cda..9c2b044 100644
--- a/main/src/cgeo/geocaching/Trackable.java
+++ b/main/src/cgeo/geocaching/Trackable.java
@@ -35,7 +35,7 @@ public class Trackable implements ILogable {
private String goal = null;
private String details = null;
private String image = null;
- private List<LogEntry> logs = new ArrayList<LogEntry>();
+ private List<LogEntry> logs = new ArrayList<>();
private String trackingcode = null;
public String getUrl() {
@@ -215,7 +215,7 @@ public class Trackable implements ILogable {
}
static public List<LogType> getPossibleLogTypes() {
- final List<LogType> logTypes = new ArrayList<LogType>();
+ final List<LogType> logTypes = new ArrayList<>();
logTypes.add(LogType.RETRIEVED_IT);
logTypes.add(LogType.GRABBED_IT);
logTypes.add(LogType.NOTE);
diff --git a/main/src/cgeo/geocaching/TrackableActivity.java b/main/src/cgeo/geocaching/TrackableActivity.java
index 81d23c9..0586f7c 100644
--- a/main/src/cgeo/geocaching/TrackableActivity.java
+++ b/main/src/cgeo/geocaching/TrackableActivity.java
@@ -14,10 +14,10 @@ import cgeo.geocaching.network.HtmlImage;
import cgeo.geocaching.ui.AbstractCachingPageViewCreator;
import cgeo.geocaching.ui.AnchorAwareLinkMovementMethod;
import cgeo.geocaching.ui.CacheDetailsCreator;
-import cgeo.geocaching.ui.Formatter;
import cgeo.geocaching.ui.UserActionsClickListener;
import cgeo.geocaching.ui.UserNameClickListener;
import cgeo.geocaching.ui.logs.TrackableLogsViewCreator;
+import cgeo.geocaching.utils.Formatter;
import cgeo.geocaching.utils.HtmlUtils;
import cgeo.geocaching.utils.Log;
import cgeo.geocaching.utils.UnknownTagsHandler;
@@ -25,6 +25,7 @@ import cgeo.geocaching.utils.UnknownTagsHandler;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
+
import rx.android.observables.AndroidObservable;
import rx.android.observables.ViewObservable;
import rx.functions.Action1;
@@ -36,12 +37,16 @@ import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
+import android.support.v7.app.ActionBar;
+import android.support.v7.view.ActionMode;
import android.text.Html;
-import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.View.OnLongClickListener;
+import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ScrollView;
@@ -74,7 +79,7 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
private final Handler loadTrackableHandler = new Handler() {
@Override
- public void handleMessage(Message msg) {
+ public void handleMessage(final Message msg) {
if (trackable == null) {
if (waitDialog != null) {
waitDialog.dismiss();
@@ -110,13 +115,27 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
if (waitDialog != null) {
waitDialog.dismiss();
}
+
+ // if we have a newer Android device setup Android Beam for easy cache sharing
+ initializeAndroidBeam(
+ new ActivitySharingInterface() {
+ @Override
+ public String getUri() {
+ return trackable.getUrl();
+ }
+ }
+ );
}
};
private CharSequence clickedItemText = null;
+ /**
+ * Action mode of the current contextual action bar (e.g. for copy and share actions).
+ */
+ private ActionMode currentActionMode;
@Override
- public void onCreate(Bundle savedInstanceState) {
+ public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState, R.layout.viewpager_activity);
// set title in code, as the activity needs a hard coded title due to the intent filters
@@ -198,43 +217,13 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
}
@Override
- public void onCreateContextMenu(ContextMenu menu, View view, ContextMenu.ContextMenuInfo info) {
- super.onCreateContextMenu(menu, view, info);
- final int viewId = view.getId();
- assert view instanceof TextView;
- clickedItemText = ((TextView) view).getText();
- switch (viewId) {
- case R.id.value: // name, TB-code, origin, released, distance
- final String itemTitle = (String) ((TextView) ((View) view.getParent()).findViewById(R.id.name)).getText();
- buildDetailsContextMenu(menu, clickedItemText, itemTitle, true);
- break;
- case R.id.goal:
- buildDetailsContextMenu(menu, clickedItemText, res.getString(R.string.trackable_goal), false);
- break;
- case R.id.details:
- buildDetailsContextMenu(menu, clickedItemText, res.getString(R.string.trackable_details), false);
- break;
- case R.id.log:
- buildDetailsContextMenu(menu, clickedItemText, res.getString(R.string.cache_logs), false);
- break;
- default:
- break;
- }
- }
-
- @Override
- public boolean onContextItemSelected(MenuItem item) {
- return onClipboardItemSelected(item, clickedItemText) || onOptionsItemSelected(item);
- }
-
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
+ public boolean onCreateOptionsMenu(final Menu menu) {
getMenuInflater().inflate(R.menu.trackable_activity, menu);
return true;
}
@Override
- public boolean onOptionsItemSelected(MenuItem item) {
+ public boolean onOptionsItemSelected(final MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_log_touch:
LogTrackableActivity.startActivity(this, trackable);
@@ -242,16 +231,15 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
case R.id.menu_browser_trackable:
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(trackable.getUrl())));
return true;
- default:
- return false;
}
+ return super.onOptionsItemSelected(item);
}
@Override
- public boolean onPrepareOptionsMenu(Menu menu) {
+ public boolean onPrepareOptionsMenu(final Menu menu) {
if (trackable != null) {
- menu.findItem(R.id.menu_log_touch).setEnabled(StringUtils.isNotBlank(geocode) && trackable.isLoggable());
- menu.findItem(R.id.menu_browser_trackable).setEnabled(StringUtils.isNotBlank(trackable.getUrl()));
+ menu.findItem(R.id.menu_log_touch).setVisible(StringUtils.isNotBlank(geocode) && trackable.isLoggable());
+ menu.findItem(R.id.menu_browser_trackable).setVisible(StringUtils.isNotBlank(trackable.getUrl()));
}
return super.onPrepareOptionsMenu(menu);
}
@@ -262,7 +250,7 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
final private String guid;
final private String id;
- public LoadTrackableThread(Handler handlerIn, String geocodeIn, String guidIn, String idIn) {
+ public LoadTrackableThread(final Handler handlerIn, final String geocodeIn, final String guidIn, final String idIn) {
handler = handlerIn;
geocode = geocodeIn;
guid = guidIn;
@@ -272,19 +260,20 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
@Override
public void run() {
if (StringUtils.isNotEmpty(geocode)) {
- trackable = DataStore.loadTrackable(geocode);
-
- if (trackable == null || trackable.isLoggable()) {
- // iterate over the connectors as some codes may be handled by multiple connectors
- for (final TrackableConnector trackableConnector : ConnectorFactory.getTrackableConnectors()) {
- if (trackableConnector.canHandleTrackable(geocode)) {
- trackable = trackableConnector.searchTrackable(geocode, guid, id);
- if (trackable != null) {
- break;
- }
+
+ // iterate over the connectors as some codes may be handled by multiple connectors
+ for (final TrackableConnector trackableConnector : ConnectorFactory.getTrackableConnectors()) {
+ if (trackableConnector.canHandleTrackable(geocode)) {
+ trackable = trackableConnector.searchTrackable(geocode, guid, id);
+ if (trackable != null) {
+ break;
}
}
}
+ // Check local storage (offline case)
+ if (trackable == null) {
+ trackable = DataStore.loadTrackable(geocode);
+ }
}
// fall back to GC search by GUID
if (trackable == null) {
@@ -298,7 +287,7 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
final private String url;
final private Handler handler;
- public TrackableIconThread(String urlIn, Handler handlerIn) {
+ public TrackableIconThread(final String urlIn, final Handler handlerIn) {
url = urlIn;
handler = handlerIn;
}
@@ -322,18 +311,18 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
}
private static class TrackableIconHandler extends Handler {
- final private TextView view;
+ final private ActionBar view;
- public TrackableIconHandler(TextView viewIn) {
+ public TrackableIconHandler(final ActionBar viewIn) {
view = viewIn;
}
@Override
- public void handleMessage(Message message) {
+ public void handleMessage(final Message message) {
final BitmapDrawable image = (BitmapDrawable) message.obj;
if (image != null && view != null) {
image.setBounds(0, 0, view.getHeight(), view.getHeight());
- view.setCompoundDrawables(image, null, null, null);
+ view.setIcon(image);
}
}
}
@@ -348,7 +337,7 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
}
@Override
- protected PageViewCreator createViewCreator(Page page) {
+ protected PageViewCreator createViewCreator(final Page page) {
switch (page) {
case DETAILS:
return new DetailsViewCreator();
@@ -359,13 +348,13 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
}
@Override
- protected String getTitle(Page page) {
+ protected String getTitle(final Page page) {
return res.getString(page.resId);
}
@Override
protected Pair<List<? extends Page>, Integer> getOrderedPages() {
- final List<Page> pages = new ArrayList<TrackableActivity.Page>();
+ final List<Page> pages = new ArrayList<>();
pages.add(Page.DETAILS);
if (!trackable.getLogs().isEmpty()) {
pages.add(Page.LOGS);
@@ -384,21 +373,21 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
@InjectView(R.id.image) protected LinearLayout imageView;
@Override
- public ScrollView getDispatchedView() {
- view = (ScrollView) getLayoutInflater().inflate(R.layout.trackable_details_view, null);
+ public ScrollView getDispatchedView(final ViewGroup parentView) {
+ view = (ScrollView) getLayoutInflater().inflate(R.layout.trackable_details_view, parentView, false);
ButterKnife.inject(this, view);
final CacheDetailsCreator details = new CacheDetailsCreator(TrackableActivity.this, detailsList);
// action bar icon
if (StringUtils.isNotBlank(trackable.getIconUrl())) {
- final TrackableIconHandler iconHandler = new TrackableIconHandler(((TextView) findViewById(R.id.actionbar_title)));
+ final TrackableIconHandler iconHandler = new TrackableIconHandler(getSupportActionBar());
final TrackableIconThread iconThread = new TrackableIconThread(trackable.getIconUrl(), iconHandler);
iconThread.start();
}
// trackable name
- registerForContextMenu(details.add(R.string.trackable_name, StringUtils.isNotBlank(trackable.getName()) ? Html.fromHtml(trackable.getName()).toString() : res.getString(R.string.trackable_unknown)));
+ addContextMenu(details.add(R.string.trackable_name, StringUtils.isNotBlank(trackable.getName()) ? Html.fromHtml(trackable.getName()).toString() : res.getString(R.string.trackable_unknown)));
// trackable type
String tbType;
@@ -410,7 +399,7 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
details.add(R.string.trackable_type, tbType);
// trackable geocode
- registerForContextMenu(details.add(R.string.trackable_code, trackable.getGeocode()));
+ addContextMenu(details.add(R.string.trackable_code, trackable.getGeocode()));
// trackable owner
final TextView owner = details.add(R.string.trackable_owner, res.getString(R.string.trackable_unknown));
@@ -455,7 +444,7 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
if (Trackable.SPOTTED_CACHE == trackable.getSpottedType()) {
spotted.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View arg0) {
+ public void onClick(final View arg0) {
if (StringUtils.isNotBlank(trackable.getSpottedGuid())) {
CacheDetailActivity.startActivityGuid(TrackableActivity.this, trackable.getSpottedGuid(), trackable.getSpottedName());
}
@@ -479,41 +468,41 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
if (StringUtils.isNotBlank(trackable.getOrigin())) {
final TextView origin = details.add(R.string.trackable_origin, "");
origin.setText(Html.fromHtml(trackable.getOrigin()), TextView.BufferType.SPANNABLE);
- registerForContextMenu(origin);
+ addContextMenu(origin);
}
// trackable released
if (trackable.getReleased() != null) {
- registerForContextMenu(details.add(R.string.trackable_released, Formatter.formatDate(trackable.getReleased().getTime())));
+ addContextMenu(details.add(R.string.trackable_released, Formatter.formatDate(trackable.getReleased().getTime())));
}
// trackable distance
if (trackable.getDistance() >= 0) {
- registerForContextMenu(details.add(R.string.trackable_distance, Units.getDistanceFromKilometers(trackable.getDistance())));
+ addContextMenu(details.add(R.string.trackable_distance, Units.getDistanceFromKilometers(trackable.getDistance())));
}
// trackable goal
if (StringUtils.isNotBlank(HtmlUtils.extractText(trackable.getGoal()))) {
goalBox.setVisibility(View.VISIBLE);
goalTextView.setVisibility(View.VISIBLE);
- goalTextView.setText(Html.fromHtml(trackable.getGoal(), new HtmlImage(geocode, true, 0, false), null), TextView.BufferType.SPANNABLE);
+ goalTextView.setText(Html.fromHtml(trackable.getGoal(), new HtmlImage(geocode, true, 0, false, goalTextView), null), TextView.BufferType.SPANNABLE);
goalTextView.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
- registerForContextMenu(goalTextView);
+ addContextMenu(goalTextView);
}
// trackable details
if (StringUtils.isNotBlank(HtmlUtils.extractText(trackable.getDetails()))) {
detailsBox.setVisibility(View.VISIBLE);
detailsTextView.setVisibility(View.VISIBLE);
- detailsTextView.setText(Html.fromHtml(trackable.getDetails(), new HtmlImage(geocode, true, 0, false), new UnknownTagsHandler()), TextView.BufferType.SPANNABLE);
+ detailsTextView.setText(Html.fromHtml(trackable.getDetails(), new HtmlImage(geocode, true, 0, false, detailsTextView), new UnknownTagsHandler()), TextView.BufferType.SPANNABLE);
detailsTextView.setMovementMethod(AnchorAwareLinkMovementMethod.getInstance());
- registerForContextMenu(detailsTextView);
+ addContextMenu(detailsTextView);
}
// trackable image
if (StringUtils.isNotBlank(trackable.getImage())) {
imageBox.setVisibility(View.VISIBLE);
- final ImageView trackableImage = (ImageView) inflater.inflate(R.layout.trackable_image, null);
+ final ImageView trackableImage = (ImageView) inflater.inflate(R.layout.trackable_image, imageView, false);
trackableImage.setImageResource(R.drawable.image_not_loaded);
trackableImage.setClickable(true);
@@ -538,4 +527,70 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
}
+ public void addContextMenu(final View view) {
+ view.setOnLongClickListener(new OnLongClickListener() {
+
+ @Override
+ public boolean onLongClick(final View v) {
+ return startContextualActionBar(view);
+ }
+ });
+
+ view.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(final View v) {
+ startContextualActionBar(view);
+ }
+ });
+ }
+
+ private boolean startContextualActionBar(final View view) {
+ if (currentActionMode != null) {
+ return false;
+ }
+ currentActionMode = startSupportActionMode(new ActionMode.Callback() {
+
+ @Override
+ public boolean onPrepareActionMode(final ActionMode actionMode, final Menu menu) {
+ final int viewId = view.getId();
+ assert view instanceof TextView;
+ clickedItemText = ((TextView) view).getText();
+ switch (viewId) {
+ case R.id.value: // name, TB-code, origin, released, distance
+ final String itemTitle = (String) ((TextView) ((View) view.getParent()).findViewById(R.id.name)).getText();
+ buildDetailsContextMenu(actionMode, menu, clickedItemText, itemTitle, true);
+ return true;
+ case R.id.goal:
+ buildDetailsContextMenu(actionMode, menu, clickedItemText, res.getString(R.string.trackable_goal), false);
+ return true;
+ case R.id.details:
+ buildDetailsContextMenu(actionMode, menu, clickedItemText, res.getString(R.string.trackable_details), false);
+ return true;
+ case R.id.log:
+ buildDetailsContextMenu(actionMode, menu, clickedItemText, res.getString(R.string.cache_logs), false);
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void onDestroyActionMode(final ActionMode actionMode) {
+ currentActionMode = null;
+ }
+
+ @Override
+ public boolean onCreateActionMode(final ActionMode actionMode, final Menu menu) {
+ actionMode.getMenuInflater().inflate(R.menu.details_context, menu);
+ return true;
+ }
+
+ @Override
+ public boolean onActionItemClicked(final ActionMode actionMode, final MenuItem menuItem) {
+ return onClipboardItemSelected(actionMode, menuItem, clickedItemText);
+ }
+ });
+ return false;
+ }
+
}
diff --git a/main/src/cgeo/geocaching/UsefulAppsActivity.java b/main/src/cgeo/geocaching/UsefulAppsActivity.java
index 39c527d..a2cdaf7 100644
--- a/main/src/cgeo/geocaching/UsefulAppsActivity.java
+++ b/main/src/cgeo/geocaching/UsefulAppsActivity.java
@@ -3,7 +3,7 @@ package cgeo.geocaching;
import butterknife.ButterKnife;
import butterknife.InjectView;
-import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.AbstractActionBarActivity;
import cgeo.geocaching.ui.AbstractViewHolder;
import android.app.Activity;
@@ -18,7 +18,7 @@ import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
-public class UsefulAppsActivity extends AbstractActivity {
+public class UsefulAppsActivity extends AbstractActionBarActivity {
@InjectView(R.id.apps_list) protected ListView list;
@@ -27,7 +27,7 @@ public class UsefulAppsActivity extends AbstractActivity {
@InjectView(R.id.image) protected ImageView image;
@InjectView(R.id.description) protected TextView description;
- public ViewHolder(View rowView) {
+ public ViewHolder(final View rowView) {
super(rowView);
}
}
@@ -45,7 +45,7 @@ public class UsefulAppsActivity extends AbstractActivity {
this.packageName = packageName;
}
- private void installFromMarket(Activity activity) {
+ private void installFromMarket(final Activity activity) {
try {
// allow also opening pure http URLs in addition to market packages
final String url = (packageName.startsWith("http:")) ? packageName : "market://details?id=" + packageName;
@@ -53,7 +53,7 @@ public class UsefulAppsActivity extends AbstractActivity {
marketIntent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
activity.startActivity(marketIntent);
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
// market not available in standard emulator
}
}
@@ -72,17 +72,17 @@ public class UsefulAppsActivity extends AbstractActivity {
};
@Override
- public void onCreate(Bundle savedInstanceState) {
+ public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState, R.layout.usefulapps_activity);
ButterKnife.inject(this);
list.setAdapter(new ArrayAdapter<HelperApp>(this, R.layout.usefulapps_item, HELPER_APPS) {
@Override
- public View getView(int position, View convertView, android.view.ViewGroup parent) {
+ public View getView(final int position, final View convertView, final android.view.ViewGroup parent) {
View rowView = convertView;
if (null == rowView) {
- rowView = getLayoutInflater().inflate(R.layout.usefulapps_item, null);
+ rowView = getLayoutInflater().inflate(R.layout.usefulapps_item, parent, false);
}
ViewHolder holder = (ViewHolder) rowView.getTag();
if (null == holder) {
@@ -94,7 +94,7 @@ public class UsefulAppsActivity extends AbstractActivity {
return rowView;
}
- private void fillViewHolder(ViewHolder holder, HelperApp app) {
+ private void fillViewHolder(final ViewHolder holder, final HelperApp app) {
holder.title.setText(res.getString(app.titleId));
holder.image.setImageDrawable(res.getDrawable(app.iconId));
holder.description.setText(Html.fromHtml(res.getString(app.descriptionId)));
@@ -104,8 +104,8 @@ public class UsefulAppsActivity extends AbstractActivity {
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
- public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- HelperApp helperApp = HELPER_APPS[position];
+ public void onItemClick(final AdapterView<?> parent, final View view, final int position, final long id) {
+ final HelperApp helperApp = HELPER_APPS[position];
helperApp.installFromMarket(UsefulAppsActivity.this);
}
});
diff --git a/main/src/cgeo/geocaching/Waypoint.java b/main/src/cgeo/geocaching/Waypoint.java
index efedff5..7381aab 100644
--- a/main/src/cgeo/geocaching/Waypoint.java
+++ b/main/src/cgeo/geocaching/Waypoint.java
@@ -89,7 +89,7 @@ public class Waypoint implements IWaypoint {
public static void mergeWayPoints(final List<Waypoint> newPoints, final List<Waypoint> oldPoints, final boolean forceMerge) {
// Build a map of new waypoints for faster subsequent lookups
- final Map<String, Waypoint> newPrefixes = new HashMap<String, Waypoint>(newPoints.size());
+ final Map<String, Waypoint> newPrefixes = new HashMap<>(newPoints.size());
for (final Waypoint waypoint : newPoints) {
newPrefixes.put(waypoint.getPrefix(), waypoint);
}
@@ -122,22 +122,26 @@ public class Waypoint implements IWaypoint {
}
private int computeOrder() {
+ // first parking, then trailhead (as start of the journey)
+ // puzzles, stages, waypoints can all be mixed
+ // at last the final and the original coordinates of the final
switch (waypointType) {
case PARKING:
return -1;
case TRAILHEAD:
return 1;
- case STAGE: // puzzles and stages with same value
- return 2;
+ case STAGE:
case PUZZLE:
+ case WAYPOINT:
return 2;
case FINAL:
return 3;
- case OWN:
+ case ORIGINAL:
return 4;
- default:
- return 0;
+ case OWN:
+ return 5;
}
+ return 0;
}
private int order() {
@@ -151,13 +155,13 @@ public class Waypoint implements IWaypoint {
return prefix;
}
- public void setPrefix(String prefix) {
+ public void setPrefix(final String prefix) {
this.prefix = prefix;
cachedOrder = ORDER_UNDEFINED;
}
public String getUrl() {
- return "http://www.geocaching.com//seek/cache_details.aspx?wp=" + geocode;
+ return "http://www.geocaching.com/seek/cache_details.aspx?wp=" + geocode;
}
@Override
@@ -165,7 +169,7 @@ public class Waypoint implements IWaypoint {
return id;
}
- public void setId(int id) {
+ public void setId(final int id) {
this.id = id;
}
@@ -174,7 +178,7 @@ public class Waypoint implements IWaypoint {
return geocode;
}
- public void setGeocode(String geocode) {
+ public void setGeocode(final String geocode) {
this.geocode = StringUtils.upperCase(geocode);
}
@@ -187,7 +191,7 @@ public class Waypoint implements IWaypoint {
return lookup;
}
- public void setLookup(String lookup) {
+ public void setLookup(final String lookup) {
this.lookup = lookup;
}
@@ -196,7 +200,7 @@ public class Waypoint implements IWaypoint {
return name;
}
- public void setName(String name) {
+ public void setName(final String name) {
this.name = name;
}
@@ -204,7 +208,7 @@ public class Waypoint implements IWaypoint {
return latlon;
}
- public void setLatlon(String latlon) {
+ public void setLatlon(final String latlon) {
this.latlon = latlon;
}
@@ -213,7 +217,7 @@ public class Waypoint implements IWaypoint {
return coords;
}
- public void setCoords(Geopoint coords) {
+ public void setCoords(final Geopoint coords) {
this.coords = coords;
}
@@ -221,7 +225,7 @@ public class Waypoint implements IWaypoint {
return note;
}
- public void setNote(String note) {
+ public void setNote(final String note) {
this.note = note;
}
@@ -244,7 +248,7 @@ public class Waypoint implements IWaypoint {
return "waypoint";
}
- public void setVisited(boolean visited) {
+ public void setVisited(final boolean visited) {
this.visited = visited;
}
@@ -267,7 +271,7 @@ public class Waypoint implements IWaypoint {
public static final Comparator<? super Waypoint> WAYPOINT_COMPARATOR = new Comparator<Waypoint>() {
@Override
- public int compare(Waypoint left, Waypoint right) {
+ public int compare(final Waypoint left, final Waypoint right) {
return left.order() - right.order();
}
};
@@ -282,7 +286,7 @@ public class Waypoint implements IWaypoint {
String gpxId = prefix;
if (StringUtils.isNotBlank(geocode)) {
- Geocache cache = DataStore.loadCache(geocode, LoadFlags.LOAD_CACHE_OR_DB);
+ final Geocache cache = DataStore.loadCache(geocode, LoadFlags.LOAD_CACHE_OR_DB);
if (cache != null) {
gpxId = cache.getWaypointGpxId(prefix);
}
@@ -298,7 +302,7 @@ public class Waypoint implements IWaypoint {
* @return a collection of found waypoints
*/
public static Collection<Waypoint> parseWaypointsFromNote(@NonNull final String initialNote) {
- final List<Waypoint> waypoints = new LinkedList<Waypoint>();
+ final List<Waypoint> waypoints = new LinkedList<>();
final Pattern COORDPATTERN = Pattern.compile("\\b[nNsS]{1}\\s*\\d"); // begin of coordinates
String note = initialNote;
diff --git a/main/src/cgeo/geocaching/WaypointPopup.java b/main/src/cgeo/geocaching/WaypointPopup.java
index 916ad4c..f1ffc1d 100644
--- a/main/src/cgeo/geocaching/WaypointPopup.java
+++ b/main/src/cgeo/geocaching/WaypointPopup.java
@@ -1,115 +1,35 @@
package cgeo.geocaching;
-import butterknife.ButterKnife;
-import butterknife.InjectView;
-
-import cgeo.geocaching.apps.cache.navi.NavigationAppFactory;
-import cgeo.geocaching.geopoint.Geopoint;
-import cgeo.geocaching.geopoint.Units;
-import cgeo.geocaching.sensors.IGeoData;
-import cgeo.geocaching.ui.CacheDetailsCreator;
-import cgeo.geocaching.utils.Log;
-
-import org.apache.commons.lang3.StringUtils;
-
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.Button;
-import android.widget.LinearLayout;
-import android.widget.TextView;
+import android.support.v4.app.DialogFragment;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentTransaction;
+import android.view.Window;
-public class WaypointPopup extends AbstractPopupActivity {
- @InjectView(R.id.actionbar_title) protected TextView actionBarTitle;
- @InjectView(R.id.waypoint_details_list) protected LinearLayout waypointDetailsLayout;
- @InjectView(R.id.edit) protected Button buttonEdit;
- @InjectView(R.id.details_list) protected LinearLayout cacheDetailsLayout;
+import cgeo.geocaching.activity.AbstractActivity;
+import cgeo.geocaching.activity.ActivityMixin;
+public class WaypointPopup extends AbstractActivity {
private int waypointId = 0;
- private Waypoint waypoint = null;
- private TextView waypointDistance = null;
-
- public WaypointPopup() {
- super(R.layout.waypoint_popup);
- }
+ private String geocode;
@Override
- public void onCreate(final Bundle savedInstanceState) {
+ public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- ButterKnife.inject(this);
- // get parameters
- final Bundle extras = getIntent().getExtras();
- if (extras != null) {
- waypointId = extras.getInt(Intents.EXTRA_WAYPOINT_ID);
- }
- }
-
- @Override
- public void onUpdateGeoData(IGeoData geo) {
- if (geo.getCoords() != null && waypoint != null && waypoint.getCoords() != null) {
- waypointDistance.setText(Units.getDistanceFromKilometers(geo.getCoords().distanceTo(waypoint.getCoords())));
- waypointDistance.bringToFront();
- }
- }
-
- @Override
- protected void init() {
- super.init();
- waypoint = DataStore.loadWaypoint(waypointId);
- try {
- if (StringUtils.isNotBlank(waypoint.getName())) {
- setTitle(waypoint.getName());
- } else {
- setTitle(waypoint.getGeocode());
- }
-
- actionBarTitle.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(waypoint.getWaypointType().markerId), null, null, null);
-
- details = new CacheDetailsCreator(this, waypointDetailsLayout);
+ supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
- //Waypoint geocode
- details.add(R.string.cache_geocode, waypoint.getPrefix() + waypoint.getGeocode().substring(2));
- details.addDistance(waypoint, waypointDistance);
- waypointDistance = details.getValueView();
- details.add(R.string.waypoint_note, waypoint.getNote());
+ this.setTheme(ActivityMixin.getDialogTheme());
- buttonEdit.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View arg0) {
- EditWaypointActivity.startActivityEditWaypoint(WaypointPopup.this, cache, waypoint.getId());
- finish();
- }
- });
-
- details = new CacheDetailsCreator(this, cacheDetailsLayout);
- details.add(R.string.cache_name, cache.getName());
-
- addCacheDetails();
-
- } catch (Exception e) {
- Log.e("WaypointPopup.init", e);
+ final Bundle extras = getIntent().getExtras();
+ if (extras != null) {
+ waypointId = extras.getInt(Intents.EXTRA_WAYPOINT_ID);
+ geocode = extras.getString(Intents.EXTRA_GEOCODE);
}
- }
-
- @Override
- public void navigateTo() {
- NavigationAppFactory.startDefaultNavigationApplication(1, this, waypoint);
- }
+ showDialog();
- /**
- * Tries to navigate to the {@link Geocache} of this activity.
- */
- @Override
- protected void startDefaultNavigation2() {
- if (waypoint == null || waypoint.getCoords() == null) {
- showToast(res.getString(R.string.cache_coordinates_no));
- return;
- }
- NavigationAppFactory.startDefaultNavigationApplication(2, this, waypoint);
- finish();
}
public static void startActivity(final Context context, final int waypointId, final String geocode) {
@@ -119,16 +39,22 @@ public class WaypointPopup extends AbstractPopupActivity {
context.startActivity(popupIntent);
}
- @Override
- public void showNavigationMenu() {
- NavigationAppFactory.showNavigationMenu(this, null, waypoint, null);
- }
- @Override
- protected Geopoint getCoordinates() {
- if (waypoint == null) {
- return null;
+ void showDialog() {
+ // DialogFragment.show() will take care of adding the fragment
+ // in a transaction. We also want to remove any currently showing
+ // dialog, so make our own transaction and take care of that here.
+ FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
+ Fragment prev = getSupportFragmentManager().findFragmentByTag("dialog");
+ if (prev != null) {
+ ft.remove(prev);
}
- return waypoint.getCoords();
+ ft.addToBackStack(null);
+
+ // Create and show the dialog.
+ DialogFragment newFragment = WaypointPopupFragment.newInstance(geocode, waypointId);
+ newFragment.show(ft, "dialog");
}
+
+
}
diff --git a/main/src/cgeo/geocaching/WaypointPopupFragment.java b/main/src/cgeo/geocaching/WaypointPopupFragment.java
new file mode 100644
index 0000000..03d95e5
--- /dev/null
+++ b/main/src/cgeo/geocaching/WaypointPopupFragment.java
@@ -0,0 +1,147 @@
+package cgeo.geocaching;
+
+import butterknife.ButterKnife;
+import butterknife.InjectView;
+
+import cgeo.geocaching.apps.cache.navi.NavigationAppFactory;
+import cgeo.geocaching.geopoint.Geopoint;
+import cgeo.geocaching.geopoint.Units;
+import cgeo.geocaching.sensors.IGeoData;
+import cgeo.geocaching.ui.CacheDetailsCreator;
+import cgeo.geocaching.utils.Log;
+
+import org.apache.commons.lang3.StringUtils;
+
+import android.os.Bundle;
+import android.support.v4.app.DialogFragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+public class WaypointPopupFragment extends AbstractDialogFragment {
+ @InjectView(R.id.actionbar_title) protected TextView actionBarTitle;
+ @InjectView(R.id.waypoint_details_list) protected LinearLayout waypointDetailsLayout;
+ @InjectView(R.id.edit) protected Button buttonEdit;
+ @InjectView(R.id.details_list) protected LinearLayout cacheDetailsLayout;
+
+ private int waypointId = 0;
+ private Waypoint waypoint = null;
+ private TextView waypointDistance = null;
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+ View v = inflater.inflate(R.layout.waypoint_popup, container, false);
+ initCustomActionBar(v);
+ ButterKnife.inject(this,v);
+
+ return v;
+ }
+
+ @Override
+ public void onCreate(final Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ waypointId = getArguments().getInt(WAYPOINT_ARG);
+ }
+
+ @Override
+ protected void onUpdateGeoData(IGeoData geo) {
+ if (geo.getCoords() != null && waypoint != null && waypoint.getCoords() != null) {
+ waypointDistance.setText(Units.getDistanceFromKilometers(geo.getCoords().distanceTo(waypoint.getCoords())));
+ waypointDistance.bringToFront();
+ }
+ }
+
+ @Override
+ protected void init() {
+ super.init();
+
+ waypoint = DataStore.loadWaypoint(waypointId);
+ try {
+ if (StringUtils.isNotBlank(waypoint.getName())) {
+ setTitle(waypoint.getName());
+ } else {
+ setTitle(waypoint.getGeocode());
+ }
+
+
+ actionBarTitle.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(waypoint.getWaypointType().markerId), null, null, null);
+
+ //getSupportActionBar().setIcon(getResources().getDrawable(waypoint.getWaypointType().markerId));
+
+ details = new CacheDetailsCreator(getActivity(), waypointDetailsLayout);
+
+ //Waypoint geocode
+ details.add(R.string.cache_geocode, waypoint.getPrefix() + waypoint.getGeocode().substring(2));
+ details.addDistance(waypoint, waypointDistance);
+ waypointDistance = details.getValueView();
+ details.add(R.string.waypoint_note, waypoint.getNote());
+
+ buttonEdit.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View arg0) {
+ EditWaypointActivity.startActivityEditWaypoint(getActivity(), cache, waypoint.getId());
+ getActivity().finish();
+ }
+ });
+
+ details = new CacheDetailsCreator(getActivity(), cacheDetailsLayout);
+ details.add(R.string.cache_name, cache.getName());
+
+ addCacheDetails();
+
+ } catch (Exception e) {
+ Log.e("WaypointPopup.init", e);
+ }
+ }
+
+ @Override
+ public void navigateTo() {
+ NavigationAppFactory.startDefaultNavigationApplication(1, getActivity(), waypoint);
+ }
+
+ /**
+ * Tries to navigate to the {@link Geocache} of this activity.
+ */
+ @Override
+ public void startDefaultNavigation2() {
+ if (waypoint == null || waypoint.getCoords() == null) {
+ showToast(res.getString(R.string.cache_coordinates_no));
+ return;
+ }
+ NavigationAppFactory.startDefaultNavigationApplication(2, getActivity(), waypoint);
+ getActivity().finish();
+ }
+
+
+
+ @Override
+ public void showNavigationMenu() {
+ NavigationAppFactory.showNavigationMenu(getActivity(), null, waypoint, null);
+ }
+
+ @Override
+ protected Geopoint getCoordinates() {
+ if (waypoint == null) {
+ return null;
+ }
+ return waypoint.getCoords();
+ }
+
+ public static DialogFragment newInstance(String geocode, int waypointId) {
+
+ Bundle args = new Bundle();
+ args.putInt(WAYPOINT_ARG, waypointId);
+ args.putString(GEOCODE_ARG, geocode);
+
+ DialogFragment f = new WaypointPopupFragment();
+ f.setArguments(args);
+ f.setStyle(DialogFragment.STYLE_NO_TITLE,0);
+
+ return f;
+ }
+}
diff --git a/main/src/cgeo/geocaching/activity/AbstractActionBarActivity.java b/main/src/cgeo/geocaching/activity/AbstractActionBarActivity.java
new file mode 100644
index 0000000..a732f65
--- /dev/null
+++ b/main/src/cgeo/geocaching/activity/AbstractActionBarActivity.java
@@ -0,0 +1,34 @@
+package cgeo.geocaching.activity;
+
+import android.os.Bundle;
+
+/**
+ * Classes actually having an ActionBar (as opposed to the Dialog activities)
+ */
+public class AbstractActionBarActivity extends AbstractActivity {
+ @Override
+ protected void onCreate(Bundle savedInstanceState, int resourceLayoutID) {
+ super.onCreate(savedInstanceState, resourceLayoutID);
+ initUpAction();
+ showProgress(false);
+ }
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ initUpAction();
+ showProgress(false);
+ }
+
+
+ private void initUpAction() {
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+ }
+
+ @Override
+ public void setTitle(CharSequence title) {
+ super.setTitle(title);
+ // reflect the title in the actionbar
+ ActivityMixin.setTitle(this, title);
+ }
+}
diff --git a/main/src/cgeo/geocaching/activity/AbstractActivity.java b/main/src/cgeo/geocaching/activity/AbstractActivity.java
index 542dd05..e3df1f7 100644
--- a/main/src/cgeo/geocaching/activity/AbstractActivity.java
+++ b/main/src/cgeo/geocaching/activity/AbstractActivity.java
@@ -12,21 +12,31 @@ import cgeo.geocaching.utils.HtmlUtils;
import cgeo.geocaching.utils.TranslationUtils;
import org.apache.commons.lang3.StringUtils;
+import org.eclipse.jdt.annotation.NonNull;
+import rx.Subscription;
+import rx.subscriptions.Subscriptions;
+
+import android.annotation.TargetApi;
import android.content.Intent;
import android.content.res.Resources;
+import android.nfc.NdefMessage;
+import android.nfc.NdefRecord;
+import android.nfc.NfcAdapter;
+import android.nfc.NfcEvent;
+import android.os.Build;
import android.os.Bundle;
-import android.support.v4.app.FragmentActivity;
-import android.view.ContextMenu;
+import android.support.v7.app.ActionBarActivity;
+import android.support.v7.view.ActionMode;
+import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
+import android.view.Window;
import android.widget.EditText;
-import rx.Subscription;
-import rx.subscriptions.Subscriptions;
import java.util.Locale;
-public abstract class AbstractActivity extends FragmentActivity implements IAbstractActivity {
+public abstract class AbstractActivity extends ActionBarActivity implements IAbstractActivity {
protected CgeoApplication app = null;
protected Resources res = null;
@@ -41,15 +51,6 @@ public abstract class AbstractActivity extends FragmentActivity implements IAbst
this.keepScreenOn = keepScreenOn;
}
- @Override
- final public void goHome(final View view) {
- ActivityMixin.goHome(this);
- }
-
- final protected void setTitle(final String title) {
- ActivityMixin.setTitle(this, title);
- }
-
final protected void showProgress(final boolean show) {
ActivityMixin.showProgress(this, show);
}
@@ -71,7 +72,18 @@ public abstract class AbstractActivity extends FragmentActivity implements IAbst
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
+
initializeCommonFields();
+
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ if (item.getItemId() == android.R.id.home) {
+ return ActivityMixin.navigateUp(this);
+ }
+ return super.onOptionsItemSelected(item);
}
public void onResume(final Subscription resumeSubscription) {
@@ -104,21 +116,14 @@ public abstract class AbstractActivity extends FragmentActivity implements IAbst
}
protected void onCreate(final Bundle savedInstanceState, final int resourceLayoutID) {
- onCreate(savedInstanceState, resourceLayoutID, false);
- }
-
- protected void onCreate(final Bundle savedInstanceState, final int resourceLayoutID, boolean useDialogTheme) {
super.onCreate(savedInstanceState);
initializeCommonFields();
// non declarative part of layout
- if (useDialogTheme) {
- setTheme(ActivityMixin.getDialogTheme());
- } else {
- setTheme();
- }
+ setTheme();
+
setContentView(resourceLayoutID);
// create view variables
@@ -151,9 +156,8 @@ public abstract class AbstractActivity extends FragmentActivity implements IAbst
new Keyboard(this).show(view);
}
- protected void buildDetailsContextMenu(final ContextMenu menu, final CharSequence clickedItemText, final CharSequence fieldTitle, final boolean copyOnly) {
- menu.setHeaderTitle(fieldTitle);
- getMenuInflater().inflate(R.menu.details_context, menu);
+ protected void buildDetailsContextMenu(final ActionMode actionMode, final Menu menu, final CharSequence clickedItemText, final CharSequence fieldTitle, final boolean copyOnly) {
+ actionMode.setTitle(fieldTitle);
menu.findItem(R.id.menu_translate_to_sys_lang).setVisible(!copyOnly);
if (!copyOnly) {
if (clickedItemText.length() > TranslationUtils.TRANSLATION_TEXT_LENGTH_WARN) {
@@ -165,27 +169,62 @@ public abstract class AbstractActivity extends FragmentActivity implements IAbst
menu.findItem(R.id.menu_translate_to_english).setVisible(!copyOnly && !localeIsEnglish);
}
- protected boolean onClipboardItemSelected(final MenuItem item, final CharSequence clickedItemText) {
+ protected boolean onClipboardItemSelected(@NonNull final ActionMode actionMode, final MenuItem item, final CharSequence clickedItemText) {
switch (item.getItemId()) {
// detail fields
case R.id.menu_copy:
ClipboardUtils.copyToClipboard(clickedItemText);
showToast(res.getString(R.string.clipboard_copy_ok));
+ actionMode.finish();
return true;
case R.id.menu_translate_to_sys_lang:
TranslationUtils.startActivityTranslate(this, Locale.getDefault().getLanguage(), HtmlUtils.extractText(clickedItemText));
+ actionMode.finish();
return true;
case R.id.menu_translate_to_english:
TranslationUtils.startActivityTranslate(this, Locale.ENGLISH.getLanguage(), HtmlUtils.extractText(clickedItemText));
+ actionMode.finish();
return true;
case R.id.menu_cache_share_field:
final Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, clickedItemText.toString());
startActivity(Intent.createChooser(intent, res.getText(R.string.cache_share_field)));
+ actionMode.finish();
return true;
default:
return false;
}
}
+
+ // Do not support older devices than Android 4.0
+ // Although there even are 2.3 devices (Nexus S)
+ // these are so few that we don't want to deal with the older (non Android Beam) API
+
+ public interface ActivitySharingInterface {
+ /** Return an URL that represent the current activity for sharing */
+ public String getUri();
+ }
+
+ protected void initializeAndroidBeam(ActivitySharingInterface sharingInterface) {
+ if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
+ initializeICSAndroidBeam(sharingInterface);
+ }
+ }
+
+ @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
+ protected void initializeICSAndroidBeam(final ActivitySharingInterface sharingInterface) {
+ NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
+ if (nfcAdapter == null) {
+ return;
+ }
+ nfcAdapter.setNdefPushMessageCallback(new NfcAdapter.CreateNdefMessageCallback() {
+ @Override
+ public NdefMessage createNdefMessage(NfcEvent event) {
+ NdefRecord record = NdefRecord.createUri(sharingInterface.getUri());
+ return new NdefMessage(new NdefRecord[]{record});
+ }
+ }, this);
+
+ }
}
diff --git a/main/src/cgeo/geocaching/activity/AbstractListActivity.java b/main/src/cgeo/geocaching/activity/AbstractListActivity.java
index a5d5c14..eac191a 100644
--- a/main/src/cgeo/geocaching/activity/AbstractListActivity.java
+++ b/main/src/cgeo/geocaching/activity/AbstractListActivity.java
@@ -4,10 +4,10 @@ import cgeo.geocaching.CgeoApplication;
import android.content.res.Resources;
import android.os.Bundle;
-import android.support.v4.app.FragmentListActivity;
-import android.view.View;
+import android.view.MenuItem;
+import android.view.Window;
-public abstract class AbstractListActivity extends FragmentListActivity implements
+public abstract class AbstractListActivity extends ActionBarListActivity implements
IAbstractActivity {
private boolean keepScreenOn = false;
@@ -23,11 +23,6 @@ public abstract class AbstractListActivity extends FragmentListActivity implemen
this.keepScreenOn = keepScreenOn;
}
- @Override
- final public void goHome(View view) {
- ActivityMixin.goHome(this);
- }
-
final public void showProgress(final boolean show) {
ActivityMixin.showProgress(this, show);
}
@@ -49,7 +44,22 @@ public abstract class AbstractListActivity extends FragmentListActivity implemen
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
+
initializeCommonFields();
+ initUpAction();
+ }
+
+ protected void initUpAction() {
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ if (item.getItemId()== android.R.id.home) {
+ return ActivityMixin.navigateUp(this);
+ }
+ return super.onOptionsItemSelected(item);
}
private void initializeCommonFields() {
diff --git a/main/src/cgeo/geocaching/activity/AbstractViewPagerActivity.java b/main/src/cgeo/geocaching/activity/AbstractViewPagerActivity.java
index 6e2900d..64186a0 100644
--- a/main/src/cgeo/geocaching/activity/AbstractViewPagerActivity.java
+++ b/main/src/cgeo/geocaching/activity/AbstractViewPagerActivity.java
@@ -5,6 +5,7 @@ import cgeo.geocaching.utils.Log;
import com.viewpagerindicator.TitlePageIndicator;
import com.viewpagerindicator.TitleProvider;
+
import org.apache.commons.lang3.tuple.Pair;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
@@ -30,24 +31,24 @@ import java.util.Map;
* Enum listing all available pages of this activity. The pages available at a certain point of time are
* defined by overriding {@link #getOrderedPages()}.
*/
-public abstract class AbstractViewPagerActivity<Page extends Enum<Page>> extends AbstractActivity {
+public abstract class AbstractViewPagerActivity<Page extends Enum<Page>> extends AbstractActionBarActivity {
/**
* A {@link List} of all available pages.
*
* TODO Move to adapter
*/
- private final List<Page> pageOrder = new ArrayList<Page>();
+ private final List<Page> pageOrder = new ArrayList<>();
/**
* Instances of all {@link PageViewCreator}.
*/
- private final Map<Page, PageViewCreator> viewCreators = new HashMap<Page, PageViewCreator>();
+ private final Map<Page, PageViewCreator> viewCreators = new HashMap<>();
/**
* Store the states of the page views to be able to persist them when destroyed and reinstantiated again
*/
- private final Map<Page, Bundle> viewStates = new HashMap<Page, Bundle>();
+ private final Map<Page, Bundle> viewStates = new HashMap<>();
/**
* The {@link ViewPager} for this activity.
*/
@@ -69,14 +70,14 @@ public abstract class AbstractViewPagerActivity<Page extends Enum<Page>> extends
*
* @return
*/
- public View getDispatchedView();
+ public View getDispatchedView(final ViewGroup parentView);
/**
* Returns a (maybe cached) view.
*
* @return
*/
- public View getView();
+ public View getView(final ViewGroup parentView);
/**
* Handles changed data-sets.
@@ -109,16 +110,17 @@ public abstract class AbstractViewPagerActivity<Page extends Enum<Page>> extends
private class ViewPagerAdapter extends PagerAdapter implements TitleProvider {
@Override
- public void destroyItem(ViewGroup container, int position, Object object) {
+ public void destroyItem(final ViewGroup container, final int position, final Object object) {
if (position >= pageOrder.size()) {
return;
}
final Page page = pageOrder.get(position);
// Store the state of the view if the page supports it
- PageViewCreator creator = viewCreators.get(page);
+ final PageViewCreator creator = viewCreators.get(page);
if (creator != null) {
@Nullable
+ final
Bundle state = creator.getViewState();
if (state != null) {
viewStates.put(page, state);
@@ -129,7 +131,7 @@ public abstract class AbstractViewPagerActivity<Page extends Enum<Page>> extends
}
@Override
- public void finishUpdate(ViewGroup container) {
+ public void finishUpdate(final ViewGroup container) {
}
@Override
@@ -138,7 +140,7 @@ public abstract class AbstractViewPagerActivity<Page extends Enum<Page>> extends
}
@Override
- public Object instantiateItem(ViewGroup container, int position) {
+ public Object instantiateItem(final ViewGroup container, final int position) {
final Page page = pageOrder.get(position);
@@ -156,29 +158,29 @@ public abstract class AbstractViewPagerActivity<Page extends Enum<Page>> extends
if (null != creator) {
// Result from getView() is maybe cached, but it should be valid because the
// creator should be informed about data-changes with notifyDataSetChanged()
- view = creator.getView();
+ view = creator.getView(container);
// Restore the state of the view if the page supports it
- Bundle state = viewStates.get(page);
+ final Bundle state = viewStates.get(page);
if (state != null) {
creator.setViewState(state);
}
container.addView(view, 0);
}
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("ViewPagerAdapter.instantiateItem ", e);
}
return view;
}
@Override
- public boolean isViewFromObject(View view, Object object) {
+ public boolean isViewFromObject(final View view, final Object object) {
return view == object;
}
@Override
- public void restoreState(Parcelable arg0, ClassLoader arg1) {
+ public void restoreState(final Parcelable arg0, final ClassLoader arg1) {
}
@Override
@@ -187,18 +189,18 @@ public abstract class AbstractViewPagerActivity<Page extends Enum<Page>> extends
}
@Override
- public void startUpdate(ViewGroup arg0) {
+ public void startUpdate(final ViewGroup arg0) {
}
@Override
- public int getItemPosition(Object object) {
+ public int getItemPosition(final Object object) {
// We are doing the caching. So pretend that the view is gone.
// The ViewPager will get it back in instantiateItem()
return POSITION_NONE;
}
@Override
- public String getTitle(int position) {
+ public String getTitle(final int position) {
final Page page = pageOrder.get(position);
if (null == page) {
return "";
@@ -216,7 +218,7 @@ public abstract class AbstractViewPagerActivity<Page extends Enum<Page>> extends
* @param pageSelectedListener
* page selection listener or <code>null</code>
*/
- protected final void createViewPager(int startPageIndex, final OnPageSelectedListener pageSelectedListener) {
+ protected final void createViewPager(final int startPageIndex, final OnPageSelectedListener pageSelectedListener) {
// initialize ViewPager
viewPager = (ViewPager) findViewById(R.id.viewpager);
viewPagerAdapter = new ViewPagerAdapter();
@@ -227,16 +229,16 @@ public abstract class AbstractViewPagerActivity<Page extends Enum<Page>> extends
if (pageSelectedListener != null) {
titleIndicator.setOnPageChangeListener(new OnPageChangeListener() {
@Override
- public void onPageSelected(int position) {
+ public void onPageSelected(final int position) {
pageSelectedListener.onPageSelected(position);
}
@Override
- public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
+ public void onPageScrolled(final int position, final float positionOffset, final int positionOffsetPixels) {
}
@Override
- public void onPageScrollStateChanged(int state) {
+ public void onPageScrollStateChanged(final int state) {
}
});
}
@@ -267,11 +269,11 @@ public abstract class AbstractViewPagerActivity<Page extends Enum<Page>> extends
protected final void reinitializeViewPager() {
// notify all creators that the data has changed
- for (PageViewCreator creator : viewCreators.values()) {
+ for (final PageViewCreator creator : viewCreators.values()) {
creator.notifyDataSetChanged();
}
// reset the stored view states of all pages
- for (Bundle state : viewStates.values()) {
+ for (final Bundle state : viewStates.values()) {
state.clear();
}
@@ -301,19 +303,19 @@ public abstract class AbstractViewPagerActivity<Page extends Enum<Page>> extends
*/
protected abstract Pair<List<? extends Page>, Integer> getOrderedPages();
- public final Page getPage(int position) {
+ public final Page getPage(final int position) {
return pageOrder.get(position);
}
- protected final int getPageIndex(Page page) {
+ protected final int getPageIndex(final Page page) {
return pageOrder.indexOf(page);
}
- protected final PageViewCreator getViewCreator(Page page) {
+ protected final PageViewCreator getViewCreator(final Page page) {
return viewCreators.get(page);
}
- protected final boolean isCurrentPage(Page page) {
+ protected final boolean isCurrentPage(final Page page) {
return getCurrentItem() == getPageIndex(page);
}
diff --git a/main/src/cgeo/geocaching/activity/ActionBarListActivity.java b/main/src/cgeo/geocaching/activity/ActionBarListActivity.java
new file mode 100644
index 0000000..07c7ec3
--- /dev/null
+++ b/main/src/cgeo/geocaching/activity/ActionBarListActivity.java
@@ -0,0 +1,34 @@
+package cgeo.geocaching.activity;
+
+import android.support.v7.app.ActionBarActivity;
+import android.widget.HeaderViewListAdapter;
+import android.widget.ListAdapter;
+import android.widget.ListView;
+
+/**
+ * Compatbility Class until cgeo switches from ListActivities to ListFragments
+ */
+public class ActionBarListActivity extends ActionBarActivity {
+
+ private ListView mListView;
+ protected ListView getListView() {
+ if (mListView == null) {
+ mListView = (ListView) findViewById(android.R.id.list);
+ }
+ return mListView;
+ }
+
+ protected void setListAdapter(ListAdapter adapter) {
+ getListView().setAdapter(adapter);
+ }
+
+ protected ListAdapter getListAdapter() {
+ ListAdapter adapter = getListView().getAdapter();
+ if (adapter instanceof HeaderViewListAdapter) {
+ return ((HeaderViewListAdapter)adapter).getWrappedAdapter();
+ }
+ return adapter;
+ }
+}
+
+
diff --git a/main/src/cgeo/geocaching/activity/ActivityMixin.java b/main/src/cgeo/geocaching/activity/ActivityMixin.java
index bfd45da..b58d3ae 100644
--- a/main/src/cgeo/geocaching/activity/ActivityMixin.java
+++ b/main/src/cgeo/geocaching/activity/ActivityMixin.java
@@ -1,55 +1,47 @@
package cgeo.geocaching.activity;
-import cgeo.geocaching.MainActivity;
import cgeo.geocaching.R;
-import cgeo.geocaching.compatibility.Compatibility;
import cgeo.geocaching.settings.Settings;
import org.apache.commons.lang3.StringUtils;
+import org.eclipse.jdt.annotation.NonNull;
import android.app.Activity;
import android.content.Intent;
-import android.os.Build;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
+import android.support.v4.app.ActivityCompat;
+import android.support.v4.app.NavUtils;
+import android.support.v4.app.TaskStackBuilder;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
import android.view.Gravity;
-import android.view.View;
import android.view.WindowManager;
import android.widget.EditText;
-import android.widget.ProgressBar;
-import android.widget.TextView;
import android.widget.Toast;
public final class ActivityMixin {
- public final static void goHome(final Activity fromActivity) {
- final Intent intent = new Intent(fromActivity, MainActivity.class);
- intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
-
- fromActivity.startActivity(intent);
- fromActivity.finish();
- }
-
public static void setTitle(final Activity activity, final CharSequence text) {
if (StringUtils.isBlank(text)) {
return;
}
- final TextView title = (TextView) activity.findViewById(R.id.actionbar_title);
- if (title != null) {
- title.setText(text);
+ if (activity instanceof ActionBarActivity) {
+ final ActionBar actionBar = ((ActionBarActivity) activity).getSupportActionBar();
+ if (actionBar != null) {
+ actionBar.setTitle(text);
+ }
}
}
- public static void showProgress(final Activity activity, final boolean show) {
+ public static void showProgress(final ActionBarActivity activity, final boolean show) {
if (activity == null) {
return;
}
- final ProgressBar progress = (ProgressBar) activity.findViewById(R.id.actionbar_progress);
- if (show) {
- progress.setVisibility(View.VISIBLE);
- } else {
- progress.setVisibility(View.GONE);
- }
+ activity.setSupportProgressBarIndeterminateVisibility(show);
+
}
public static void setTheme(final Activity activity) {
@@ -62,33 +54,53 @@ public final class ActivityMixin {
public static int getDialogTheme() {
// Light theme dialogs don't work on Android Api < 11
- if (Settings.isLightSkin() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
+ if (Settings.isLightSkin() && VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB) {
return R.style.popup_light;
}
-
return R.style.popup_dark;
}
+ /**
+ * Show a long toast message to the user. This can be called from any thread.
+ *
+ * @param activity the activity the user is facing
+ * @param resId the message
+ */
public static void showToast(final Activity activity, final int resId) {
ActivityMixin.showToast(activity, activity.getString(resId));
}
- public static void showToast(final Activity activity, final String text) {
+ private static void postShowToast(final Activity activity, final String text, final int toastDuration) {
if (StringUtils.isNotBlank(text)) {
- Toast toast = Toast.makeText(activity, text, Toast.LENGTH_LONG);
-
- toast.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM, 0, 100);
- toast.show();
+ activity.runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ final Toast toast = Toast.makeText(activity, text, toastDuration);
+ toast.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM, 0, 100);
+ toast.show();
+ }
+ });
}
}
- public static void showShortToast(final Activity activity, final String text) {
- if (StringUtils.isNotBlank(text)) {
- Toast toast = Toast.makeText(activity, text, Toast.LENGTH_SHORT);
+ /**
+ * Show a long toast message to the user. This can be called from any thread.
+ *
+ * @param activity the activity the user is facing
+ * @param text the message
+ */
+ public static void showToast(final Activity activity, final String text) {
+ postShowToast(activity, text, Toast.LENGTH_LONG);
+ }
- toast.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM, 0, 100);
- toast.show();
- }
+ /**
+ * Show a short toast message to the user. This can be called from any thread.
+ *
+ * @param activity the activity the user is facing
+ * @param text the message
+ */
+ public static void showShortToast(final Activity activity, final String text) {
+ postShowToast(activity, text, Toast.LENGTH_SHORT);
}
public static void keepScreenOn(final Activity abstractActivity, boolean keepScreenOn) {
@@ -98,7 +110,12 @@ public final class ActivityMixin {
}
public static void invalidateOptionsMenu(Activity activity) {
- Compatibility.invalidateOptionsMenu(activity);
+ if (activity instanceof ActionBarActivity) {
+ ((ActionBarActivity) activity).supportInvalidateOptionsMenu();
+ }
+ else {
+ ActivityCompat.invalidateOptionsMenu(activity);
+ }
}
/**
@@ -127,4 +144,27 @@ public final class ActivityMixin {
int newCursor = moveCursor ? start + completeText.length() : start;
editText.setSelection(newCursor);
}
+
+ public static boolean navigateUp(@NonNull final Activity activity) {
+ // see http://developer.android.com/training/implementing-navigation/ancestral.html
+ Intent upIntent = NavUtils.getParentActivityIntent(activity);
+ if (upIntent == null) {
+ activity.finish();
+ return true;
+ }
+ if (NavUtils.shouldUpRecreateTask(activity, upIntent)) {
+ // This activity is NOT part of this app's task, so create a new task
+ // when navigating up, with a synthesized back stack.
+ TaskStackBuilder.create(activity)
+ // Add all of this activity's parents to the back stack
+ .addNextIntentWithParentStack(upIntent)
+ // Navigate up to the closest parent
+ .startActivities();
+ } else {
+ // This activity is part of this app's task, so simply
+ // navigate up to the logical parent activity.
+ NavUtils.navigateUpTo(activity, upIntent);
+ }
+ return true;
+ }
}
diff --git a/main/src/cgeo/geocaching/activity/IAbstractActivity.java b/main/src/cgeo/geocaching/activity/IAbstractActivity.java
index 7ca2322..4fb6a2a 100644
--- a/main/src/cgeo/geocaching/activity/IAbstractActivity.java
+++ b/main/src/cgeo/geocaching/activity/IAbstractActivity.java
@@ -1,11 +1,8 @@
package cgeo.geocaching.activity;
-import android.view.View;
public interface IAbstractActivity {
- public void goHome(View view);
-
public void showToast(String text);
public void showShortToast(String text);
diff --git a/main/src/cgeo/geocaching/activity/SimpleWebviewActivity.java b/main/src/cgeo/geocaching/activity/SimpleWebviewActivity.java
new file mode 100644
index 0000000..83b9281
--- /dev/null
+++ b/main/src/cgeo/geocaching/activity/SimpleWebviewActivity.java
@@ -0,0 +1,32 @@
+package cgeo.geocaching.activity;
+
+import cgeo.geocaching.R;
+
+import android.annotation.SuppressLint;
+import android.os.Bundle;
+import android.webkit.WebView;
+import android.webkit.WebViewClient;
+
+public class SimpleWebviewActivity extends AbstractActionBarActivity {
+
+ private WebView webview;
+
+ class SimplelWebviewClient extends WebViewClient {
+ @Override
+ public boolean shouldOverrideUrlLoading(final WebView view, final String url) {
+ webview.loadUrl(url);
+ return true;
+ }
+ }
+
+ @SuppressLint("SetJavaScriptEnabled")
+ @Override
+ public void onCreate(final Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState, R.layout.internal_browser);
+
+ webview = (WebView) findViewById(R.id.webview);
+ webview.getSettings().setJavaScriptEnabled(true);
+ webview.setWebViewClient(new SimplelWebviewClient());
+ webview.loadUrl(String.valueOf(getIntent().getData()));
+ }
+}
diff --git a/main/src/cgeo/geocaching/apps/AbstractLocusApp.java b/main/src/cgeo/geocaching/apps/AbstractLocusApp.java
index 8e9181d..baf36a4 100644
--- a/main/src/cgeo/geocaching/apps/AbstractLocusApp.java
+++ b/main/src/cgeo/geocaching/apps/AbstractLocusApp.java
@@ -77,7 +77,7 @@ public abstract class AbstractLocusApp extends AbstractApp {
if (pd.getPoints().size() <= 1000) {
DisplayData.sendData(activity, pd, export);
} else {
- final ArrayList<PointsData> data = new ArrayList<PointsData>();
+ final ArrayList<PointsData> data = new ArrayList<>();
data.add(pd);
DisplayData.sendDataCursor(activity, data,
"content://" + LocusDataStorageProvider.class.getCanonicalName().toLowerCase(Locale.US),
@@ -140,7 +140,7 @@ public abstract class AbstractLocusApp extends AbstractApp {
pg.found = cache.isFound();
if (withWaypoints && cache.hasWaypoints()) {
- pg.waypoints = new ArrayList<PointGeocachingDataWaypoint>();
+ pg.waypoints = new ArrayList<>();
for (Waypoint waypoint : cache.getWaypoints()) {
if (waypoint == null || waypoint.getCoords() == null) {
continue;
diff --git a/main/src/cgeo/geocaching/apps/cache/CacheBeaconApp.java b/main/src/cgeo/geocaching/apps/cache/CacheBeaconApp.java
deleted file mode 100644
index 34c9074..0000000
--- a/main/src/cgeo/geocaching/apps/cache/CacheBeaconApp.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package cgeo.geocaching.apps.cache;
-
-import cgeo.geocaching.Geocache;
-import cgeo.geocaching.R;
-import cgeo.geocaching.enumerations.CacheAttribute;
-
-public class CacheBeaconApp extends AbstractGeneralApp {
-
- public CacheBeaconApp() {
- super(getString(R.string.cache_menu_cachebeacon), R.id.cache_app_cache_beacon, "de.fun2code.android.cachebeacon");
- }
-
- @Override
- public boolean isEnabled(Geocache cache) {
- return cache.hasAttribute(CacheAttribute.WIRELESSBEACON, true);
- }
-
-}
diff --git a/main/src/cgeo/geocaching/apps/cache/GccApp.java b/main/src/cgeo/geocaching/apps/cache/GccApp.java
deleted file mode 100644
index 4423977..0000000
--- a/main/src/cgeo/geocaching/apps/cache/GccApp.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package cgeo.geocaching.apps.cache;
-
-import cgeo.geocaching.R;
-import cgeo.geocaching.utils.ProcessUtils;
-
-import android.content.Intent;
-
-public class GccApp extends AbstractGeneralApp {
- private static final String PACKAGE = "eisbehr.gcc";
- private static final String PACKAGE_PRO = "eisbehr.gcc.pro";
-
- public GccApp() {
- super(getString(R.string.cache_menu_gcc), R.id.cache_app_gcc, null);
- }
-
- @Override
- public boolean isInstalled() {
- return ProcessUtils.isLaunchable(PACKAGE) || ProcessUtils.isLaunchable(PACKAGE_PRO);
- }
-
- @Override
- protected Intent getLaunchIntent() {
- if (ProcessUtils.isLaunchable(PACKAGE_PRO)) {
- return ProcessUtils.getLaunchIntent(PACKAGE_PRO);
- }
- return ProcessUtils.getLaunchIntent(PACKAGE);
- }
-}
diff --git a/main/src/cgeo/geocaching/apps/cache/WhereYouGoApp.java b/main/src/cgeo/geocaching/apps/cache/WhereYouGoApp.java
index 79a5975..b2a2cad 100644
--- a/main/src/cgeo/geocaching/apps/cache/WhereYouGoApp.java
+++ b/main/src/cgeo/geocaching/apps/cache/WhereYouGoApp.java
@@ -3,14 +3,34 @@ package cgeo.geocaching.apps.cache;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.R;
import cgeo.geocaching.enumerations.CacheType;
+import cgeo.geocaching.utils.TextUtils;
+
+import org.apache.commons.lang3.StringUtils;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.net.Uri;
+
+import java.util.regex.Pattern;
public class WhereYouGoApp extends AbstractGeneralApp {
+ private static final Pattern PATTERN_CARTRIDGE = Pattern.compile("(" + Pattern.quote("http://www.wherigo.com/cartridge/details.aspx?") + ".*?)" + Pattern.quote("\""));
+
public WhereYouGoApp() {
super(getString(R.string.cache_menu_whereyougo), R.id.cache_app_whereyougo, "menion.android.whereyougo");
}
@Override
public boolean isEnabled(Geocache cache) {
- return cache.getType() == CacheType.WHERIGO;
+ return cache.getType() == CacheType.WHERIGO && StringUtils.isNotEmpty(getWhereIGoUrl(cache));
+ }
+
+ @Override
+ public void navigate(Activity activity, Geocache cache) {
+ activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getWhereIGoUrl(cache))));
+ }
+
+ protected static String getWhereIGoUrl(Geocache cache) {
+ return TextUtils.getMatch(cache.getDescription(), PATTERN_CARTRIDGE, null);
}
}
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/AbstractStaticMapsApp.java b/main/src/cgeo/geocaching/apps/cache/navi/AbstractStaticMapsApp.java
index c42c2a2..a2a5803 100644
--- a/main/src/cgeo/geocaching/apps/cache/navi/AbstractStaticMapsApp.java
+++ b/main/src/cgeo/geocaching/apps/cache/navi/AbstractStaticMapsApp.java
@@ -4,7 +4,7 @@ import cgeo.geocaching.DataStore;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.ILogable;
import cgeo.geocaching.R;
-import cgeo.geocaching.StaticMapsActivity;
+import cgeo.geocaching.StaticMapsActivity_;
import cgeo.geocaching.StaticMapsProvider;
import cgeo.geocaching.Waypoint;
import cgeo.geocaching.activity.ActivityMixin;
@@ -49,7 +49,11 @@ abstract class AbstractStaticMapsApp extends AbstractApp implements CacheNavigat
}
final String geocode = StringUtils.upperCase(logable.getGeocode());
- StaticMapsActivity.startActivity(activity, geocode, download, waypoint);
+ StaticMapsActivity_.IntentBuilder_ builder = StaticMapsActivity_.intent(activity).geocode(geocode).download(download);
+ if (waypoint != null) {
+ builder.waypointId(waypoint.getId());
+ }
+ builder.start();
return true;
}
}
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/DownloadStaticMapsApp.java b/main/src/cgeo/geocaching/apps/cache/navi/DownloadStaticMapsApp.java
index 19b5e02..e9bdb74 100644
--- a/main/src/cgeo/geocaching/apps/cache/navi/DownloadStaticMapsApp.java
+++ b/main/src/cgeo/geocaching/apps/cache/navi/DownloadStaticMapsApp.java
@@ -13,22 +13,22 @@ class DownloadStaticMapsApp extends AbstractStaticMapsApp {
}
@Override
- public boolean isEnabled(Geocache cache) {
- return !cache.hasStaticMap();
+ public boolean isEnabled(final Geocache cache) {
+ return cache.isOffline() && !cache.hasStaticMap();
}
@Override
- public boolean isEnabled(Waypoint waypoint) {
+ public boolean isEnabled(final Waypoint waypoint) {
return !hasStaticMap(waypoint);
}
@Override
- public void navigate(Activity activity, Geocache cache) {
+ public void navigate(final Activity activity, final Geocache cache) {
invokeStaticMaps(activity, cache, null, true);
}
@Override
- public void navigate(Activity activity, Waypoint waypoint) {
+ public void navigate(final Activity activity, final Waypoint waypoint) {
invokeStaticMaps(activity, null, waypoint, true);
}
}
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java b/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java
index 3177a29..e24c055 100644
--- a/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java
+++ b/main/src/cgeo/geocaching/apps/cache/navi/NavigationAppFactory.java
@@ -7,8 +7,6 @@ import cgeo.geocaching.Waypoint;
import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.apps.AbstractAppFactory;
import cgeo.geocaching.apps.App;
-import cgeo.geocaching.apps.cache.CacheBeaconApp;
-import cgeo.geocaching.apps.cache.GccApp;
import cgeo.geocaching.apps.cache.WhereYouGoApp;
import cgeo.geocaching.apps.cache.navi.GoogleNavigationApp.GoogleNavigationBikeApp;
import cgeo.geocaching.apps.cache.navi.GoogleNavigationApp.GoogleNavigationDrivingApp;
@@ -69,8 +67,6 @@ public final class NavigationAppFactory extends AbstractAppFactory {
*/
GOOGLE_MAPS_DIRECTIONS(new GoogleMapsDirectionApp(), 13, R.string.pref_navigation_menu_google_maps_directions),
- CACHE_BEACON(new CacheBeaconApp(), 14, R.string.pref_navigation_menu_cache_beacon),
- GCC(new GccApp(), 15, R.string.pref_navigation_menu_gcc),
WHERE_YOU_GO(new WhereYouGoApp(), 16, R.string.pref_navigation_menu_where_you_go),
PEBBLE(new PebbleApp(), 17, R.string.pref_navigation_menu_pebble),
MAPSWITHME(new MapsWithMeApp(), 22, R.string.pref_navigation_menu_mapswithme);
@@ -144,7 +140,7 @@ public final class NavigationAppFactory extends AbstractAppFactory {
public static void showNavigationMenu(final Activity activity,
final Geocache cache, final Waypoint waypoint, final Geopoint destination,
final boolean showInternalMap, final boolean showDefaultNavigation) {
- final List<NavigationAppsEnum> items = new ArrayList<NavigationAppFactory.NavigationAppsEnum>();
+ final List<NavigationAppsEnum> items = new ArrayList<>();
final int defaultNavigationTool = Settings.getDefaultNavigationTool();
for (final NavigationAppsEnum navApp : getInstalledNavigationApps()) {
if ((showInternalMap || !(navApp.app instanceof InternalMap)) &&
@@ -176,13 +172,13 @@ public final class NavigationAppFactory extends AbstractAppFactory {
* Using an ArrayAdapter with list of NavigationAppsEnum items avoids
* handling between mapping list positions allows us to do dynamic filtering of the list based on use case.
*/
- final ArrayAdapter<NavigationAppsEnum> adapter = new ArrayAdapter<NavigationAppsEnum>(activity, android.R.layout.select_dialog_item, items);
+ final ArrayAdapter<NavigationAppsEnum> adapter = new ArrayAdapter<>(activity, android.R.layout.select_dialog_item, items);
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(R.string.cache_menu_navigate);
builder.setAdapter(adapter, new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int item) {
+ public void onClick(final DialogInterface dialog, final int item) {
final NavigationAppsEnum selectedItem = adapter.getItem(item);
invokeNavigation(activity, cache, waypoint, destination, selectedItem.app);
}
@@ -197,7 +193,7 @@ public final class NavigationAppFactory extends AbstractAppFactory {
* @return
*/
public static List<NavigationAppsEnum> getInstalledNavigationApps() {
- final List<NavigationAppsEnum> installedNavigationApps = new ArrayList<NavigationAppsEnum>();
+ final List<NavigationAppsEnum> installedNavigationApps = new ArrayList<>();
for (final NavigationAppsEnum appEnum : NavigationAppsEnum.values()) {
if (appEnum.app.isInstalled()) {
installedNavigationApps.add(appEnum);
@@ -212,7 +208,7 @@ public final class NavigationAppFactory extends AbstractAppFactory {
* @return
*/
public static List<NavigationAppsEnum> getInstalledDefaultNavigationApps() {
- final List<NavigationAppsEnum> installedNavigationApps = new ArrayList<NavigationAppsEnum>();
+ final List<NavigationAppsEnum> installedNavigationApps = new ArrayList<>();
for (final NavigationAppsEnum appEnum : NavigationAppsEnum.values()) {
if (appEnum.app.isInstalled() && appEnum.app.isUsableAsDefaultNavigationApp()) {
installedNavigationApps.add(appEnum);
@@ -230,27 +226,27 @@ public final class NavigationAppFactory extends AbstractAppFactory {
* @param cache
* @return
*/
- public static boolean onMenuItemSelected(final MenuItem item, Activity activity, Geocache cache) {
+ public static boolean onMenuItemSelected(final MenuItem item, final Activity activity, final Geocache cache) {
final App menuItem = getAppFromMenuItem(item);
navigateCache(activity, cache, menuItem);
return menuItem != null;
}
- private static void navigateCache(Activity activity, Geocache cache, @Nullable App app) {
+ private static void navigateCache(final Activity activity, final Geocache cache, @Nullable final App app) {
if (app instanceof CacheNavigationApp) {
final CacheNavigationApp cacheApp = (CacheNavigationApp) app;
cacheApp.navigate(activity, cache);
}
}
- private static void navigateWaypoint(Activity activity, Waypoint waypoint, @Nullable App app) {
+ private static void navigateWaypoint(final Activity activity, final Waypoint waypoint, @Nullable final App app) {
if (app instanceof WaypointNavigationApp) {
final WaypointNavigationApp waypointApp = (WaypointNavigationApp) app;
waypointApp.navigate(activity, waypoint);
}
}
- private static void navigateGeopoint(Activity activity, Geopoint destination, App app) {
+ private static void navigateGeopoint(final Activity activity, final Geopoint destination, final App app) {
if (app instanceof GeopointNavigationApp) {
final GeopointNavigationApp geopointApp = (GeopointNavigationApp) app;
geopointApp.navigate(activity, destination);
@@ -258,7 +254,7 @@ public final class NavigationAppFactory extends AbstractAppFactory {
}
@Nullable
- private static App getAppFromMenuItem(MenuItem item) {
+ private static App getAppFromMenuItem(final MenuItem item) {
final int id = item.getItemId();
for (final NavigationAppsEnum navApp : NavigationAppsEnum.values()) {
if (navApp.id == id) {
@@ -276,7 +272,7 @@ public final class NavigationAppFactory extends AbstractAppFactory {
* @param activity
* @param cache
*/
- public static void startDefaultNavigationApplication(int defaultNavigation, Activity activity, Geocache cache) {
+ public static void startDefaultNavigationApplication(final int defaultNavigation, final Activity activity, final Geocache cache) {
if (cache == null || cache.getCoords() == null) {
ActivityMixin.showToast(activity, CgeoApplication.getInstance().getString(R.string.err_location_unknown));
return;
@@ -285,7 +281,7 @@ public final class NavigationAppFactory extends AbstractAppFactory {
navigateCache(activity, cache, getDefaultNavigationApplication(defaultNavigation));
}
- private static App getDefaultNavigationApplication(int defaultNavigation) {
+ private static App getDefaultNavigationApplication(final int defaultNavigation) {
if (defaultNavigation == 2) {
return getNavigationAppForId(Settings.getDefaultNavigationTool2());
}
@@ -298,7 +294,7 @@ public final class NavigationAppFactory extends AbstractAppFactory {
* @param activity
* @param waypoint
*/
- public static void startDefaultNavigationApplication(int defaultNavigation, Activity activity, Waypoint waypoint) {
+ public static void startDefaultNavigationApplication(final int defaultNavigation, final Activity activity, final Waypoint waypoint) {
if (waypoint == null || waypoint.getCoords() == null) {
ActivityMixin.showToast(activity, CgeoApplication.getInstance().getString(R.string.err_location_unknown));
return;
@@ -312,7 +308,7 @@ public final class NavigationAppFactory extends AbstractAppFactory {
* @param activity
* @param destination
*/
- public static void startDefaultNavigationApplication(int defaultNavigation, Activity activity, final Geopoint destination) {
+ public static void startDefaultNavigationApplication(final int defaultNavigation, final Activity activity, final Geopoint destination) {
if (destination == null) {
ActivityMixin.showToast(activity, CgeoApplication.getInstance().getString(R.string.err_location_unknown));
return;
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/NavigonApp.java b/main/src/cgeo/geocaching/apps/cache/navi/NavigonApp.java
index da988aa..024bf37 100644
--- a/main/src/cgeo/geocaching/apps/cache/navi/NavigonApp.java
+++ b/main/src/cgeo/geocaching/apps/cache/navi/NavigonApp.java
@@ -23,8 +23,8 @@ class NavigonApp extends AbstractPointNavigationApp {
/*
* Long/Lat are float values in decimal degree format (+-DDD.DDDDD).
* Example:
- * intent.putExtra(INTENT_EXTRA_KEY_LATITUDE, 46.12345f);
- * intent.putExtra(INTENT_EXTRA_KEY_LONGITUDE, 23.12345f);
+ * intent.putExtra(INTENT_EXTRA_KEY_LATITUDE, 46.12345f)
+ * intent.putExtra(INTENT_EXTRA_KEY_LONGITUDE, 23.12345f)
*/
intent.putExtra(INTENT_EXTRA_KEY_LATITUDE, (float) point.getLatitude());
intent.putExtra(INTENT_EXTRA_KEY_LONGITUDE, (float) point.getLongitude());
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/RMapsApp.java b/main/src/cgeo/geocaching/apps/cache/navi/RMapsApp.java
index 82d144e..4dbb46c 100644
--- a/main/src/cgeo/geocaching/apps/cache/navi/RMapsApp.java
+++ b/main/src/cgeo/geocaching/apps/cache/navi/RMapsApp.java
@@ -25,7 +25,7 @@ class RMapsApp extends AbstractPointNavigationApp {
}
private static void navigate(Activity activity, Geopoint coords, String code, String name) {
- final ArrayList<String> locations = new ArrayList<String>();
+ final ArrayList<String> locations = new ArrayList<>();
locations.add(coords.format(Format.LAT_LON_DECDEGREE_COMMA) + ";" + code + ";" + name);
final Intent intent = new Intent(INTENT);
intent.putStringArrayListExtra("locations", locations);
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/StaticMapApp.java b/main/src/cgeo/geocaching/apps/cache/navi/StaticMapApp.java
index 9e1b3f0..5151088 100644
--- a/main/src/cgeo/geocaching/apps/cache/navi/StaticMapApp.java
+++ b/main/src/cgeo/geocaching/apps/cache/navi/StaticMapApp.java
@@ -13,22 +13,22 @@ class StaticMapApp extends AbstractStaticMapsApp {
}
@Override
- public boolean isEnabled(Geocache cache) {
- return cache.hasStaticMap();
+ public boolean isEnabled(final Geocache cache) {
+ return cache.isOffline() && cache.hasStaticMap();
}
@Override
- public boolean isEnabled(Waypoint waypoint) {
+ public boolean isEnabled(final Waypoint waypoint) {
return hasStaticMap(waypoint);
}
@Override
- public void navigate(Activity activity, Geocache cache) {
+ public void navigate(final Activity activity, final Geocache cache) {
invokeStaticMaps(activity, cache, null, false);
}
@Override
- public void navigate(Activity activity, Waypoint waypoint) {
+ public void navigate(final Activity activity, final Waypoint waypoint) {
invokeStaticMaps(activity, null, waypoint, false);
}
}
diff --git a/main/src/cgeo/geocaching/apps/cachelist/CacheListAppFactory.java b/main/src/cgeo/geocaching/apps/cachelist/CacheListAppFactory.java
index 8212111..5886168 100644
--- a/main/src/cgeo/geocaching/apps/cachelist/CacheListAppFactory.java
+++ b/main/src/cgeo/geocaching/apps/cachelist/CacheListAppFactory.java
@@ -51,7 +51,7 @@ public final class CacheListAppFactory extends AbstractAppFactory {
}
private static List<CacheListApp> getActiveApps() {
- final List<CacheListApp> activeApps = new ArrayList<CacheListApp>(LazyHolder.apps.length);
+ final List<CacheListApp> activeApps = new ArrayList<>(LazyHolder.apps.length);
for (final CacheListApp app : LazyHolder.apps) {
if (app.isInstalled()) {
activeApps.add(app);
diff --git a/main/src/cgeo/geocaching/compatibility/AndroidLevel11.java b/main/src/cgeo/geocaching/compatibility/AndroidLevel11.java
deleted file mode 100644
index a425ee5..0000000
--- a/main/src/cgeo/geocaching/compatibility/AndroidLevel11.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package cgeo.geocaching.compatibility;
-
-import android.annotation.TargetApi;
-import android.app.Activity;
-
-/**
- * Android level 11 support
- */
-@TargetApi(11)
-public class AndroidLevel11 implements AndroidLevel11Interface {
-
- @Override
- public void invalidateOptionsMenu(final Activity activity) {
- activity.invalidateOptionsMenu();
- }
-
-}
diff --git a/main/src/cgeo/geocaching/compatibility/AndroidLevel11Emulation.java b/main/src/cgeo/geocaching/compatibility/AndroidLevel11Emulation.java
deleted file mode 100644
index 6a23ed5..0000000
--- a/main/src/cgeo/geocaching/compatibility/AndroidLevel11Emulation.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package cgeo.geocaching.compatibility;
-
-import android.app.Activity;
-
-/**
- * implement level 11 API using older methods
- */
-public class AndroidLevel11Emulation implements AndroidLevel11Interface {
-
- @Override
- public void invalidateOptionsMenu(final Activity activity) {
- // do nothing
- }
-
-}
diff --git a/main/src/cgeo/geocaching/compatibility/AndroidLevel11Interface.java b/main/src/cgeo/geocaching/compatibility/AndroidLevel11Interface.java
deleted file mode 100644
index 236e92d..0000000
--- a/main/src/cgeo/geocaching/compatibility/AndroidLevel11Interface.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package cgeo.geocaching.compatibility;
-
-import android.app.Activity;
-
-public interface AndroidLevel11Interface {
- public void invalidateOptionsMenu(final Activity activity);
-
-}
diff --git a/main/src/cgeo/geocaching/compatibility/Compatibility.java b/main/src/cgeo/geocaching/compatibility/Compatibility.java
index a293cfd..54e2966 100644
--- a/main/src/cgeo/geocaching/compatibility/Compatibility.java
+++ b/main/src/cgeo/geocaching/compatibility/Compatibility.java
@@ -8,35 +8,33 @@ import android.os.Build;
public final class Compatibility {
- private final static int sdkVersion = Build.VERSION.SDK_INT;
+ private static final int SDK_VERSION = Build.VERSION.SDK_INT;
- private final static AndroidLevel11Interface level11;
- private final static AndroidLevel13Interface level13;
- private final static AndroidLevel19Interface level19;
+ private static final AndroidLevel13Interface LEVEL_13;
+ private static final AndroidLevel19Interface LEVEL_19;
static {
- level11 = sdkVersion >= 11 ? new AndroidLevel11() : new AndroidLevel11Emulation();
- level13 = sdkVersion >= 13 ? new AndroidLevel13() : new AndroidLevel13Emulation();
- level19 = sdkVersion >= 19 ? new AndroidLevel19() : new AndroidLevel19Emulation();
+ LEVEL_13 = SDK_VERSION >= 13 ? new AndroidLevel13() : new AndroidLevel13Emulation();
+ LEVEL_19 = SDK_VERSION >= 19 ? new AndroidLevel19() : new AndroidLevel19Emulation();
}
- public static void invalidateOptionsMenu(final Activity activity) {
- level11.invalidateOptionsMenu(activity);
+ private Compatibility() {
+ // utility class
}
public static int getDisplayWidth() {
- return level13.getDisplayWidth();
+ return LEVEL_13.getDisplayWidth();
}
public static Point getDisplaySize() {
- return level13.getDisplaySize();
+ return LEVEL_13.getDisplaySize();
}
public static void importGpxFromStorageAccessFramework(final @NonNull Activity activity, int requestCodeImportGpx) {
- level19.importGpxFromStorageAccessFramework(activity, requestCodeImportGpx);
+ LEVEL_19.importGpxFromStorageAccessFramework(activity, requestCodeImportGpx);
}
public static boolean isStorageAccessFrameworkAvailable() {
- return sdkVersion >= 19;
+ return SDK_VERSION >= 19;
}
}
diff --git a/main/src/cgeo/geocaching/concurrent/BlockingThreadPool.java b/main/src/cgeo/geocaching/concurrent/BlockingThreadPool.java
index 8e60d44..a6d7e9b 100644
--- a/main/src/cgeo/geocaching/concurrent/BlockingThreadPool.java
+++ b/main/src/cgeo/geocaching/concurrent/BlockingThreadPool.java
@@ -27,7 +27,7 @@ public class BlockingThreadPool {
*/
public BlockingThreadPool(int poolSize, int priority) {
ThreadFactory threadFactory = new PriorityThreadFactory(priority);
- this.queue = new ArrayBlockingQueue<Runnable>(poolSize, true);
+ this.queue = new ArrayBlockingQueue<>(poolSize, true);
this.executor = new ThreadPoolExecutor(0, poolSize, 5, TimeUnit.SECONDS, this.queue);
this.executor.setThreadFactory(threadFactory);
}
diff --git a/main/src/cgeo/geocaching/connector/AbstractConnector.java b/main/src/cgeo/geocaching/connector/AbstractConnector.java
index 6d8d79e..7e1ca13 100644
--- a/main/src/cgeo/geocaching/connector/AbstractConnector.java
+++ b/main/src/cgeo/geocaching/connector/AbstractConnector.java
@@ -160,7 +160,7 @@ public abstract class AbstractConnector implements IConnector {
@Override
public List<LogType> getPossibleLogTypes(Geocache geocache) {
- final List<LogType> logTypes = new ArrayList<LogType>();
+ final List<LogType> logTypes = new ArrayList<>();
if (geocache.isEventCache()) {
logTypes.add(LogType.WILL_ATTEND);
logTypes.add(LogType.ATTENDED);
@@ -214,7 +214,7 @@ public abstract class AbstractConnector implements IConnector {
@Override
public final Collection<String> getCapabilities() {
- ArrayList<String> list = new ArrayList<String>();
+ ArrayList<String> list = new ArrayList<>();
addCapability(list, ISearchByViewPort.class, R.string.feature_search_live_map);
addCapability(list, ISearchByKeyword.class, R.string.feature_search_keyword);
addCapability(list, ISearchByCenter.class, R.string.feature_search_center);
@@ -281,7 +281,7 @@ public abstract class AbstractConnector implements IConnector {
*/
static @NonNull
public List<UserAction> getDefaultUserActions() {
- final ArrayList<UserAction> actions = new ArrayList<UserAction>();
+ final ArrayList<UserAction> actions = new ArrayList<>();
if (ContactsAddon.isAvailable()) {
actions.add(new UserAction(R.string.user_menu_open_contact, new Action1<UserAction.Context>() {
diff --git a/main/src/cgeo/geocaching/connector/ConnectorFactory.java b/main/src/cgeo/geocaching/connector/ConnectorFactory.java
index 1f23df8..e6ef829 100644
--- a/main/src/cgeo/geocaching/connector/ConnectorFactory.java
+++ b/main/src/cgeo/geocaching/connector/ConnectorFactory.java
@@ -13,7 +13,6 @@ import cgeo.geocaching.connector.capability.ISearchByViewPort;
import cgeo.geocaching.connector.ec.ECConnector;
import cgeo.geocaching.connector.gc.GCConnector;
import cgeo.geocaching.connector.gc.MapTokens;
-import cgeo.geocaching.connector.oc.OCApiConnector;
import cgeo.geocaching.connector.oc.OCApiConnector.ApiSupport;
import cgeo.geocaching.connector.oc.OCApiLiveConnector;
import cgeo.geocaching.connector.oc.OCConnector;
@@ -45,7 +44,9 @@ public final class ConnectorFactory {
R.string.oc_de_okapi_consumer_key, R.string.oc_de_okapi_consumer_secret,
R.string.pref_connectorOCActive, R.string.pref_ocde_tokenpublic, R.string.pref_ocde_tokensecret, ApiSupport.current),
new OCConnector("OpenCaching.CZ", "www.opencaching.cz", "OZ"),
- new OCApiConnector("OpenCaching.CO.UK", "www.opencaching.org.uk", "OK", "arU4okouc4GEjMniE2fq", "CC BY-NC-SA 2.5", ApiSupport.oldapi),
+ new OCApiLiveConnector("opencaching.org.uk", "www.opencaching.org.uk", "OK", "CC BY-NC-SA 2.5",
+ R.string.oc_uk_okapi_consumer_key, R.string.oc_uk_okapi_consumer_secret,
+ R.string.pref_connectorOCUKActive, R.string.pref_ocuk_tokenpublic, R.string.pref_ocuk_tokensecret, ApiSupport.oldapi),
new OCConnector("OpenCaching.ES", "www.opencachingspain.es", "OC"),
new OCConnector("OpenCaching.IT", "www.opencaching.it", "OC"),
new OCConnector("OpenCaching.JP", "www.opencaching.jp", "OJ"),
@@ -88,7 +89,7 @@ public final class ConnectorFactory {
@SuppressWarnings("unchecked")
private static <T extends IConnector> Collection<T> getMatchingConnectors(final Class<T> clazz) {
- final List<T> matching = new ArrayList<T>();
+ final List<T> matching = new ArrayList<>();
for (final IConnector connector : CONNECTORS) {
if (clazz.isInstance(connector)) {
matching.add((T) connector);
@@ -118,7 +119,7 @@ public final class ConnectorFactory {
}
public static ILogin[] getActiveLiveConnectors() {
- final List<ILogin> liveConns = new ArrayList<ILogin>();
+ final List<ILogin> liveConns = new ArrayList<>();
for (final IConnector conn : CONNECTORS) {
if (conn instanceof ILogin && conn.isActive()) {
liveConns.add((ILogin) conn);
@@ -143,16 +144,16 @@ public final class ConnectorFactory {
}
public static @NonNull
- IConnector getConnector(ICache cache) {
+ IConnector getConnector(final ICache cache) {
return getConnector(cache.getGeocode());
}
- public static TrackableConnector getConnector(Trackable trackable) {
+ public static TrackableConnector getConnector(final Trackable trackable) {
return getTrackableConnector(trackable.getGeocode());
}
@NonNull
- public static TrackableConnector getTrackableConnector(String geocode) {
+ public static TrackableConnector getTrackableConnector(final String geocode) {
for (final TrackableConnector connector : TRACKABLE_CONNECTORS) {
if (connector.canHandleTrackable(geocode)) {
return connector;
@@ -188,7 +189,7 @@ public final class ConnectorFactory {
public static SearchResult searchByViewport(final @NonNull Viewport viewport, final MapTokens tokens) {
return SearchResult.parallelCombineActive(searchByViewPortConns, new Func1<ISearchByViewPort, SearchResult>() {
@Override
- public SearchResult call(ISearchByViewPort connector) {
+ public SearchResult call(final ISearchByViewPort connector) {
return connector.searchByViewport(viewport, tokens);
}
});
diff --git a/main/src/cgeo/geocaching/connector/ec/ECApi.java b/main/src/cgeo/geocaching/connector/ec/ECApi.java
index 702e557..421d112 100644
--- a/main/src/cgeo/geocaching/connector/ec/ECApi.java
+++ b/main/src/cgeo/geocaching/connector/ec/ECApi.java
@@ -177,7 +177,7 @@ public class ECApi {
}
final JSONArray json = new JSONArray(data);
final int len = json.length();
- final List<Geocache> caches = new ArrayList<Geocache>(len);
+ final List<Geocache> caches = new ArrayList<>(len);
for (int i = 0; i < len; i++) {
final Geocache cache = parseCache(json.getJSONObject(i));
if (cache != null) {
@@ -205,7 +205,7 @@ public class ECApi {
cache.setTerrain((float) response.getDouble("terrain"));
cache.setSize(CacheSize.getById(response.getString("size")));
cache.setFound(response.getInt("found") == 1);
- DataStore.saveCache(cache, EnumSet.of(SaveFlag.SAVE_CACHE));
+ DataStore.saveCache(cache, EnumSet.of(SaveFlag.CACHE));
} catch (final JSONException e) {
Log.e("ECApi.parseCache", e);
return null;
diff --git a/main/src/cgeo/geocaching/connector/ec/ECConnector.java b/main/src/cgeo/geocaching/connector/ec/ECConnector.java
index 71716fe..a266eee 100644
--- a/main/src/cgeo/geocaching/connector/ec/ECConnector.java
+++ b/main/src/cgeo/geocaching/connector/ec/ECConnector.java
@@ -198,7 +198,7 @@ public class ECConnector extends AbstractConnector implements ISearchByGeocode,
@Override
public List<LogType> getPossibleLogTypes(Geocache geocache) {
- final List<LogType> logTypes = new ArrayList<LogType>();
+ final List<LogType> logTypes = new ArrayList<>();
if (geocache.isEventCache()) {
logTypes.add(LogType.WILL_ATTEND);
logTypes.add(LogType.ATTENDED);
diff --git a/main/src/cgeo/geocaching/connector/gc/GCConnector.java b/main/src/cgeo/geocaching/connector/gc/GCConnector.java
index 925f6f0..294e969 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCConnector.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCConnector.java
@@ -50,7 +50,7 @@ public class GCConnector extends AbstractConnector implements ISearchByGeocode,
private static final String CACHE_URL_SHORT = "http://coord.info/";
// Double slash is used to force open in browser
- private static final String CACHE_URL_LONG = "http://www.geocaching.com//seek/cache_details.aspx?wp=";
+ private static final String CACHE_URL_LONG = "http://www.geocaching.com/seek/cache_details.aspx?wp=";
/**
* Pocket queries downloaded from the website use a numeric prefix. The pocket query creator Android app adds a
* verbatim "pocketquery" prefix.
@@ -192,8 +192,8 @@ public class GCConnector extends AbstractConnector implements ISearchByGeocode,
@Override
public boolean isOwner(final ICache cache) {
- return StringUtils.equalsIgnoreCase(cache.getOwnerUserId(), Settings.getUsername());
-
+ final String user = Settings.getUsername();
+ return StringUtils.isNotEmpty(user) && StringUtils.equalsIgnoreCase(cache.getOwnerUserId(), user);
}
@Override
diff --git a/main/src/cgeo/geocaching/connector/gc/GCConstants.java b/main/src/cgeo/geocaching/connector/gc/GCConstants.java
index 79e570b..7cf43dc 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCConstants.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCConstants.java
@@ -64,6 +64,7 @@ public final class GCConstants {
public final static Pattern PATTERN_INVENTORY = Pattern.compile("<span id=\"ctl00_ContentBody_uxTravelBugList_uxInventoryLabel\">\\W*Inventory[^<]*</span>[^<]*</h3>[^<]*<div class=\"WidgetBody\">([^<]*<ul>(([^<]*<li>[^<]*<a href=\"[^\"]+\"[^>]*>[^<]*<img src=\"[^\"]+\"[^>]*>[^<]*<span>[^<]+<\\/span>[^<]*<\\/a>[^<]*<\\/li>)+)[^<]*<\\/ul>)?");
public final static Pattern PATTERN_INVENTORYINSIDE = Pattern.compile("[^<]*<li>[^<]*<a href=\"[a-z0-9\\-\\_\\.\\?\\/\\:\\@]*\\/track\\/details\\.aspx\\?guid=([0-9a-z\\-]+)[^\"]*\"[^>]*>[^<]*<img src=\"[^\"]+\"[^>]*>[^<]*<span>([^<]+)<\\/span>[^<]*<\\/a>[^<]*<\\/li>");
public final static Pattern PATTERN_WATCHLIST = Pattern.compile(Pattern.quote("watchlist.aspx") + ".{1,50}" + Pattern.quote("action=rem"));
+ public final static Pattern PATTERN_RELATED_WEB_PAGE = Pattern.compile("id=\"ctl00_ContentBody_uxCacheUrl\" title=\"Related Web Page\" href=\"(.*?)\">");
// Info box top-right
public static final Pattern PATTERN_LOGIN_NAME = Pattern.compile("\"SignedInProfileLink\">(.*?)</a>");
diff --git a/main/src/cgeo/geocaching/connector/gc/GCLogin.java b/main/src/cgeo/geocaching/connector/gc/GCLogin.java
index 367c721..e84851e 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCLogin.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCLogin.java
@@ -14,13 +14,18 @@ import cgeo.geocaching.utils.MatcherWrapper;
import cgeo.geocaching.utils.TextUtils;
import ch.boye.httpclientandroidlib.HttpResponse;
+
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
-import android.graphics.drawable.BitmapDrawable;
+import rx.Observable;
+import rx.functions.Func0;
+import rx.util.async.Async;
+
+import android.graphics.drawable.Drawable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@@ -50,7 +55,7 @@ public class GCLogin extends AbstractLogin {
"dd/MM/yyyy"
};
- final Map<String, SimpleDateFormat> map = new HashMap<String, SimpleDateFormat>();
+ final Map<String, SimpleDateFormat> map = new HashMap<>();
for (final String format : formats) {
map.put(format, new SimpleDateFormat(format, Locale.ENGLISH));
@@ -253,7 +258,7 @@ public class GCLogin extends AbstractLogin {
return false;
}
- public BitmapDrawable downloadAvatarAndGetMemberStatus() {
+ public Observable<Drawable> downloadAvatarAndGetMemberStatus() {
try {
final String responseData = StringUtils.defaultString(Network.getResponseData(Network.getRequest("http://www.geocaching.com/my/")));
final String profile = TextUtils.replaceWhitespace(responseData);
@@ -267,8 +272,13 @@ public class GCLogin extends AbstractLogin {
final String avatarURL = TextUtils.getMatch(profile, GCConstants.PATTERN_AVATAR_IMAGE_PROFILE_PAGE, false, null);
if (null != avatarURL) {
- final HtmlImage imgGetter = new HtmlImage("", false, 0, false);
- return imgGetter.getDrawable(avatarURL.replace("avatar", "user/large"));
+ return Async.start(new Func0<Drawable>() {
+ @Override
+ public Drawable call() {
+ final HtmlImage imgGetter = new HtmlImage("", false, 0, false);
+ return imgGetter.getDrawable(avatarURL.replace("avatar", "user/large"));
+ }
+ });
}
// No match? There may be no avatar set by user.
Log.d("No avatar set for user");
diff --git a/main/src/cgeo/geocaching/connector/gc/GCMap.java b/main/src/cgeo/geocaching/connector/gc/GCMap.java
index dc2408f..27ce06e 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCMap.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCMap.java
@@ -15,7 +15,7 @@ import cgeo.geocaching.geopoint.Units;
import cgeo.geocaching.geopoint.Viewport;
import cgeo.geocaching.network.Parameters;
import cgeo.geocaching.settings.Settings;
-import cgeo.geocaching.ui.Formatter;
+import cgeo.geocaching.utils.Formatter;
import cgeo.geocaching.utils.LeastRecentlyUsedMap;
import cgeo.geocaching.utils.Log;
@@ -25,6 +25,9 @@ import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
+import rx.Observable;
+import rx.functions.Func2;
+
import android.graphics.Bitmap;
import java.text.ParseException;
@@ -49,7 +52,7 @@ public class GCMap {
final Parameters params = new Parameters("i", geocodeList, "_", String.valueOf(System.currentTimeMillis()));
params.add("app", "cgeo");
final String referer = GCConstants.URL_LIVE_MAP_DETAILS;
- final String data = StringUtils.defaultString(Tile.requestMapInfo(referer, params, referer));
+ final String data = StringUtils.defaultString(Tile.requestMapInfo(referer, params, referer).toBlocking().first());
// Example JSON information
// {"status":"success",
@@ -71,7 +74,7 @@ public class GCMap {
throw new JSONException("No data inside JSON");
}
- final ArrayList<Geocache> caches = new ArrayList<Geocache>();
+ final ArrayList<Geocache> caches = new ArrayList<>();
for (int j = 0; j < dataArray.length(); j++) {
final Geocache cache = new Geocache();
@@ -119,7 +122,7 @@ public class GCMap {
try {
- final LeastRecentlyUsedMap<String, String> nameCache = new LeastRecentlyUsedMap.LruCache<String, String>(2000); // JSON id, cache name
+ final LeastRecentlyUsedMap<String, String> nameCache = new LeastRecentlyUsedMap.LruCache<>(2000); // JSON id, cache name
if (StringUtils.isEmpty(data)) {
throw new JSONException("No page given");
@@ -146,33 +149,9 @@ public class GCMap {
throw new JSONException("No data inside JSON");
}
- /*
- * Optimization: the grid can get ignored. The keys are the grid position in the format x_y
- * It's not used at the moment due to optimizations
- * But maybe we need it some day...
- *
- * // attach all keys with the cache positions in the tile
- * Map<String, UTFGridPosition> keyPositions = new HashMap<String, UTFGridPosition>(); // JSON key, (x/y) in
- * grid
- * for (int y = 0; y < grid.length(); y++) {
- * String rowUTF8 = grid.getString(y);
- * if (rowUTF8.length() != (UTFGrid.GRID_MAXX + 1)) {
- * throw new JSONException("Grid has wrong size");
- * }
- *
- * for (int x = 0; x < UTFGrid.GRID_MAXX; x++) {
- * char c = rowUTF8.charAt(x);
- * if (c != ' ') {
- * short id = UTFGrid.getUTFGridId(c);
- * keyPositions.put(keys.getString(id), new UTFGridPosition(x, y));
- * }
- * }
- * }
- */
-
// iterate over the data and construct all caches in this tile
- Map<String, List<UTFGridPosition>> positions = new HashMap<String, List<UTFGridPosition>>(); // JSON id as key
- Map<String, List<UTFGridPosition>> singlePositions = new HashMap<String, List<UTFGridPosition>>(); // JSON id as key
+ Map<String, List<UTFGridPosition>> positions = new HashMap<>(); // JSON id as key
+ Map<String, List<UTFGridPosition>> singlePositions = new HashMap<>(); // JSON id as key
for (int i = 1; i < keys.length(); i++) { // index 0 is empty
String key = keys.getString(i);
@@ -188,9 +167,9 @@ public class GCMap {
List<UTFGridPosition> singleListOfPositions = singlePositions.get(id);
if (listOfPositions == null) {
- listOfPositions = new ArrayList<UTFGridPosition>();
+ listOfPositions = new ArrayList<>();
positions.put(id, listOfPositions);
- singleListOfPositions = new ArrayList<UTFGridPosition>();
+ singleListOfPositions = new ArrayList<>();
singlePositions.put(id, singleListOfPositions);
}
@@ -203,7 +182,7 @@ public class GCMap {
}
}
- final ArrayList<Geocache> caches = new ArrayList<Geocache>();
+ final ArrayList<Geocache> caches = new ArrayList<>();
for (Entry<String, List<UTFGridPosition>> entry : positions.entrySet()) {
String id = entry.getKey();
List<UTFGridPosition> pos = entry.getValue();
@@ -289,7 +268,7 @@ public class GCMap {
* Strategy for data retrieval and parsing, @see Strategy
* @return
*/
- private static SearchResult searchByViewport(final Viewport viewport, final MapTokens tokens, Strategy strategy) {
+ private static SearchResult searchByViewport(final Viewport viewport, final MapTokens tokens, final Strategy strategy) {
Log.d("GCMap.searchByViewport" + viewport.toString());
final SearchResult searchResult = new SearchResult();
@@ -305,8 +284,7 @@ public class GCMap {
searchResult.setUrl(new StringBuilder().append(tiles.iterator().next().getZoomLevel()).append(Formatter.SEPARATOR).append(searchResult.getUrl()).toString());
}
- for (Tile tile : tiles) {
-
+ for (final Tile tile : tiles) {
if (!Tile.cache.contains(tile)) {
final Parameters params = new Parameters(
"x", String.valueOf(tile.getX()),
@@ -329,34 +307,37 @@ public class GCMap {
}
// The PNG must be requested first, otherwise the following request would always return with 204 - No Content
- Bitmap bitmap = Tile.requestMapTile(params);
-
- // Check bitmap size
- if (bitmap != null && (bitmap.getWidth() != Tile.TILE_SIZE ||
- bitmap.getHeight() != Tile.TILE_SIZE)) {
- bitmap.recycle();
- bitmap = null;
- }
-
- String data = Tile.requestMapInfo(GCConstants.URL_MAP_INFO, params, GCConstants.URL_LIVE_MAP);
- if (StringUtils.isEmpty(data)) {
- Log.w("GCMap.searchByViewport: No data from server for tile (" + tile.getX() + "/" + tile.getY() + ")");
- } else {
- final SearchResult search = GCMap.parseMapJSON(data, tile, bitmap, strategy);
- if (CollectionUtils.isEmpty(search.getGeocodes())) {
- Log.e("GCMap.searchByViewport: No cache parsed for viewport " + viewport);
+ final Observable<Bitmap> bitmapObs = Tile.requestMapTile(params);
+ final Observable<String> dataObs = Tile.requestMapInfo(GCConstants.URL_MAP_INFO, params, GCConstants.URL_LIVE_MAP);
+ Observable.zip(bitmapObs, dataObs, new Func2<Bitmap, String, Void>() {
+ @Override
+ public Void call(final Bitmap bitmap, final String data) {
+ final boolean validBitmap = bitmap != null && bitmap.getWidth() == Tile.TILE_SIZE && bitmap.getHeight() == Tile.TILE_SIZE;
+
+ if (StringUtils.isEmpty(data)) {
+ Log.w("GCMap.searchByViewport: No data from server for tile (" + tile.getX() + "/" + tile.getY() + ")");
+ } else {
+ final SearchResult search = GCMap.parseMapJSON(data, tile, validBitmap ? bitmap : null, strategy);
+ if (CollectionUtils.isEmpty(search.getGeocodes())) {
+ Log.e("GCMap.searchByViewport: No cache parsed for viewport " + viewport);
+ } else {
+ synchronized (searchResult) {
+ searchResult.addSearchResult(search);
+ }
+ }
+ synchronized (Tile.cache) {
+ Tile.cache.add(tile);
+ }
+ }
+
+ // release native bitmap memory
+ if (bitmap != null) {
+ bitmap.recycle();
+ }
+
+ return null;
}
- else {
- searchResult.addSearchResult(search);
- }
- Tile.cache.add(tile);
- }
-
- // release native bitmap memory
- if (bitmap != null) {
- bitmap.recycle();
- }
-
+ }).toBlocking().single();
}
}
@@ -397,7 +378,7 @@ public class GCMap {
* 8 = mystery, 1858 = whereigo
*/
private static String getCacheTypeFilter(CacheType typeToDisplay) {
- Set<String> filterTypes = new HashSet<String>();
+ Set<String> filterTypes = new HashSet<>();
// Put all types in set, remove what should be visible in a second step
filterTypes.addAll(Arrays.asList("2", "9", "5", "3", "6", "453", "13", "1304", "4", "11", "137", "8", "1858"));
switch (typeToDisplay) {
diff --git a/main/src/cgeo/geocaching/connector/gc/GCParser.java b/main/src/cgeo/geocaching/connector/gc/GCParser.java
index ec3a4bd..60d7856 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCParser.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCParser.java
@@ -32,6 +32,7 @@ import cgeo.geocaching.ui.DirectionImage;
import cgeo.geocaching.utils.CancellableHandler;
import cgeo.geocaching.utils.Log;
import cgeo.geocaching.utils.MatcherWrapper;
+import cgeo.geocaching.utils.RxUtils;
import cgeo.geocaching.utils.SynchronizedDateFormat;
import cgeo.geocaching.utils.TextUtils;
@@ -47,6 +48,13 @@ import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
+import rx.Observable;
+import rx.Observable.OnSubscribe;
+import rx.Subscriber;
+import rx.functions.Action1;
+import rx.functions.Func0;
+import rx.functions.Func2;
+
import android.net.Uri;
import android.text.Html;
@@ -74,7 +82,7 @@ public abstract class GCParser {
return null;
}
- final List<String> cids = new ArrayList<String>();
+ final List<String> cids = new ArrayList<>();
String page = pageContent;
final SearchResult searchResult = new SearchResult();
@@ -121,7 +129,7 @@ public abstract class GCParser {
final int rows_count = rows.length;
int excludedCaches = 0;
- final ArrayList<Geocache> caches = new ArrayList<Geocache>();
+ final ArrayList<Geocache> caches = new ArrayList<>();
for (int z = 1; z < rows_count; z++) {
final Geocache cache = new Geocache();
final String row = rows[z];
@@ -136,7 +144,6 @@ public abstract class GCParser {
while (matcherGuidAndDisabled.find()) {
if (matcherGuidAndDisabled.groupCount() > 0) {
- //cache.setGuid(matcherGuidAndDisabled.group(1));
if (matcherGuidAndDisabled.group(2) != null) {
cache.setName(Html.fromHtml(matcherGuidAndDisabled.group(2).trim()).toString());
}
@@ -335,32 +342,50 @@ public abstract class GCParser {
}
static SearchResult parseCache(final String page, final CancellableHandler handler) {
- final SearchResult searchResult = parseCacheFromText(page, handler);
+ final ImmutablePair<StatusCode, Geocache> parsed = parseCacheFromText(page, handler);
// attention: parseCacheFromText already stores implicitly through searchResult.addCache
- if (searchResult != null && !searchResult.getGeocodes().isEmpty()) {
- final Geocache cache = searchResult.getFirstCacheFromResult(LoadFlags.LOAD_CACHE_OR_DB);
- if (cache == null) {
- return null;
- }
- getExtraOnlineInfo(cache, page, handler);
- // too late: it is already stored through parseCacheFromText
- cache.setDetailedUpdatedNow();
- if (CancellableHandler.isCancelled(handler)) {
- return null;
- }
+ if (parsed.left != StatusCode.NO_ERROR) {
+ return new SearchResult(parsed.left);
+ }
+
+ final Geocache cache = parsed.right;
+ getExtraOnlineInfo(cache, page, handler);
+ // too late: it is already stored through parseCacheFromText
+ cache.setDetailedUpdatedNow();
+ if (CancellableHandler.isCancelled(handler)) {
+ return null;
+ }
- // save full detailed caches
- CancellableHandler.sendLoadProgressDetail(handler, R.string.cache_dialog_loading_details_status_cache);
- DataStore.saveCache(cache, EnumSet.of(SaveFlag.SAVE_DB));
+ // save full detailed caches
+ CancellableHandler.sendLoadProgressDetail(handler, R.string.cache_dialog_loading_details_status_cache);
+ DataStore.saveCache(cache, EnumSet.of(SaveFlag.DB));
- // update progress message so user knows we're still working. This is more of a place holder than
- // actual indication of what the program is doing
- CancellableHandler.sendLoadProgressDetail(handler, R.string.cache_dialog_loading_details_status_render);
+ // update progress message so user knows we're still working. This is more of a place holder than
+ // actual indication of what the program is doing
+ CancellableHandler.sendLoadProgressDetail(handler, R.string.cache_dialog_loading_details_status_render);
+ return new SearchResult(cache);
+ }
+
+ static SearchResult parseAndSaveCacheFromText(final String page, @Nullable final CancellableHandler handler) {
+ final ImmutablePair<StatusCode, Geocache> parsed = parseCacheFromText(page, handler);
+ final SearchResult result = new SearchResult(parsed.left);
+ if (parsed.left == StatusCode.NO_ERROR) {
+ result.addAndPutInCache(Collections.singletonList(parsed.right));
+ DataStore.saveLogsWithoutTransaction(parsed.right.getGeocode(), getLogsFromDetails(page).toBlocking().toIterable());
}
- return searchResult;
+ return result;
}
- static SearchResult parseCacheFromText(final String pageIn, final CancellableHandler handler) {
+ /**
+ * Parse cache from text and return either an error code or a cache object in a pair. Note that inline logs are
+ * not parsed nor saved, while the cache itself is.
+ *
+ * @param pageIn the page text to parse
+ * @param handler the handler to send the progress notifications to
+ * @return a pair, with a {@link StatusCode} on the left, and a non-nulll cache objet on the right
+ * iff the status code is {@link StatusCode.NO_ERROR}.
+ */
+ static private ImmutablePair<StatusCode, Geocache> parseCacheFromText(final String pageIn, @Nullable final CancellableHandler handler) {
CancellableHandler.sendLoadProgressDetail(handler, R.string.cache_dialog_loading_details_status_details);
if (StringUtils.isBlank(pageIn)) {
@@ -368,22 +393,17 @@ public abstract class GCParser {
return null;
}
- final SearchResult searchResult = new SearchResult();
-
if (pageIn.contains(GCConstants.STRING_UNPUBLISHED_OTHER) || pageIn.contains(GCConstants.STRING_UNPUBLISHED_FROM_SEARCH)) {
- searchResult.setError(StatusCode.UNPUBLISHED_CACHE);
- return searchResult;
+ return ImmutablePair.of(StatusCode.UNPUBLISHED_CACHE, null);
}
if (pageIn.contains(GCConstants.STRING_PREMIUMONLY_1) || pageIn.contains(GCConstants.STRING_PREMIUMONLY_2)) {
- searchResult.setError(StatusCode.PREMIUM_ONLY);
- return searchResult;
+ return ImmutablePair.of(StatusCode.PREMIUM_ONLY, null);
}
final String cacheName = Html.fromHtml(TextUtils.getMatch(pageIn, GCConstants.PATTERN_NAME, true, "")).toString();
if (GCConstants.STRING_UNKNOWN_ERROR.equalsIgnoreCase(cacheName)) {
- searchResult.setError(StatusCode.UNKNOWN_ERROR);
- return searchResult;
+ return ImmutablePair.of(StatusCode.UNKNOWN_ERROR, null);
}
// first handle the content with line breaks, then trim everything for easier matching and reduced memory consumption in parsed fields
@@ -524,7 +544,12 @@ public abstract class GCParser {
cache.setShortDescription(TextUtils.getMatch(page, GCConstants.PATTERN_SHORTDESC, true, ""));
// cache description
- cache.setDescription(TextUtils.getMatch(page, GCConstants.PATTERN_DESC, true, ""));
+ final String longDescription = TextUtils.getMatch(page, GCConstants.PATTERN_DESC, true, "");
+ String relatedWebPage = TextUtils.getMatch(page, GCConstants.PATTERN_RELATED_WEB_PAGE, true, "");
+ if (StringUtils.isNotEmpty(relatedWebPage)) {
+ relatedWebPage = String.format("<a href=\"%s\"><b>%s</b></a><br/><br/>", relatedWebPage, relatedWebPage);
+ }
+ cache.setDescription(relatedWebPage + longDescription);
// cache attributes
try {
@@ -532,7 +557,7 @@ public abstract class GCParser {
if (null != attributesPre) {
final MatcherWrapper matcherAttributesInside = new MatcherWrapper(GCConstants.PATTERN_ATTRIBUTESINSIDE, attributesPre);
- final ArrayList<String> attributes = new ArrayList<String>();
+ final ArrayList<String> attributes = new ArrayList<>();
while (matcherAttributesInside.find()) {
if (matcherAttributesInside.groupCount() > 1 && !matcherAttributesInside.group(2).equalsIgnoreCase("blank")) {
// by default, use the tooltip of the attribute
@@ -726,14 +751,11 @@ public abstract class GCParser {
// last check for necessary cache conditions
if (StringUtils.isBlank(cache.getGeocode())) {
- searchResult.setError(StatusCode.UNKNOWN_ERROR);
- return searchResult;
+ return ImmutablePair.of(StatusCode.UNKNOWN_ERROR, null);
}
cache.setDetailedUpdatedNow();
- searchResult.addAndPutInCache(Collections.singletonList(cache));
- DataStore.saveLogsWithoutTransaction(cache.getGeocode(), getLogsFromDetails(page, false));
- return searchResult;
+ return ImmutablePair.of(StatusCode.NO_ERROR, cache);
}
private static String getNumberString(final String numberWithPunctuation) {
@@ -781,7 +803,7 @@ public abstract class GCParser {
}
// search results don't need to be filtered so load GCVote ratings here
- GCVote.loadRatings(new ArrayList<Geocache>(searchResult.getCachesFromSearchResult(LoadFlags.LOAD_CACHE_OR_DB)));
+ GCVote.loadRatings(new ArrayList<>(searchResult.getCachesFromSearchResult(LoadFlags.LOAD_CACHE_OR_DB)));
// save to application
search.setError(searchResult.getError());
@@ -985,7 +1007,7 @@ public abstract class GCParser {
return Collections.emptyList();
}
- List<PocketQueryList> list = new ArrayList<PocketQueryList>();
+ List<PocketQueryList> list = new ArrayList<>();
final MatcherWrapper matcherPocket = new MatcherWrapper(GCConstants.PATTERN_LIST_PQ, subPage);
@@ -1020,12 +1042,12 @@ public abstract class GCParser {
final String log, final List<TrackableLog> trackables) {
if (GCLogin.isEmpty(viewstates)) {
Log.e("GCParser.postLog: No viewstate given");
- return new ImmutablePair<StatusCode, String>(StatusCode.LOG_POST_ERROR, "");
+ return new ImmutablePair<>(StatusCode.LOG_POST_ERROR, "");
}
if (StringUtils.isBlank(log)) {
Log.e("GCParser.postLog: No log text given");
- return new ImmutablePair<StatusCode, String>(StatusCode.NO_LOG_TEXT, "");
+ return new ImmutablePair<>(StatusCode.NO_LOG_TEXT, "");
}
final String logInfo = log.replace("\n", "\r\n").trim(); // windows' eol and remove leading and trailing whitespaces
@@ -1069,10 +1091,11 @@ public abstract class GCParser {
}
final String uri = new Uri.Builder().scheme("http").authority("www.geocaching.com").path("/seek/log.aspx").encodedQuery("ID=" + cacheid).build().toString();
- String page = GCLogin.getInstance().postRequestLogged(uri, params);
- if (!GCLogin.getInstance().getLoginStatus(page)) {
+ final GCLogin gcLogin = GCLogin.getInstance();
+ String page = gcLogin.postRequestLogged(uri, params);
+ if (!gcLogin.getLoginStatus(page)) {
Log.e("GCParser.postLog: Cannot log in geocaching");
- return new ImmutablePair<StatusCode, String>(StatusCode.NOT_LOGGED_IN, "");
+ return new ImmutablePair<>(StatusCode.NOT_LOGGED_IN, "");
}
// maintenance, archived needs to be confirmed
@@ -1085,7 +1108,7 @@ public abstract class GCParser {
if (GCLogin.isEmpty(viewstatesConfirm)) {
Log.e("GCParser.postLog: No viewstate for confirm log");
- return new ImmutablePair<StatusCode, String>(StatusCode.LOG_POST_ERROR, "");
+ return new ImmutablePair<>(StatusCode.LOG_POST_ERROR, "");
}
params.clear();
@@ -1134,22 +1157,22 @@ public abstract class GCParser {
DataStore.saveVisitDate(geocode);
}
- GCLogin.getInstance().getLoginStatus(page);
+ gcLogin.getLoginStatus(page);
// the log-successful-page contains still the old value
- if (GCLogin.getInstance().getActualCachesFound() >= 0) {
- GCLogin.getInstance().setActualCachesFound(GCLogin.getInstance().getActualCachesFound() + 1);
+ if (gcLogin.getActualCachesFound() >= 0) {
+ gcLogin.setActualCachesFound(gcLogin.getActualCachesFound() + 1);
}
final String logID = TextUtils.getMatch(page, GCConstants.PATTERN_LOG_IMAGE_UPLOAD, "");
- return new ImmutablePair<StatusCode, String>(StatusCode.NO_ERROR, logID);
+ return new ImmutablePair<>(StatusCode.NO_ERROR, logID);
}
} catch (final Exception e) {
Log.e("GCParser.postLog.check", e);
}
Log.e("GCParser.postLog: Failed to post log because of unknown error");
- return new ImmutablePair<StatusCode, String>(StatusCode.LOG_POST_ERROR, "");
+ return new ImmutablePair<>(StatusCode.LOG_POST_ERROR, "");
}
/**
@@ -1171,7 +1194,7 @@ public abstract class GCParser {
final String page = GCLogin.getInstance().getRequestLogged(uri, null);
if (StringUtils.isBlank(page)) {
Log.e("GCParser.uploadLogImage: No data from server");
- return new ImmutablePair<StatusCode, String>(StatusCode.UNKNOWN_ERROR, null);
+ return new ImmutablePair<>(StatusCode.UNKNOWN_ERROR, null);
}
assert page != null;
@@ -1619,116 +1642,142 @@ public abstract class GCParser {
*
* @param page
* the text of the details page
- * @param friends
- * return friends logs only (will require a network request)
- * @return a list of log entries or <code>null</code> if the logs could not be retrieved
+ * @return a list of log entries which will be empty if the logs could not be retrieved
*
*/
- @Nullable
- private static List<LogEntry> getLogsFromDetails(final String page, final boolean friends) {
- String rawResponse;
+ @NonNull
+ private static Observable<LogEntry> getLogsFromDetails(final String page) {
+ // extract embedded JSON data from page
+ return parseLogs(false, TextUtils.getMatch(page, GCConstants.PATTERN_LOGBOOK, ""));
+ }
- if (friends) {
- final MatcherWrapper userTokenMatcher = new MatcherWrapper(GCConstants.PATTERN_USERTOKEN, page);
- if (!userTokenMatcher.find()) {
- Log.e("GCParser.loadLogsFromDetails: unable to extract userToken");
- return null;
- }
+ private enum SpecialLogs {
+ FRIENDS("sf"),
+ OWN("sp");
- final String userToken = userTokenMatcher.group(1);
- final Parameters params = new Parameters(
- "tkn", userToken,
- "idx", "1",
- "num", String.valueOf(GCConstants.NUMBER_OF_LOGS),
- "decrypt", "true",
- // "sp", Boolean.toString(personal), // personal logs
- "sf", Boolean.toString(friends));
+ final String paramName;
- final HttpResponse response = Network.getRequest("http://www.geocaching.com/seek/geocache.logbook", params);
- if (response == null) {
- Log.e("GCParser.loadLogsFromDetails: cannot log logs, response is null");
- return null;
- }
- final int statusCode = response.getStatusLine().getStatusCode();
- if (statusCode != 200) {
- Log.e("GCParser.loadLogsFromDetails: error " + statusCode + " when requesting log information");
- return null;
- }
- rawResponse = Network.getResponseData(response);
- if (rawResponse == null) {
- Log.e("GCParser.loadLogsFromDetails: unable to read whole response");
- return null;
- }
- } else {
- // extract embedded JSON data from page
- rawResponse = TextUtils.getMatch(page, GCConstants.PATTERN_LOGBOOK, "");
+ SpecialLogs(String paramName) {
+ this.paramName = paramName;
}
- return parseLogs(friends, rawResponse);
+ private String getParamName() {
+ return this.paramName;
+ }
}
- private static List<LogEntry> parseLogs(final boolean friends, String rawResponse) {
- final List<LogEntry> logs = new ArrayList<LogEntry>();
-
- // for non logged in users the log book is not shown
- if (StringUtils.isBlank(rawResponse)) {
- return logs;
- }
+ /**
+ * Extract special logs (friends, own) through seperate request.
+ *
+ * @param page
+ * The page to extrat userToken from
+ * @param logType
+ * The logType to request
+ * @return Observable<LogEntry> The logs
+ */
+ private static Observable<LogEntry> getSpecialLogs(final String page, final SpecialLogs logType) {
+ return Observable.defer(new Func0<Observable<? extends LogEntry>>() {
+ @Override
+ public Observable<? extends LogEntry> call() {
+ final MatcherWrapper userTokenMatcher = new MatcherWrapper(GCConstants.PATTERN_USERTOKEN, page);
+ if (!userTokenMatcher.find()) {
+ Log.e("GCParser.loadLogsFromDetails: unable to extract userToken");
+ return Observable.empty();
+ }
- try {
- final JSONObject resp = new JSONObject(rawResponse);
- if (!resp.getString("status").equals("success")) {
- Log.e("GCParser.loadLogsFromDetails: status is " + resp.getString("status"));
- return null;
+ final String userToken = userTokenMatcher.group(1);
+ final Parameters params = new Parameters(
+ "tkn", userToken,
+ "idx", "1",
+ "num", String.valueOf(GCConstants.NUMBER_OF_LOGS),
+ logType.getParamName(), Boolean.toString(Boolean.TRUE),
+ "decrypt", "true");
+ final HttpResponse response = Network.getRequest("http://www.geocaching.com/seek/geocache.logbook", params);
+ if (response == null) {
+ Log.e("GCParser.loadLogsFromDetails: cannot log logs, response is null");
+ return Observable.empty();
+ }
+ final int statusCode = response.getStatusLine().getStatusCode();
+ if (statusCode != 200) {
+ Log.e("GCParser.loadLogsFromDetails: error " + statusCode + " when requesting log information");
+ return Observable.empty();
+ }
+ String rawResponse = Network.getResponseData(response);
+ if (rawResponse == null) {
+ Log.e("GCParser.loadLogsFromDetails: unable to read whole response");
+ return Observable.empty();
+ }
+ return parseLogs(true, rawResponse);
}
+ }).subscribeOn(RxUtils.networkScheduler);
+ }
- final JSONArray data = resp.getJSONArray("data");
+ private static Observable<LogEntry> parseLogs(final boolean markAsFriendsLog, final String rawResponse) {
+ return Observable.create(new OnSubscribe<LogEntry>() {
+ @Override
+ public void call(final Subscriber<? super LogEntry> subscriber) {
+ // for non logged in users the log book is not shown
+ if (StringUtils.isBlank(rawResponse)) {
+ subscriber.onCompleted();
+ return;
+ }
- for (int index = 0; index < data.length(); index++) {
- final JSONObject entry = data.getJSONObject(index);
+ try {
+ final JSONObject resp = new JSONObject(rawResponse);
+ if (!resp.getString("status").equals("success")) {
+ Log.e("GCParser.loadLogsFromDetails: status is " + resp.getString("status"));
+ subscriber.onCompleted();
+ return;
+ }
- // FIXME: use the "LogType" field instead of the "LogTypeImage" one.
- final String logIconNameExt = entry.optString("LogTypeImage", ".gif");
- final String logIconName = logIconNameExt.substring(0, logIconNameExt.length() - 4);
+ final JSONArray data = resp.getJSONArray("data");
- long date = 0;
- try {
- date = GCLogin.parseGcCustomDate(entry.getString("Visited")).getTime();
- } catch (final ParseException e) {
- Log.e("GCParser.loadLogsFromDetails: failed to parse log date.");
- }
+ for (int index = 0; index < data.length(); index++) {
+ final JSONObject entry = data.getJSONObject(index);
- // TODO: we should update our log data structure to be able to record
- // proper coordinates, and make them clickable. In the meantime, it is
- // better to integrate those coordinates into the text rather than not
- // display them at all.
- final String latLon = entry.getString("LatLonString");
- final String logText = (StringUtils.isEmpty(latLon) ? "" : (latLon + "<br/><br/>")) + TextUtils.removeControlCharacters(entry.getString("LogText"));
- final LogEntry logDone = new LogEntry(
- TextUtils.removeControlCharacters(entry.getString("UserName")),
- date,
- LogType.getByIconName(logIconName),
- logText);
- logDone.found = entry.getInt("GeocacheFindCount");
- logDone.friend = friends;
-
- final JSONArray images = entry.getJSONArray("Images");
- for (int i = 0; i < images.length(); i++) {
- final JSONObject image = images.getJSONObject(i);
- final String url = "http://imgcdn.geocaching.com/cache/log/large/" + image.getString("FileName");
- final String title = TextUtils.removeControlCharacters(image.getString("Name"));
- final Image logImage = new Image(url, title);
- logDone.addLogImage(logImage);
- }
+ // FIXME: use the "LogType" field instead of the "LogTypeImage" one.
+ final String logIconNameExt = entry.optString("LogTypeImage", ".gif");
+ final String logIconName = logIconNameExt.substring(0, logIconNameExt.length() - 4);
- logs.add(logDone);
- }
- } catch (final JSONException e) {
- // failed to parse logs
- Log.w("GCParser.loadLogsFromDetails: Failed to parse cache logs", e);
- }
+ long date = 0;
+ try {
+ date = GCLogin.parseGcCustomDate(entry.getString("Visited")).getTime();
+ } catch (final ParseException e) {
+ Log.e("GCParser.loadLogsFromDetails: failed to parse log date.");
+ }
+
+ // TODO: we should update our log data structure to be able to record
+ // proper coordinates, and make them clickable. In the meantime, it is
+ // better to integrate those coordinates into the text rather than not
+ // display them at all.
+ final String latLon = entry.getString("LatLonString");
+ final String logText = (StringUtils.isEmpty(latLon) ? "" : (latLon + "<br/><br/>")) + TextUtils.removeControlCharacters(entry.getString("LogText"));
+ final LogEntry logDone = new LogEntry(
+ TextUtils.removeControlCharacters(entry.getString("UserName")),
+ date,
+ LogType.getByIconName(logIconName),
+ logText);
+ logDone.found = entry.getInt("GeocacheFindCount");
+ logDone.friend = markAsFriendsLog;
+
+ final JSONArray images = entry.getJSONArray("Images");
+ for (int i = 0; i < images.length(); i++) {
+ final JSONObject image = images.getJSONObject(i);
+ final String url = "http://imgcdn.geocaching.com/cache/log/large/" + image.getString("FileName");
+ final String title = TextUtils.removeControlCharacters(image.getString("Name"));
+ final Image logImage = new Image(url, title);
+ logDone.addLogImage(logImage);
+ }
- return logs;
+ subscriber.onNext(logDone);
+ }
+ } catch (final JSONException e) {
+ // failed to parse logs
+ Log.w("GCParser.loadLogsFromDetails: Failed to parse cache logs", e);
+ }
+ subscriber.onCompleted();
+ }
+ });
}
@NonNull
@@ -1737,7 +1786,7 @@ public abstract class GCParser {
return Collections.emptyList();
}
- final List<LogType> types = new ArrayList<LogType>();
+ final List<LogType> types = new ArrayList<>();
final MatcherWrapper typeBoxMatcher = new MatcherWrapper(GCConstants.PATTERN_TYPEBOX, page);
if (typeBoxMatcher.find() && typeBoxMatcher.groupCount() > 0) {
@@ -1781,7 +1830,7 @@ public abstract class GCParser {
return null;
}
- final List<TrackableLog> trackableLogs = new ArrayList<TrackableLog>();
+ final List<TrackableLog> trackableLogs = new ArrayList<>();
final MatcherWrapper trackableMatcher = new MatcherWrapper(GCConstants.PATTERN_TRACKABLE, page);
while (trackableMatcher.find()) {
@@ -1820,32 +1869,39 @@ public abstract class GCParser {
}
private static void getExtraOnlineInfo(final Geocache cache, final String page, final CancellableHandler handler) {
+ // This method starts the page parsing for logs in the background, as well as retrieve the friends and own logs
+ // if requested. It merges them and stores them in the background, while the rating is retrieved if needed and
+ // stored. Then we wait for the log merging and saving to be completed before returning.
if (CancellableHandler.isCancelled(handler)) {
return;
}
- //cache.setLogs(loadLogsFromDetails(page, cache, false));
+ final Observable<LogEntry> logs = getLogsFromDetails(page).subscribeOn(RxUtils.computationScheduler);
+ Observable<LogEntry> specialLogs;
if (Settings.isFriendLogsWanted()) {
CancellableHandler.sendLoadProgressDetail(handler, R.string.cache_dialog_loading_details_status_logs);
- final List<LogEntry> friendLogs = getLogsFromDetails(page, true);
- if (friendLogs != null && !friendLogs.isEmpty()) {
- // create new list, as the existing log list is immutable
- ArrayList<LogEntry> mergedLogs = new ArrayList<LogEntry>(cache.getLogs());
- for (final LogEntry log : friendLogs) {
- if (mergedLogs.contains(log)) {
- mergedLogs.get(mergedLogs.indexOf(log)).friend = true;
- } else {
- mergedLogs.add(log);
+ specialLogs = Observable.merge(getSpecialLogs(page, SpecialLogs.FRIENDS),
+ getSpecialLogs(page, SpecialLogs.OWN));
+ } else {
+ CancellableHandler.sendLoadProgressDetail(handler, R.string.cache_dialog_loading_details_status_logs);
+ specialLogs = Observable.empty();
+ }
+ final Observable<List<LogEntry>> mergedLogs = Observable.zip(logs.toList(), specialLogs.toList(),
+ new Func2<List<LogEntry>, List<LogEntry>, List<LogEntry>>() {
+ @Override
+ public List<LogEntry> call(final List<LogEntry> logEntries, final List<LogEntry> specialLogEntries) {
+ mergeFriendsLogs(logEntries, specialLogEntries);
+ return logEntries;
}
- }
- DataStore.saveLogsWithoutTransaction(cache.getGeocode(), mergedLogs);
- }
- }
-
- if (Settings.isRatingWanted()) {
- if (CancellableHandler.isCancelled(handler)) {
- return;
- }
+ }).cache();
+ mergedLogs.subscribe(new Action1<List<LogEntry>>() {
+ @Override
+ public void call(final List<LogEntry> logEntries) {
+ DataStore.saveLogsWithoutTransaction(cache.getGeocode(), logEntries);
+ }
+ });
+
+ if (Settings.isRatingWanted() && !CancellableHandler.isCancelled(handler)) {
CancellableHandler.sendLoadProgressDetail(handler, R.string.cache_dialog_loading_details_status_gcvote);
final GCVoteRating rating = GCVote.getRating(cache.getGuid(), cache.getGeocode());
if (rating != null) {
@@ -1854,6 +1910,28 @@ public abstract class GCParser {
cache.setMyVote(rating.getMyVote());
}
}
+
+ // Wait for completion of logs parsing, retrieving and merging
+ mergedLogs.toBlocking().last();
+ }
+
+ /**
+ * Merge log entries and mark them as friends logs (personal and friends) to identify
+ * them on friends/personal logs tab.
+ *
+ * @param mergedLogs
+ * the list to merge logs with
+ * @param logsToMerge
+ * the list of logs to merge
+ */
+ private static void mergeFriendsLogs(final List<LogEntry> mergedLogs, final Iterable<LogEntry> logsToMerge) {
+ for (final LogEntry log : logsToMerge) {
+ if (mergedLogs.contains(log)) {
+ mergedLogs.get(mergedLogs.indexOf(log)).friend = true;
+ } else {
+ mergedLogs.add(log);
+ }
+ }
}
public static boolean uploadModifiedCoordinates(Geocache cache, Geopoint wpt) {
diff --git a/main/src/cgeo/geocaching/connector/gc/IconDecoder.java b/main/src/cgeo/geocaching/connector/gc/IconDecoder.java
index c7b470a..c6a2afc 100644
--- a/main/src/cgeo/geocaching/connector/gc/IconDecoder.java
+++ b/main/src/cgeo/geocaching/connector/gc/IconDecoder.java
@@ -35,7 +35,7 @@ public abstract class IconDecoder {
return false; //out of image position
}
- int numberOfDetections = 7; //for level 12 and 13;
+ int numberOfDetections = 7; //for level 12 and 13
if (zoomlevel < 12) {
numberOfDetections = 5;
}
diff --git a/main/src/cgeo/geocaching/connector/gc/RecaptchaHandler.java b/main/src/cgeo/geocaching/connector/gc/RecaptchaHandler.java
index 7cced74..6095514 100644
--- a/main/src/cgeo/geocaching/connector/gc/RecaptchaHandler.java
+++ b/main/src/cgeo/geocaching/connector/gc/RecaptchaHandler.java
@@ -1,17 +1,21 @@
package cgeo.geocaching.connector.gc;
+import butterknife.ButterKnife;
+
import cgeo.geocaching.R;
import cgeo.geocaching.loaders.RecaptchaReceiver;
import cgeo.geocaching.network.Network;
import cgeo.geocaching.utils.Log;
+import cgeo.geocaching.utils.RxUtils;
import org.apache.commons.io.IOUtils;
+
import rx.Observable;
import rx.android.observables.AndroidObservable;
import rx.functions.Action1;
import rx.functions.Func0;
-import rx.schedulers.Schedulers;
+import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
@@ -57,7 +61,7 @@ public class RecaptchaHandler extends Handler {
return Observable.empty();
}
});
- AndroidObservable.bindActivity(activity, captcha).subscribe(new Action1<Bitmap>() {
+ AndroidObservable.bindActivity(activity, captcha).subscribeOn(RxUtils.networkScheduler).subscribe(new Action1<Bitmap>() {
@Override
public void call(final Bitmap bitmap) {
imageView.setImageBitmap(bitmap);
@@ -67,23 +71,24 @@ public class RecaptchaHandler extends Handler {
public void call(final Throwable throwable) {
// Do nothing
}
- }, Schedulers.io());
+ });
reloadButton.setEnabled(true);
}
+ @SuppressLint("InflateParams")
@Override
- public void handleMessage(Message msg) {
+ public void handleMessage(final Message msg) {
if (msg.what == SHOW_CAPTCHA) {
final AlertDialog.Builder dlg = new AlertDialog.Builder(activity);
- final View view = activity.getLayoutInflater().inflate(R.layout.recaptcha_dialog, null);
+ final View view = activity.getLayoutInflater().inflate(R.layout.recaptcha_dialog, null, false);
- final ImageView imageView = (ImageView) view.findViewById(R.id.image);
+ final ImageView imageView = ButterKnife.findById(view, R.id.image);
- final ImageButton reloadButton = (ImageButton) view.findViewById(R.id.button_recaptcha_refresh);
+ final ImageButton reloadButton = ButterKnife.findById(view, R.id.button_recaptcha_refresh);
reloadButton.setEnabled(false);
reloadButton.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View v) {
+ public void onClick(final View v) {
recaptchaReceiver.fetchChallenge();
loadChallenge(imageView, reloadButton);
}
@@ -95,8 +100,9 @@ public class RecaptchaHandler extends Handler {
dlg.setView(view);
dlg.setNeutralButton(activity.getString(R.string.caches_recaptcha_continue), new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int id) {
- final String text = ((EditText) view.findViewById(R.id.text)).getText().toString();
+ public void onClick(final DialogInterface dialog, final int id) {
+ final EditText editText = ButterKnife.findById(view, R.id.text);
+ final String text = editText.getText().toString();
recaptchaReceiver.setText(text);
dialog.cancel();
}
diff --git a/main/src/cgeo/geocaching/connector/gc/Tile.java b/main/src/cgeo/geocaching/connector/gc/Tile.java
index ca70111..18fe65c 100644
--- a/main/src/cgeo/geocaching/connector/gc/Tile.java
+++ b/main/src/cgeo/geocaching/connector/gc/Tile.java
@@ -7,10 +7,16 @@ import cgeo.geocaching.network.Network;
import cgeo.geocaching.network.Parameters;
import cgeo.geocaching.utils.LeastRecentlyUsedSet;
import cgeo.geocaching.utils.Log;
+import cgeo.geocaching.utils.RxUtils;
import ch.boye.httpclientandroidlib.HttpResponse;
+
import org.eclipse.jdt.annotation.NonNull;
+import rx.Observable;
+import rx.functions.Func0;
+import rx.util.async.Async;
+
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
@@ -88,10 +94,6 @@ public class Tile {
*
*/
private static int calcY(final Geopoint origin, final int zoomlevel) {
-
- // double latRad = Math.toRadians(origin.getLatitude());
- // return (int) ((1 - (Math.log(Math.tan(latRad) + (1 / Math.cos(latRad))) / Math.PI)) / 2 * numberOfTiles);
-
// Optimization from Bing
double sinLatRad = Math.sin(Math.toRadians(origin.getLatitude()));
// The cut of the fractional part instead of rounding to the nearest integer is intentional and part of the algorithm
@@ -231,20 +233,39 @@ public class Tile {
return toString().hashCode();
}
- /** Request JSON informations for a tile */
- public static String requestMapInfo(final String url, final Parameters params, final String referer) {
- return Network.getResponseData(Network.getRequest(url, params, new Parameters("Referer", referer)));
+ /** Request JSON informations for a tile. Return as soon as the request has been made, before the answer has been
+ * read.
+ *
+ * @return An observable with one element, which may be <tt>null</tt>.
+ */
+ public static Observable<String> requestMapInfo(final String url, final Parameters params, final String referer) {
+ final HttpResponse response = Network.getRequest(url, params, new Parameters("Referer", referer));
+ return Async.start(new Func0<String>() {
+ @Override
+ public String call() {
+ return Network.getResponseData(response);
+ }
+ }, RxUtils.networkScheduler);
}
- /** Request .png image for a tile. */
- public static Bitmap requestMapTile(final Parameters params) {
+ /** Request .png image for a tile. Return as soon as the request has been made, before the answer has been
+ * read and processed.
+ *
+ * @return An observable with one element, which may be <tt>null</tt>.
+ */
+ public static Observable<Bitmap> requestMapTile(final Parameters params) {
final HttpResponse response = Network.getRequest(GCConstants.URL_MAP_TILE, params, new Parameters("Referer", GCConstants.URL_LIVE_MAP));
- try {
- return response != null ? BitmapFactory.decodeStream(response.getEntity().getContent()) : null;
- } catch (IOException e) {
- Log.e("Tile.requestMapTile() ", e);
- }
- return null;
+ return Async.start(new Func0<Bitmap>() {
+ @Override
+ public Bitmap call() {
+ try {
+ return response != null ? BitmapFactory.decodeStream(response.getEntity().getContent()) : null;
+ } catch (IOException e) {
+ Log.e("Tile.requestMapTile() ", e);
+ return null;
+ }
+ }
+ }, RxUtils.computationScheduler);
}
public boolean containsPoint(final @NonNull ICoordinates point) {
@@ -277,7 +298,7 @@ public class Tile {
* @return
*/
protected static Set<Tile> getTilesForViewport(final Viewport viewport, final int tilesOnAxis, final int minZoom) {
- Set<Tile> tiles = new HashSet<Tile>();
+ Set<Tile> tiles = new HashSet<>();
int zoom = Math.max(
Math.min(Tile.calcZoomLon(viewport.bottomLeft, viewport.topRight, tilesOnAxis),
Tile.calcZoomLat(viewport.bottomLeft, viewport.topRight, tilesOnAxis)),
@@ -310,7 +331,7 @@ public class Tile {
}
public void removeFromTileCache(@NonNull final ICoordinates point) {
- for (final Tile tile : new ArrayList<Tile>(this)) {
+ for (final Tile tile : new ArrayList<>(this)) {
if (tile.containsPoint(point)) {
remove(tile);
}
diff --git a/main/src/cgeo/geocaching/utils/UncertainProperty.java b/main/src/cgeo/geocaching/connector/gc/UncertainProperty.java
index e8686e3..71adcbd 100644
--- a/main/src/cgeo/geocaching/utils/UncertainProperty.java
+++ b/main/src/cgeo/geocaching/connector/gc/UncertainProperty.java
@@ -1,6 +1,5 @@
-package cgeo.geocaching.utils;
+package cgeo.geocaching.connector.gc;
-import cgeo.geocaching.connector.gc.Tile;
/**
* Property with certainty. When merging properties, the one with higher certainty wins.
diff --git a/main/src/cgeo/geocaching/connector/oc/OCApiLiveConnector.java b/main/src/cgeo/geocaching/connector/oc/OCApiLiveConnector.java
index 049c633..dd25c5e 100644
--- a/main/src/cgeo/geocaching/connector/oc/OCApiLiveConnector.java
+++ b/main/src/cgeo/geocaching/connector/oc/OCApiLiveConnector.java
@@ -3,6 +3,7 @@ package cgeo.geocaching.connector.oc;
import cgeo.geocaching.CgeoApplication;
import cgeo.geocaching.DataStore;
import cgeo.geocaching.Geocache;
+import cgeo.geocaching.ICache;
import cgeo.geocaching.LogCacheActivity;
import cgeo.geocaching.SearchResult;
import cgeo.geocaching.connector.ILoggingManager;
@@ -34,7 +35,7 @@ public class OCApiLiveConnector extends OCApiConnector implements ISearchByCente
private final int tokenSecretPrefKeyId;
private UserInfo userInfo = new UserInfo(StringUtils.EMPTY, 0, UserInfoStatus.NOT_RETRIEVED);
- public OCApiLiveConnector(String name, String host, String prefix, String licenseString, int cKResId, int cSResId, int isActivePrefKeyId, int tokenPublicPrefKeyId, int tokenSecretPrefKeyId, ApiSupport apiSupport) {
+ public OCApiLiveConnector(final String name, final String host, final String prefix, final String licenseString, final int cKResId, final int cSResId, final int isActivePrefKeyId, final int tokenPublicPrefKeyId, final int tokenSecretPrefKeyId, final ApiSupport apiSupport) {
super(name, host, prefix, CryptUtils.rot13(CgeoApplication.getInstance().getResources().getString(cKResId)), licenseString, apiSupport);
cS = CryptUtils.rot13(CgeoApplication.getInstance().getResources().getString(cSResId));
@@ -49,22 +50,22 @@ public class OCApiLiveConnector extends OCApiConnector implements ISearchByCente
}
@Override
- public SearchResult searchByViewport(@NonNull Viewport viewport, MapTokens tokens) {
+ public SearchResult searchByViewport(@NonNull final Viewport viewport, final MapTokens tokens) {
return new SearchResult(OkapiClient.getCachesBBox(viewport, this));
}
@Override
- public SearchResult searchByCenter(@NonNull Geopoint center, final @NonNull RecaptchaReceiver recaptchaReceiver) {
+ public SearchResult searchByCenter(@NonNull final Geopoint center, final @NonNull RecaptchaReceiver recaptchaReceiver) {
return new SearchResult(OkapiClient.getCachesAround(center, this));
}
@Override
- public SearchResult searchByOwner(@NonNull String username, final @NonNull RecaptchaReceiver recaptchaReceiver) {
+ public SearchResult searchByOwner(@NonNull final String username, final @NonNull RecaptchaReceiver recaptchaReceiver) {
return new SearchResult(OkapiClient.getCachesByOwner(username, this));
}
@Override
- public SearchResult searchByFinder(@NonNull String username, final @NonNull RecaptchaReceiver recaptchaReceiver) {
+ public SearchResult searchByFinder(@NonNull final String username, final @NonNull RecaptchaReceiver recaptchaReceiver) {
return new SearchResult(OkapiClient.getCachesByFinder(username, this));
}
@@ -94,11 +95,11 @@ public class OCApiLiveConnector extends OCApiConnector implements ISearchByCente
@Override
public boolean supportsWatchList() {
- return true;
+ return ApiSupport.current == getApiSupport();
}
@Override
- public boolean addToWatchlist(Geocache cache) {
+ public boolean addToWatchlist(final Geocache cache) {
final boolean added = OkapiClient.setWatchState(cache, true, this);
if (added) {
@@ -109,7 +110,7 @@ public class OCApiLiveConnector extends OCApiConnector implements ISearchByCente
}
@Override
- public boolean removeFromWatchlist(Geocache cache) {
+ public boolean removeFromWatchlist(final Geocache cache) {
final boolean removed = OkapiClient.setWatchState(cache, false, this);
if (removed) {
@@ -130,7 +131,7 @@ public class OCApiLiveConnector extends OCApiConnector implements ISearchByCente
}
@Override
- public boolean canLog(Geocache cache) {
+ public boolean canLog(final Geocache cache) {
return true;
}
@@ -139,7 +140,7 @@ public class OCApiLiveConnector extends OCApiConnector implements ISearchByCente
}
@Override
- public boolean login(Handler handler, Context fromActivity) {
+ public boolean login(final Handler handler, final Context fromActivity) {
if (supportsPersonalization()) {
userInfo = OkapiClient.getUserInfo(this);
} else {
@@ -149,6 +150,11 @@ public class OCApiLiveConnector extends OCApiConnector implements ISearchByCente
}
@Override
+ public boolean isOwner(final ICache cache) {
+ return StringUtils.isNotEmpty(getUserName()) && StringUtils.equals(cache.getOwnerDisplayName(), getUserName());
+ }
+
+ @Override
public String getUserName() {
return userInfo.getName();
}
@@ -175,7 +181,7 @@ public class OCApiLiveConnector extends OCApiConnector implements ISearchByCente
}
@Override
- public boolean isSearchForMyCaches(String username) {
+ public boolean isSearchForMyCaches(final String username) {
return StringUtils.equalsIgnoreCase(username, getUserName());
}
diff --git a/main/src/cgeo/geocaching/connector/oc/OCAuthParams.java b/main/src/cgeo/geocaching/connector/oc/OCAuthParams.java
index 131ddad..a1030f0 100644
--- a/main/src/cgeo/geocaching/connector/oc/OCAuthParams.java
+++ b/main/src/cgeo/geocaching/connector/oc/OCAuthParams.java
@@ -31,14 +31,18 @@ public class OCAuthParams extends OAuthParameters {
R.string.oc_ro_okapi_consumer_key, R.string.oc_ro_okapi_consumer_secret, "callback://www.cgeo.org/opencaching.ro/",
R.string.auth_ocro, R.string.pref_ocro_tokenpublic, R.string.pref_ocro_tokensecret, R.string.pref_temp_ocro_token_public, R.string.pref_temp_ocro_token_secret);
+ public static final OCAuthParams OC_UK_AUTH_PARAMS = new OCAuthParams("www.opencaching.org.uk", false,
+ R.string.oc_uk_okapi_consumer_key, R.string.oc_uk_okapi_consumer_secret, "callback://www.cgeo.org/opencaching.org.uk/",
+ R.string.auth_ocuk, R.string.pref_ocuk_tokenpublic, R.string.pref_ocuk_tokensecret, R.string.pref_temp_ocuk_token_public, R.string.pref_temp_ocuk_token_secret);
+
public final int authTitleResId;
public final int tokenPublicPrefKey;
public final int tokenSecretPrefKey;
public final int tempTokenPublicPrefKey;
public final int tempTokenSecretPrefKey;
- public OCAuthParams(@NonNull String host, boolean https, int consumerKeyResId, int consumerSecretResId, @NonNull String callback,
- int authTitleResId, int tokenPublicPrefKey, int tokenSecretPrefKey, int tempTokePublicPrefKey, int tempTokenSecretPrefKey) {
+ public OCAuthParams(@NonNull final String host, final boolean https, final int consumerKeyResId, final int consumerSecretResId, @NonNull final String callback,
+ final int authTitleResId, final int tokenPublicPrefKey, final int tokenSecretPrefKey, final int tempTokePublicPrefKey, final int tempTokenSecretPrefKey) {
super(host, "/okapi/services/oauth/request_token",
"/okapi/services/oauth/authorize",
"/okapi/services/oauth/access_token",
@@ -54,7 +58,7 @@ public class OCAuthParams extends OAuthParameters {
}
@Override
- public void setOAuthExtras(Intent intent) {
+ public void setOAuthExtras(final Intent intent) {
super.setOAuthExtras(intent);
if (intent != null) {
diff --git a/main/src/cgeo/geocaching/connector/oc/OkapiClient.java b/main/src/cgeo/geocaching/connector/oc/OkapiClient.java
index 3c93488..3df62aa 100644
--- a/main/src/cgeo/geocaching/connector/oc/OkapiClient.java
+++ b/main/src/cgeo/geocaching/connector/oc/OkapiClient.java
@@ -6,6 +6,7 @@ import cgeo.geocaching.Geocache;
import cgeo.geocaching.Image;
import cgeo.geocaching.LogEntry;
import cgeo.geocaching.R;
+import cgeo.geocaching.Trackable;
import cgeo.geocaching.Waypoint;
import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.connector.IConnector;
@@ -79,6 +80,7 @@ final class OkapiClient {
private static final String CACHE_VOTES = "rating_votes";
private static final String CACHE_NOTFOUNDS = "notfounds";
private static final String CACHE_FOUNDS = "founds";
+ private static final String CACHE_WILLATTENDS = "willattends";
private static final String CACHE_HIDDEN = "date_hidden";
private static final String CACHE_LATEST_LOGS = "latest_logs";
private static final String CACHE_IMAGE_URL = "url";
@@ -98,6 +100,11 @@ final class OkapiClient {
private static final String CACHE_CODE = "code";
private static final String CACHE_REQ_PASSWORD = "req_passwd";
private static final String CACHE_MY_NOTES = "my_notes";
+ private static final String CACHE_TRACKABLES_COUNT = "trackables_count";
+ private static final String CACHE_TRACKABLES = "trackables";
+
+ private static final String TRK_GEOCODE = "code";
+ private static final String TRK_NAME = "name";
private static final String LOG_TYPE = "type";
private static final String LOG_COMMENT = "comment";
@@ -112,11 +119,12 @@ final class OkapiClient {
// the several realms of possible fields for cache retrieval:
// Core: for livemap requests (L3 - only with level 3 auth)
// Additional: additional fields for full cache (L3 - only for level 3 auth, current - only for connectors with current api)
- private static final String SERVICE_CACHE_CORE_FIELDS = "code|name|location|type|status|difficulty|terrain|size|size2|date_hidden";
+ private static final String SERVICE_CACHE_CORE_FIELDS = "code|name|location|type|status|difficulty|terrain|size|size2|date_hidden|trackables_count";
private static final String SERVICE_CACHE_CORE_L3_FIELDS = "is_found";
- private static final String SERVICE_CACHE_ADDITIONAL_FIELDS = "owner|founds|notfounds|rating|rating_votes|recommendations|description|hint|images|latest_logs|alt_wpts|attrnames|req_passwd";
- private static final String SERVICE_CACHE_ADDITIONAL_CURRENT_FIELDS = "gc_code|attribution_note|attr_acodes";
- private static final String SERVICE_CACHE_ADDITIONAL_L3_FIELDS = "is_watched|my_notes";
+ private static final String SERVICE_CACHE_ADDITIONAL_FIELDS = "owner|founds|notfounds|rating|rating_votes|recommendations|description|hint|images|latest_logs|alt_wpts|attrnames|req_passwd|trackables";
+ private static final String SERVICE_CACHE_ADDITIONAL_CURRENT_FIELDS = "gc_code|attribution_note|attr_acodes|willattends";
+ private static final String SERVICE_CACHE_ADDITIONAL_L3_FIELDS = "my_notes";
+ private static final String SERVICE_CACHE_ADDITIONAL_CURRENT_L3_FIELDS = "is_watched";
private static final String METHOD_SEARCH_ALL = "services/caches/search/all";
private static final String METHOD_SEARCH_BBOX = "services/caches/search/bbox";
@@ -143,7 +151,7 @@ final class OkapiClient {
public static List<Geocache> getCachesAround(final Geopoint center, final OCApiConnector connector) {
final String centerString = GeopointFormatter.format(GeopointFormatter.Format.LAT_DECDEGREE_RAW, center) + SEPARATOR + GeopointFormatter.format(GeopointFormatter.Format.LON_DECDEGREE_RAW, center);
final Parameters params = new Parameters("search_method", METHOD_SEARCH_NEAREST);
- final Map<String, String> valueMap = new LinkedHashMap<String, String>();
+ final Map<String, String> valueMap = new LinkedHashMap<>();
valueMap.put("center", centerString);
valueMap.put("limit", "20");
valueMap.put("radius", "200");
@@ -161,7 +169,7 @@ final class OkapiClient {
private static List<Geocache> getCachesByUser(final String username, final OCApiConnector connector, final String userRequestParam) {
final Parameters params = new Parameters("search_method", METHOD_SEARCH_ALL);
- final Map<String, String> valueMap = new LinkedHashMap<String, String>();
+ final Map<String, String> valueMap = new LinkedHashMap<>();
final @Nullable
String uuid = getUserUUID(connector, username);
if (StringUtils.isEmpty(uuid)) {
@@ -173,7 +181,7 @@ final class OkapiClient {
}
public static List<Geocache> getCachesNamed(final Geopoint center, final String namePart, final OCApiConnector connector) {
- final Map<String, String> valueMap = new LinkedHashMap<String, String>();
+ final Map<String, String> valueMap = new LinkedHashMap<>();
final Parameters params;
// search around current position, if there is a position
@@ -226,7 +234,7 @@ final class OkapiClient {
+ SEPARATOR + GeopointFormatter.format(GeopointFormatter.Format.LAT_DECDEGREE_RAW, viewport.topRight)
+ SEPARATOR + GeopointFormatter.format(GeopointFormatter.Format.LON_DECDEGREE_RAW, viewport.topRight);
final Parameters params = new Parameters("search_method", METHOD_SEARCH_BBOX);
- final Map<String, String> valueMap = new LinkedHashMap<String, String>();
+ final Map<String, String> valueMap = new LinkedHashMap<>();
valueMap.put("bbox", bboxString);
return requestCaches(connector, params, valueMap, false);
@@ -289,14 +297,15 @@ final class OkapiClient {
// Get and iterate result list
final JSONObject cachesResponse = response.getJSONObject("results");
if (cachesResponse != null) {
- final List<Geocache> caches = new ArrayList<Geocache>(cachesResponse.length());
- @SuppressWarnings("unchecked")
- final
- Iterator<String> keys = cachesResponse.keys();
+ final List<Geocache> caches = new ArrayList<>(cachesResponse.length());
+ final Iterator<?> keys = cachesResponse.keys();
while (keys.hasNext()) {
- final String key = keys.next();
- final Geocache cache = parseSmallCache(cachesResponse.getJSONObject(key));
- caches.add(cache);
+ final Object next = keys.next();
+ if (next instanceof String) {
+ final String key = (String) next;
+ final Geocache cache = parseSmallCache(cachesResponse.getJSONObject(key));
+ caches.add(cache);
+ }
}
return caches;
}
@@ -313,7 +322,7 @@ final class OkapiClient {
parseCoreCache(response, cache);
- DataStore.saveCache(cache, EnumSet.of(SaveFlag.SAVE_CACHE));
+ DataStore.saveCache(cache, EnumSet.of(SaveFlag.CACHE));
} catch (final JSONException e) {
Log.e("OkapiClient.parseSmallCache", e);
}
@@ -328,11 +337,16 @@ final class OkapiClient {
parseCoreCache(response, cache);
// not used: url
- final JSONObject owner = response.getJSONObject(CACHE_OWNER);
- cache.setOwnerDisplayName(parseUser(owner));
+ final JSONObject ownerObject = response.getJSONObject(CACHE_OWNER);
+ final String owner = parseUser(ownerObject);
+ cache.setOwnerDisplayName(owner);
+ // OpenCaching has no distinction between user id and user display name. Set the ID anyway to simplify c:geo workflows.
+ cache.setOwnerUserId(owner);
cache.getLogCounts().put(LogType.FOUND_IT, response.getInt(CACHE_FOUNDS));
cache.getLogCounts().put(LogType.DIDNT_FIND_IT, response.getInt(CACHE_NOTFOUNDS));
+ // only current Api
+ cache.getLogCounts().put(LogType.WILL_ATTEND, response.optInt(CACHE_WILLATTENDS));
if (!response.isNull(CACHE_RATING)) {
cache.setRating((float) response.getDouble(CACHE_RATING));
@@ -375,6 +389,9 @@ final class OkapiClient {
//TODO: Store license per cache
//cache.setLicense(response.getString("attribution_note"));
cache.setWaypoints(parseWaypoints(response.getJSONArray(CACHE_WPTS)), false);
+
+ cache.setInventory(parseTrackables(response.getJSONArray(CACHE_TRACKABLES)));
+
if (!response.isNull(CACHE_IS_WATCHED)) {
cache.setOnWatchlist(response.getBoolean(CACHE_IS_WATCHED));
}
@@ -386,7 +403,7 @@ final class OkapiClient {
cache.setDetailedUpdatedNow();
// save full detailed caches
- DataStore.saveCache(cache, EnumSet.of(SaveFlag.SAVE_DB));
+ DataStore.saveCache(cache, EnumSet.of(SaveFlag.DB));
DataStore.saveLogsWithoutTransaction(cache.getGeocode(), parseLogs(response.getJSONArray(CACHE_LATEST_LOGS)));
} catch (final JSONException e) {
Log.e("OkapiClient.parseCache", e);
@@ -409,6 +426,8 @@ final class OkapiClient {
cache.setDifficulty((float) response.getDouble(CACHE_DIFFICULTY));
cache.setTerrain((float) response.getDouble(CACHE_TERRAIN));
+ cache.setInventoryItems(response.getInt(CACHE_TRACKABLES_COUNT));
+
if (!response.isNull(CACHE_IS_FOUND)) {
cache.setFound(response.getBoolean(CACHE_IS_FOUND));
}
@@ -443,7 +462,7 @@ final class OkapiClient {
parseLogType(logResponse.getString(LOG_TYPE)),
logResponse.getString(LOG_COMMENT).trim());
if (result == null) {
- result = new ArrayList<LogEntry>();
+ result = new ArrayList<>();
}
result.add(log);
} catch (final JSONException e) {
@@ -467,7 +486,7 @@ final class OkapiClient {
wpt.setCoords(pt);
}
if (result == null) {
- result = new ArrayList<Waypoint>();
+ result = new ArrayList<>();
}
wpt.setPrefix(wpt.getName());
result.add(wpt);
@@ -478,6 +497,27 @@ final class OkapiClient {
return result;
}
+ private static List<Trackable> parseTrackables(final JSONArray trackablesJson) {
+ if (trackablesJson.length() == 0) {
+ return Collections.emptyList();
+ }
+ final List<Trackable> result = new ArrayList<>();
+ for (int i = 0; i < trackablesJson.length(); i++) {
+ try {
+ final JSONObject trackableResponse = trackablesJson.getJSONObject(i);
+ final Trackable trk = new Trackable();
+ trk.setGeocode(trackableResponse.getString(TRK_GEOCODE));
+ trk.setName(trackableResponse.getString(TRK_NAME));
+ result.add(trk);
+ } catch (final JSONException e) {
+ Log.e("OkapiClient.parseWaypoints", e);
+ // Don't overwrite internal state with possibly partial result
+ return null;
+ }
+ }
+ return result;
+ }
+
private static LogType parseLogType(final String logType) {
if ("Found it".equalsIgnoreCase(logType)) {
return LogType.FOUND_IT;
@@ -559,7 +599,7 @@ final class OkapiClient {
private static List<String> parseAttributes(final JSONArray nameList, final JSONArray acodeList) {
- final List<String> result = new ArrayList<String>();
+ final List<String> result = new ArrayList<>();
for (int i = 0; i < nameList.length(); i++) {
try {
@@ -593,7 +633,7 @@ final class OkapiClient {
try {
final String size = response.getString(CACHE_SIZE2);
return CacheSize.getById(size);
- } catch (JSONException e) {
+ } catch (final JSONException e) {
Log.e("OkapiClient.getCacheSize", e);
return getCacheSizeDeprecated(response);
}
@@ -683,6 +723,9 @@ final class OkapiClient {
}
if (connector.getApiSupport() == ApiSupport.current) {
res.append(SEPARATOR).append(SERVICE_CACHE_ADDITIONAL_CURRENT_FIELDS);
+ if (connector.getSupportedAuthLevel() == OAuthLevel.Level3) {
+ res.append(SEPARATOR).append(SERVICE_CACHE_ADDITIONAL_CURRENT_L3_FIELDS);
+ }
}
return res.toString();
@@ -702,7 +745,7 @@ final class OkapiClient {
params.add("langpref", getPreferredLanguage());
if (connector.getSupportedAuthLevel() == OAuthLevel.Level3) {
- ImmutablePair<String, String> tokens = Settings.getTokenPair(connector.getTokenPublicPrefKeyId(), connector.getTokenSecretPrefKeyId());
+ final ImmutablePair<String, String> tokens = Settings.getTokenPair(connector.getTokenPublicPrefKeyId(), connector.getTokenSecretPrefKeyId());
OAuth.signOAuth(host, service.methodName, "GET", false, params, tokens.left, tokens.right, connector.getCK(), connector.getCS());
} else {
connector.addAuthentication(params);
@@ -769,7 +812,7 @@ final class OkapiClient {
return null;
}
- JSONObject data = result.data;
+ final JSONObject data = result.data;
if (!data.isNull(USER_UUID)) {
try {
return data.getString(USER_UUID);
@@ -792,7 +835,7 @@ final class OkapiClient {
return new UserInfo(StringUtils.EMPTY, 0, UserInfoStatus.getFromOkapiError(error.getResult()));
}
- JSONObject data = result.data;
+ final JSONObject data = result.data;
String name = StringUtils.EMPTY;
boolean successUserName = false;
@@ -828,7 +871,7 @@ final class OkapiClient {
* response containing an error object
* @return OkapiError object with detailed information
*/
- public static OkapiError decodeErrorResponse(HttpResponse response) {
+ public static OkapiError decodeErrorResponse(final HttpResponse response) {
final JSONResult result = new JSONResult(response);
if (!result.isSuccess) {
return new OkapiError(result.data);
@@ -846,7 +889,7 @@ final class OkapiClient {
public final JSONObject data;
public JSONResult(final @Nullable HttpResponse response) {
- boolean isSuccess = Network.isSuccess(response);
+ final boolean isSuccess = Network.isSuccess(response);
final String responseData = Network.getResponseDataAlways(response);
JSONObject data = null;
if (responseData != null) {
diff --git a/main/src/cgeo/geocaching/enumerations/CacheAttribute.java b/main/src/cgeo/geocaching/enumerations/CacheAttribute.java
index 0703c3c..1fdb0ac 100644
--- a/main/src/cgeo/geocaching/enumerations/CacheAttribute.java
+++ b/main/src/cgeo/geocaching/enumerations/CacheAttribute.java
@@ -164,9 +164,9 @@ public enum CacheAttribute {
}
private final static Map<String, CacheAttribute> FIND_BY_GCRAWNAME;
- private final static SparseArray<CacheAttribute> FIND_BY_OCACODE = new SparseArray<CacheAttribute>();
+ private final static SparseArray<CacheAttribute> FIND_BY_OCACODE = new SparseArray<>();
static {
- final HashMap<String, CacheAttribute> mapGcRawNames = new HashMap<String, CacheAttribute>();
+ final HashMap<String, CacheAttribute> mapGcRawNames = new HashMap<>();
for (CacheAttribute attr : values()) {
mapGcRawNames.put(attr.rawName, attr);
if (attr.ocacode != NO_ID) {
diff --git a/main/src/cgeo/geocaching/enumerations/CacheSize.java b/main/src/cgeo/geocaching/enumerations/CacheSize.java
index 1255455..c4e2831 100644
--- a/main/src/cgeo/geocaching/enumerations/CacheSize.java
+++ b/main/src/cgeo/geocaching/enumerations/CacheSize.java
@@ -40,7 +40,7 @@ public enum CacheSize {
final private static Map<String, CacheSize> FIND_BY_ID;
static {
- final HashMap<String, CacheSize> mapping = new HashMap<String, CacheSize>();
+ final HashMap<String, CacheSize> mapping = new HashMap<>();
for (final CacheSize cs : values()) {
mapping.put(cs.id.toLowerCase(Locale.US), cs);
mapping.put(cs.ocSize2.toLowerCase(Locale.US), cs);
diff --git a/main/src/cgeo/geocaching/enumerations/CacheType.java b/main/src/cgeo/geocaching/enumerations/CacheType.java
index e36f1fd..16677da 100644
--- a/main/src/cgeo/geocaching/enumerations/CacheType.java
+++ b/main/src/cgeo/geocaching/enumerations/CacheType.java
@@ -60,9 +60,9 @@ public enum CacheType {
private final static Map<String, CacheType> FIND_BY_PATTERN;
private final static Map<String, CacheType> FIND_BY_GUID;
static {
- final HashMap<String, CacheType> mappingId = new HashMap<String, CacheType>();
- final HashMap<String, CacheType> mappingPattern = new HashMap<String, CacheType>();
- final HashMap<String, CacheType> mappingGuid = new HashMap<String, CacheType>();
+ final HashMap<String, CacheType> mappingId = new HashMap<>();
+ final HashMap<String, CacheType> mappingPattern = new HashMap<>();
+ final HashMap<String, CacheType> mappingGuid = new HashMap<>();
for (CacheType ct : values()) {
mappingId.put(ct.id, ct);
mappingPattern.put(ct.pattern.toLowerCase(Locale.US), ct);
diff --git a/main/src/cgeo/geocaching/enumerations/LoadFlags.java b/main/src/cgeo/geocaching/enumerations/LoadFlags.java
index fb894ac..c781f4b 100644
--- a/main/src/cgeo/geocaching/enumerations/LoadFlags.java
+++ b/main/src/cgeo/geocaching/enumerations/LoadFlags.java
@@ -8,39 +8,39 @@ import java.util.EnumSet;
public interface LoadFlags {
public enum LoadFlag {
- LOAD_CACHE_BEFORE, // load from CacheCache
- LOAD_CACHE_AFTER, // load from CacheCache
- LOAD_DB_MINIMAL, // load minimal informations from DataBase
- LOAD_ATTRIBUTES,
- LOAD_WAYPOINTS,
- LOAD_SPOILERS,
- LOAD_LOGS,
- LOAD_INVENTORY,
- LOAD_OFFLINE_LOG
+ CACHE_BEFORE, // load from CacheCache
+ CACHE_AFTER, // load from CacheCache
+ DB_MINIMAL, // load minimal informations from DataBase
+ ATTRIBUTES,
+ WAYPOINTS,
+ SPOILERS,
+ LOGS,
+ INVENTORY,
+ OFFLINE_LOG
}
/** Retrieve cache from CacheCache only. Do not load from DB */
- public final static EnumSet<LoadFlag> LOAD_CACHE_ONLY = EnumSet.of(LoadFlag.LOAD_CACHE_BEFORE);
+ public final static EnumSet<LoadFlag> LOAD_CACHE_ONLY = EnumSet.of(LoadFlag.CACHE_BEFORE);
/** Retrieve cache from CacheCache first. If not found load from DB */
- public final static EnumSet<LoadFlag> LOAD_CACHE_OR_DB = EnumSet.of(LoadFlag.LOAD_CACHE_BEFORE, LoadFlag.LOAD_DB_MINIMAL, LoadFlag.LOAD_OFFLINE_LOG);
+ public final static EnumSet<LoadFlag> LOAD_CACHE_OR_DB = EnumSet.of(LoadFlag.CACHE_BEFORE, LoadFlag.DB_MINIMAL, LoadFlag.OFFLINE_LOG);
/** Retrieve cache (minimalistic information including waypoints) from DB first. If not found load from CacheCache */
- public final static EnumSet<LoadFlag> LOAD_WAYPOINTS = EnumSet.of(LoadFlag.LOAD_CACHE_AFTER, LoadFlag.LOAD_DB_MINIMAL, LoadFlag.LOAD_WAYPOINTS, LoadFlag.LOAD_OFFLINE_LOG);
+ public final static EnumSet<LoadFlag> LOAD_WAYPOINTS = EnumSet.of(LoadFlag.CACHE_AFTER, LoadFlag.DB_MINIMAL, LoadFlag.WAYPOINTS, LoadFlag.OFFLINE_LOG);
/** Retrieve cache (all stored informations) from DB only. Do not load from CacheCache */
- public final static EnumSet<LoadFlag> LOAD_ALL_DB_ONLY = EnumSet.range(LoadFlag.LOAD_DB_MINIMAL, LoadFlag.LOAD_OFFLINE_LOG);
+ public final static EnumSet<LoadFlag> LOAD_ALL_DB_ONLY = EnumSet.range(LoadFlag.DB_MINIMAL, LoadFlag.OFFLINE_LOG);
public enum SaveFlag {
- SAVE_CACHE, // save only to CacheCache
- SAVE_DB // include saving to CacheCache
+ CACHE, // save only to CacheCache
+ DB // include saving to CacheCache
}
public final static EnumSet<SaveFlag> SAVE_ALL = EnumSet.allOf(SaveFlag.class);
public enum RemoveFlag {
- REMOVE_CACHE, // save only to CacheCache
- REMOVE_DB, // includes removing from CacheCache
- REMOVE_OWN_WAYPOINTS_ONLY_FOR_TESTING // only to be used in unit testing (as we never delete own waypoints)
+ CACHE, // save only to CacheCache
+ DB, // includes removing from CacheCache
+ OWN_WAYPOINTS_ONLY_FOR_TESTING // only to be used in unit testing (as we never delete own waypoints)
}
- public final static EnumSet<RemoveFlag> REMOVE_ALL = EnumSet.of(RemoveFlag.REMOVE_CACHE, RemoveFlag.REMOVE_DB);
+ public final static EnumSet<RemoveFlag> REMOVE_ALL = EnumSet.of(RemoveFlag.CACHE, RemoveFlag.DB);
} \ No newline at end of file
diff --git a/main/src/cgeo/geocaching/enumerations/LogType.java b/main/src/cgeo/geocaching/enumerations/LogType.java
index fa65b71..84ab7b9 100644
--- a/main/src/cgeo/geocaching/enumerations/LogType.java
+++ b/main/src/cgeo/geocaching/enumerations/LogType.java
@@ -68,8 +68,8 @@ public enum LogType {
private final static Map<String, LogType> FIND_BY_ICONNAME;
private final static Map<String, LogType> FIND_BY_TYPE;
static {
- final HashMap<String, LogType> mappingPattern = new HashMap<String, LogType>();
- final HashMap<String, LogType> mappingType = new HashMap<String, LogType>();
+ final HashMap<String, LogType> mappingPattern = new HashMap<>();
+ final HashMap<String, LogType> mappingType = new HashMap<>();
for (LogType lt : values()) {
if (lt.iconName != null) {
mappingPattern.put(lt.iconName, lt);
diff --git a/main/src/cgeo/geocaching/enumerations/WaypointType.java b/main/src/cgeo/geocaching/enumerations/WaypointType.java
index 272b2f2..1805635 100644
--- a/main/src/cgeo/geocaching/enumerations/WaypointType.java
+++ b/main/src/cgeo/geocaching/enumerations/WaypointType.java
@@ -37,9 +37,9 @@ public enum WaypointType {
* non public so that <code>null</code> handling can be handled centrally in the enum type itself
*/
private static final Map<String, WaypointType> FIND_BY_ID;
- public static final Set<WaypointType> ALL_TYPES_EXCEPT_OWN_AND_ORIGINAL = new HashSet<WaypointType>();
+ public static final Set<WaypointType> ALL_TYPES_EXCEPT_OWN_AND_ORIGINAL = new HashSet<>();
static {
- final HashMap<String, WaypointType> mapping = new HashMap<String, WaypointType>();
+ final HashMap<String, WaypointType> mapping = new HashMap<>();
for (WaypointType wt : values()) {
mapping.put(wt.id, wt);
if (wt != WaypointType.OWN && wt != WaypointType.ORIGINAL) {
diff --git a/main/src/cgeo/geocaching/export/ExportFactory.java b/main/src/cgeo/geocaching/export/ExportFactory.java
deleted file mode 100644
index e743eb2..0000000
--- a/main/src/cgeo/geocaching/export/ExportFactory.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package cgeo.geocaching.export;
-
-import cgeo.geocaching.Geocache;
-import cgeo.geocaching.R;
-import cgeo.geocaching.utils.Log;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.content.DialogInterface;
-import android.widget.ArrayAdapter;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * Factory to create a dialog with all available exporters.
- */
-public abstract class ExportFactory {
-
- /**
- * Contains instances of all available exporter classes.
- */
- private static final List<Class<? extends Export>> exporterClasses;
-
- static {
- final ArrayList<Class<? extends Export>> temp = new ArrayList<Class<? extends Export>>();
- temp.add(FieldnoteExport.class);
- temp.add(GpxExport.class);
- exporterClasses = Collections.unmodifiableList(temp);
- }
-
- /**
- * Creates a dialog so that the user can select an exporter.
- *
- * @param caches
- * The {@link List} of {@link cgeo.geocaching.Geocache} to be exported
- * @param activity
- * The {@link Activity} in whose context the dialog should be shown
- */
- public static void showExportMenu(final List<Geocache> caches, final Activity activity) {
- final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
- builder.setTitle(R.string.export).setIcon(R.drawable.ic_menu_share);
-
- final ArrayList<Export> export = new ArrayList<Export>();
- for (Class<? extends Export> exporterClass : exporterClasses) {
- try {
- export.add(exporterClass.newInstance());
- } catch (Exception ex) {
- Log.e("showExportMenu", ex);
- }
- }
-
- final ArrayAdapter<Export> adapter = new ArrayAdapter<Export>(activity, android.R.layout.select_dialog_item, export);
-
- builder.setAdapter(adapter, new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int item) {
- dialog.dismiss();
- final Export selectedExport = adapter.getItem(item);
- selectedExport.export(caches, activity);
- }
- });
-
- builder.create().show();
- }
-} \ No newline at end of file
diff --git a/main/src/cgeo/geocaching/export/FieldnoteExport.java b/main/src/cgeo/geocaching/export/FieldnoteExport.java
index 7d3e07e..c03b848 100644
--- a/main/src/cgeo/geocaching/export/FieldnoteExport.java
+++ b/main/src/cgeo/geocaching/export/FieldnoteExport.java
@@ -1,5 +1,7 @@
package cgeo.geocaching.export;
+import butterknife.ButterKnife;
+
import cgeo.geocaching.DataStore;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.LogEntry;
@@ -9,14 +11,17 @@ import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.connector.IConnector;
import cgeo.geocaching.connector.capability.FieldNotesCapability;
import cgeo.geocaching.settings.Settings;
-import cgeo.geocaching.ui.Formatter;
import cgeo.geocaching.utils.AsyncTaskWithProgress;
+import cgeo.geocaching.utils.Formatter;
import cgeo.geocaching.utils.Log;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
+import android.content.Context;
import android.content.DialogInterface;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
import android.os.Environment;
import android.view.ContextThemeWrapper;
import android.view.View;
@@ -29,11 +34,11 @@ import java.util.List;
* Exports offline logs in the Groundspeak Field Note format.
*
*/
-class FieldnoteExport extends AbstractExport {
+public class FieldnoteExport extends AbstractExport {
private static final File exportLocation = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/field-notes");
private static int fieldNotesCount = 0;
- protected FieldnoteExport() {
+ public FieldnoteExport() {
super(getString(R.string.export_fieldnotes));
}
@@ -53,13 +58,18 @@ class FieldnoteExport extends AbstractExport {
private Dialog getExportOptionsDialog(final Geocache[] caches, final Activity activity) {
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
- // AlertDialog has always dark style, so we have to apply it as well always
- final View layout = View.inflate(new ContextThemeWrapper(activity, R.style.dark), R.layout.fieldnote_export_dialog, null);
+ final Context themedContext;
+ if (Settings.isLightSkin() && VERSION.SDK_INT < VERSION_CODES.HONEYCOMB)
+ themedContext = new ContextThemeWrapper(activity, R.style.dark);
+ else
+ themedContext = activity;
+ final View layout = View.inflate(themedContext, R.layout.fieldnote_export_dialog, null);
+
builder.setView(layout);
- final CheckBox uploadOption = (CheckBox) layout.findViewById(R.id.upload);
+ final CheckBox uploadOption = ButterKnife.findById(layout, R.id.upload);
uploadOption.setChecked(Settings.getFieldNoteExportUpload());
- final CheckBox onlyNewOption = (CheckBox) layout.findViewById(R.id.onlynew);
+ final CheckBox onlyNewOption = ButterKnife.findById(layout, R.id.onlynew);
onlyNewOption.setChecked(Settings.getFieldNoteExportOnlyNew());
if (Settings.getFieldnoteExportDate() > 0) {
@@ -110,7 +120,7 @@ class FieldnoteExport extends AbstractExport {
@Override
protected Boolean doInBackgroundInternal(final Geocache[] caches) {
// export field notes separately for each connector, so the file can be uploaded to the respective site afterwards
- for (IConnector connector : ConnectorFactory.getConnectors()) {
+ for (final IConnector connector : ConnectorFactory.getConnectors()) {
if (connector instanceof FieldNotesCapability) {
exportFieldNotes((FieldNotesCapability) connector, caches);
}
@@ -118,7 +128,7 @@ class FieldnoteExport extends AbstractExport {
return true;
}
- private boolean exportFieldNotes(final FieldNotesCapability connector, Geocache[] caches) {
+ private boolean exportFieldNotes(final FieldNotesCapability connector, final Geocache[] caches) {
final FieldNotes fieldNotes = new FieldNotes();
try {
int i = 0;
diff --git a/main/src/cgeo/geocaching/export/GpxExport.java b/main/src/cgeo/geocaching/export/GpxExport.java
index 08fca0b..61d03bc 100644
--- a/main/src/cgeo/geocaching/export/GpxExport.java
+++ b/main/src/cgeo/geocaching/export/GpxExport.java
@@ -1,5 +1,7 @@
package cgeo.geocaching.export;
+import butterknife.ButterKnife;
+
import cgeo.geocaching.CgeoApplication;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.R;
@@ -8,15 +10,17 @@ import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.utils.AsyncTaskWithProgress;
import cgeo.geocaching.utils.FileUtils;
import cgeo.geocaching.utils.Log;
+import cgeo.geocaching.utils.ShareUtils;
import org.apache.commons.lang3.CharEncoding;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
+import android.content.Context;
import android.content.DialogInterface;
-import android.content.Intent;
-import android.net.Uri;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
import android.os.Environment;
import android.view.ContextThemeWrapper;
import android.view.View;
@@ -35,9 +39,9 @@ import java.util.Date;
import java.util.List;
import java.util.Locale;
-class GpxExport extends AbstractExport {
+public class GpxExport extends AbstractExport {
- protected GpxExport() {
+ public GpxExport() {
super(getString(R.string.export_gpx));
}
@@ -58,20 +62,25 @@ class GpxExport extends AbstractExport {
private Dialog getExportDialog(final String[] geocodes, final Activity activity) {
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
- // AlertDialog has always dark style, so we have to apply it as well always
- final View layout = View.inflate(new ContextThemeWrapper(activity, R.style.dark), R.layout.gpx_export_dialog, null);
+ final Context themedContext;
+ if (Settings.isLightSkin() && VERSION.SDK_INT < VERSION_CODES.HONEYCOMB)
+ themedContext = new ContextThemeWrapper(activity, R.style.dark);
+ else
+ themedContext = activity;
+
+ final View layout = View.inflate(themedContext, R.layout.gpx_export_dialog, null);
builder.setView(layout);
- final TextView text = (TextView) layout.findViewById(R.id.info);
+ final TextView text = ButterKnife.findById(layout, R.id.info);
text.setText(getString(R.string.export_gpx_info, Settings.getGpxExportDir()));
- final CheckBox shareOption = (CheckBox) layout.findViewById(R.id.share);
+ final CheckBox shareOption = ButterKnife.findById(layout, R.id.share);
shareOption.setChecked(Settings.getShareAfterExport());
shareOption.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View v) {
+ public void onClick(final View v) {
Settings.setShareAfterExport(shareOption.isChecked());
}
});
@@ -79,7 +88,7 @@ class GpxExport extends AbstractExport {
builder.setPositiveButton(R.string.export, new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int which) {
+ public void onClick(final DialogInterface dialog, final int which) {
dialog.dismiss();
new ExportTask(activity).execute(geocodes);
}
@@ -89,7 +98,7 @@ class GpxExport extends AbstractExport {
}
private static String[] getGeocodes(final List<Geocache> caches) {
- final ArrayList<String> allGeocodes = new ArrayList<String>(caches.size());
+ final ArrayList<String> allGeocodes = new ArrayList<>(caches.size());
for (final Geocache geocache : caches) {
allGeocodes.add(geocache.getGeocode());
}
@@ -117,13 +126,13 @@ class GpxExport extends AbstractExport {
}
@Override
- protected File doInBackgroundInternal(String[] geocodes) {
+ protected File doInBackgroundInternal(final String[] geocodes) {
// quick check for being able to write the GPX file
if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
return null;
}
- final List<String> allGeocodes = new ArrayList<String>(Arrays.asList(geocodes));
+ final List<String> allGeocodes = new ArrayList<>(Arrays.asList(geocodes));
setMessage(CgeoApplication.getInstance().getResources().getQuantityString(R.plurals.cache_counts, allGeocodes.size(), allGeocodes.size()));
@@ -168,11 +177,7 @@ class GpxExport extends AbstractExport {
if (exportFile != null) {
ActivityMixin.showToast(activity, getName() + ' ' + getString(R.string.export_exportedto) + ": " + exportFile.toString());
if (Settings.getShareAfterExport()) {
- final Intent shareIntent = new Intent();
- shareIntent.setAction(Intent.ACTION_SEND);
- shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(exportFile));
- shareIntent.setType("application/xml");
- activity.startActivity(Intent.createChooser(shareIntent, getString(R.string.export_gpx_to)));
+ ShareUtils.share(activity, exportFile, "application/xml", R.string.export_gpx_to);
}
} else {
ActivityMixin.showToast(activity, getString(R.string.export_failed));
diff --git a/main/src/cgeo/geocaching/export/GpxSerializer.java b/main/src/cgeo/geocaching/export/GpxSerializer.java
index b2587aa..b24eb4c 100644
--- a/main/src/cgeo/geocaching/export/GpxSerializer.java
+++ b/main/src/cgeo/geocaching/export/GpxSerializer.java
@@ -57,7 +57,7 @@ public final class GpxSerializer {
public void writeGPX(List<String> allGeocodesIn, Writer writer, final ProgressListener progressListener) throws IOException {
// create a copy of the geocode list, as we need to modify it, but it might be immutable
- final ArrayList<String> allGeocodes = new ArrayList<String>(allGeocodesIn);
+ final ArrayList<String> allGeocodes = new ArrayList<>(allGeocodesIn);
this.progressListener = progressListener;
gpx.setOutput(writer);
@@ -184,8 +184,8 @@ public final class GpxSerializer {
private void writeWaypoints(final Geocache cache) throws IOException {
final List<Waypoint> waypoints = cache.getWaypoints();
- final List<Waypoint> ownWaypoints = new ArrayList<Waypoint>(waypoints.size());
- final List<Waypoint> originWaypoints = new ArrayList<Waypoint>(waypoints.size());
+ final List<Waypoint> ownWaypoints = new ArrayList<>(waypoints.size());
+ final List<Waypoint> originWaypoints = new ArrayList<>(waypoints.size());
int maxPrefix = 0;
for (final Waypoint wp : cache.getWaypoints()) {
diff --git a/main/src/cgeo/geocaching/files/AbstractFileListActivity.java b/main/src/cgeo/geocaching/files/AbstractFileListActivity.java
index 07b4fb4..2a05cbc 100644
--- a/main/src/cgeo/geocaching/files/AbstractFileListActivity.java
+++ b/main/src/cgeo/geocaching/files/AbstractFileListActivity.java
@@ -27,7 +27,7 @@ import java.util.List;
public abstract class AbstractFileListActivity<T extends ArrayAdapter<File>> extends AbstractListActivity {
private static final int MSG_SEARCH_WHOLE_SD_CARD = 1;
- private final List<File> files = new ArrayList<File>();
+ private final List<File> files = new ArrayList<>();
private T adapter = null;
private ProgressDialog waitDialog = null;
private SearchFilesThread searchingThread = null;
@@ -51,7 +51,7 @@ public abstract class AbstractFileListActivity<T extends ArrayAdapter<File>> ext
}
private String getDefaultFolders() {
- final ArrayList<String> names = new ArrayList<String>();
+ final ArrayList<String> names = new ArrayList<>();
for (File dir : getExistingBaseFolders()) {
names.add(dir.getPath());
}
@@ -152,7 +152,7 @@ public abstract class AbstractFileListActivity<T extends ArrayAdapter<File>> ext
@Override
public void run() {
- final List<File> list = new ArrayList<File>();
+ final List<File> list = new ArrayList<>();
try {
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
@@ -213,7 +213,7 @@ public abstract class AbstractFileListActivity<T extends ArrayAdapter<File>> ext
}
protected List<File> getExistingBaseFolders() {
- ArrayList<File> result = new ArrayList<File>();
+ ArrayList<File> result = new ArrayList<>();
for (final File dir : getBaseFolders()) {
if (dir.exists() && dir.isDirectory()) {
result.add(dir);
diff --git a/main/src/cgeo/geocaching/files/FileParser.java b/main/src/cgeo/geocaching/files/FileParser.java
index 396a589..973e65f 100644
--- a/main/src/cgeo/geocaching/files/FileParser.java
+++ b/main/src/cgeo/geocaching/files/FileParser.java
@@ -4,6 +4,8 @@ import cgeo.geocaching.Geocache;
import cgeo.geocaching.utils.CancellableHandler;
import org.apache.commons.io.IOUtils;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
@@ -29,7 +31,7 @@ public abstract class FileParser {
* @throws ParserException
* if the input stream contains data not matching the file format of the parser
*/
- public abstract Collection<Geocache> parse(final InputStream stream, final CancellableHandler progressHandler) throws IOException, ParserException;
+ public abstract Collection<Geocache> parse(@NonNull final InputStream stream, @Nullable final CancellableHandler progressHandler) throws IOException, ParserException;
/**
* Convenience method for parsing a file.
@@ -49,7 +51,7 @@ public abstract class FileParser {
}
}
- protected static StringBuilder readStream(InputStream is, CancellableHandler progressHandler) throws IOException {
+ protected static StringBuilder readStream(@NonNull final InputStream is, @Nullable final CancellableHandler progressHandler) throws IOException {
final StringBuilder buffer = new StringBuilder();
ProgressInputStream progressInputStream = new ProgressInputStream(is);
final BufferedReader input = new BufferedReader(new InputStreamReader(progressInputStream, "UTF-8"));
@@ -66,7 +68,7 @@ public abstract class FileParser {
}
}
- protected static void showProgressMessage(final CancellableHandler handler, final int bytesRead) {
+ protected static void showProgressMessage(@Nullable final CancellableHandler handler, final int bytesRead) {
if (handler != null) {
if (handler.isCancelled()) {
throw new CancellationException();
diff --git a/main/src/cgeo/geocaching/files/FileType.java b/main/src/cgeo/geocaching/files/FileType.java
new file mode 100644
index 0000000..ef62351
--- /dev/null
+++ b/main/src/cgeo/geocaching/files/FileType.java
@@ -0,0 +1,8 @@
+package cgeo.geocaching.files;
+
+public enum FileType {
+ UNKNOWN,
+ LOC,
+ GPX,
+ ZIP
+}
diff --git a/main/src/cgeo/geocaching/files/FileTypeDetector.java b/main/src/cgeo/geocaching/files/FileTypeDetector.java
new file mode 100644
index 0000000..389b83a
--- /dev/null
+++ b/main/src/cgeo/geocaching/files/FileTypeDetector.java
@@ -0,0 +1,77 @@
+package cgeo.geocaching.files;
+
+import cgeo.geocaching.utils.Log;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.eclipse.jdt.annotation.NonNull;
+
+import android.content.ContentResolver;
+import android.net.Uri;
+
+import java.io.BufferedReader;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+public class FileTypeDetector {
+
+ private final ContentResolver contentResolver;
+ private final Uri uri;
+
+ public FileTypeDetector(Uri uri, ContentResolver contentResolver) {
+ this.uri = uri;
+ this.contentResolver = contentResolver;
+ }
+
+ public @NonNull FileType getFileType() {
+ InputStream is = null;
+ BufferedReader reader = null;
+ FileType type = FileType.UNKNOWN;
+ try {
+ is = contentResolver.openInputStream(uri);
+ if (is == null) {
+ return FileType.UNKNOWN;
+ }
+ reader = new BufferedReader(new InputStreamReader(is));
+ type = detectHeader(reader);
+ reader.close();
+ } catch (FileNotFoundException e) {
+ Log.e("FileTypeDetector", e);
+ } catch (IOException e) {
+ Log.e("FileTypeDetector", e);
+ } finally {
+ IOUtils.closeQuietly(reader);
+ IOUtils.closeQuietly(is);
+ }
+ return type;
+ }
+
+ private static FileType detectHeader(BufferedReader reader)
+ throws IOException {
+ String line = reader.readLine();
+ if (isZip(line)) {
+ return FileType.ZIP;
+ }
+ // scan at most 5 lines of a GPX file
+ for (int i = 0; i < 5; i++) {
+ line = StringUtils.trim(line);
+ if (StringUtils.contains(line, "<loc")) {
+ return FileType.LOC;
+ }
+ if (StringUtils.contains(line, "<gpx")) {
+ return FileType.GPX;
+ }
+ line = reader.readLine();
+ }
+ return FileType.UNKNOWN;
+ }
+
+ private static boolean isZip(String line) {
+ return StringUtils.length(line) >= 4
+ && StringUtils.startsWith(line, "PK") && line.charAt(2) == 3
+ && line.charAt(3) == 4;
+ }
+
+}
diff --git a/main/src/cgeo/geocaching/files/GPXImporter.java b/main/src/cgeo/geocaching/files/GPXImporter.java
index cd2f445..52f68e1 100644
--- a/main/src/cgeo/geocaching/files/GPXImporter.java
+++ b/main/src/cgeo/geocaching/files/GPXImporter.java
@@ -12,8 +12,10 @@ import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.dialog.Dialogs;
import cgeo.geocaching.utils.CancellableHandler;
import cgeo.geocaching.utils.Log;
+import cgeo.geocaching.utils.RxUtils;
import org.apache.commons.lang3.StringUtils;
+import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import android.app.Activity;
@@ -93,46 +95,77 @@ public class GPXImporter {
*
* @param uri
* URI of the file to import
- * @param knownMimeType
- * @param knownPathName
+ * @param mimeType
+ * @param pathName
*/
- public void importGPX(final Uri uri, final @Nullable String knownMimeType, final @Nullable String knownPathName) {
+ public void importGPX(final Uri uri, final @Nullable String mimeType, final @Nullable String pathName) {
final ContentResolver contentResolver = fromActivity.getContentResolver();
- String mimeType = knownMimeType;
- final String pathName = knownPathName != null ? knownPathName : uri.getPath();
-
- // if mimetype can't be determined (e.g. for emulators email app), derive it from uri file extension
- // contentResolver.getType(uri) doesn't help but throws exception for emulators email app
- // Permission Denial: reading com.android.email.provider.EmailProvider uri
- // Google search says: there is no solution for this problem
- // Gmail doesn't work at all, see #967
- if (mimeType == null) {
- if (StringUtils.endsWithIgnoreCase(pathName, GPX_FILE_EXTENSION) || StringUtils.endsWithIgnoreCase(pathName, LOC_FILE_EXTENSION)) {
- mimeType = "application/xml";
- } else {
- // if we can't determine a better type, default to zip import
- // emulator email sends e.g. content://com.android.email.attachmentprovider/1/1/RAW, mimetype=null
- mimeType = "application/zip";
- }
- }
Log.i("importGPX: " + uri + ", mimetype=" + mimeType);
- if (GPX_MIME_TYPES.contains(mimeType)) {
- if (StringUtils.endsWithIgnoreCase(pathName, LOC_FILE_EXTENSION)) {
- new ImportLocAttachmentThread(uri, contentResolver, listId, importStepHandler, progressHandler).start();
- } else {
- new ImportGpxAttachmentThread(uri, contentResolver, listId, importStepHandler, progressHandler).start();
- }
- } else if (ZIP_MIME_TYPES.contains(mimeType)) {
- new ImportGpxZipAttachmentThread(uri, contentResolver, listId, importStepHandler, progressHandler).start();
- } else {
- importFinished();
+ @NonNull
+ FileType fileType = new FileTypeDetector(uri, contentResolver)
+ .getFileType();
+
+ if (fileType == FileType.UNKNOWN) {
+ fileType = getFileTypeFromPathName(pathName);
+ }
+ if (fileType == FileType.UNKNOWN) {
+ fileType = getFileTypeFromMimeType(mimeType);
+ }
+
+ ImportThread importer = getImporterFromFileType(uri, contentResolver,
+ fileType);
+
+ if (importer != null) {
+ importer.start();
+ } else {
+ importFinished();
+ }
+ }
+
+ private static @NonNull FileType getFileTypeFromPathName(
+ final String pathName) {
+ if (StringUtils.endsWithIgnoreCase(pathName, GPX_FILE_EXTENSION)) {
+ return FileType.GPX;
}
- }
- /**
- * Import GPX provided via intent of activity that instantiated this GPXImporter.
- */
+ if (StringUtils.endsWithIgnoreCase(pathName, LOC_FILE_EXTENSION)) {
+ return FileType.LOC;
+ }
+ return FileType.UNKNOWN;
+ }
+
+ private static @NonNull FileType getFileTypeFromMimeType(
+ final String mimeType) {
+ if (GPX_MIME_TYPES.contains(mimeType)) {
+ return FileType.GPX;
+ } else if (ZIP_MIME_TYPES.contains(mimeType)) {
+ return FileType.ZIP;
+ }
+ return FileType.UNKNOWN;
+ }
+
+ private ImportThread getImporterFromFileType(Uri uri,
+ ContentResolver contentResolver, FileType fileType) {
+ switch (fileType) {
+ case ZIP:
+ return new ImportGpxZipAttachmentThread(uri, contentResolver,
+ listId, importStepHandler, progressHandler);
+ case GPX:
+ return new ImportGpxAttachmentThread(uri, contentResolver, listId,
+ importStepHandler, progressHandler);
+ case LOC:
+ return new ImportLocAttachmentThread(uri, contentResolver, listId,
+ importStepHandler, progressHandler);
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Import GPX provided via intent of activity that instantiated this
+ * GPXImporter.
+ */
public void importGPX() {
final Intent intent = fromActivity.getIntent();
final Uri uri = intent.getData();
@@ -194,7 +227,7 @@ public class GPXImporter {
final Geocache cache = DataStore.loadCache(geocode, LoadFlags.LOAD_WAYPOINTS);
if (cache != null) {
Log.d("GPXImporter.ImportThread.importStaticMaps start downloadMaps for cache " + geocode);
- StaticMapsProvider.downloadMaps(cache);
+ RxUtils.waitForCompletion(StaticMapsProvider.downloadMaps(cache));
} else {
Log.d("GPXImporter.ImportThread.importStaticMaps: no data found for " + geocode);
}
diff --git a/main/src/cgeo/geocaching/files/GPXParser.java b/main/src/cgeo/geocaching/files/GPXParser.java
index 6161088..89ee887 100644
--- a/main/src/cgeo/geocaching/files/GPXParser.java
+++ b/main/src/cgeo/geocaching/files/GPXParser.java
@@ -25,6 +25,8 @@ import cgeo.geocaching.utils.SynchronizedDateFormat;
import org.apache.commons.lang3.CharEncoding;
import org.apache.commons.lang3.StringUtils;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
@@ -103,12 +105,12 @@ public abstract class GPXParser extends FileParser {
private String parentCacheCode = null;
private boolean wptVisited = false;
private boolean wptUserDefined = false;
- private List<LogEntry> logs = new ArrayList<LogEntry>();
+ private List<LogEntry> logs = new ArrayList<>();
/**
* Parser result. Maps geocode to cache.
*/
- private final Set<String> result = new HashSet<String>(100);
+ private final Set<String> result = new HashSet<>(100);
private ProgressInputStream progressStream;
/**
* URL contained in the header of the GPX file. Used to guess where the file is coming from.
@@ -270,7 +272,7 @@ public abstract class GPXParser extends FileParser {
}
@Override
- public Collection<Geocache> parse(final InputStream stream, final CancellableHandler progressHandler) throws IOException, ParserException {
+ public Collection<Geocache> parse(@NonNull final InputStream stream, @Nullable final CancellableHandler progressHandler) throws IOException, ParserException {
resetCache();
final RootElement root = new RootElement(namespace, "gpx");
final Element waypoint = root.getChild(namespace, "wpt");
@@ -338,11 +340,11 @@ public abstract class GPXParser extends FileParser {
// finally store the cache in the database
result.add(geocode);
- DataStore.saveCache(cache, EnumSet.of(SaveFlag.SAVE_DB));
+ DataStore.saveCache(cache, EnumSet.of(SaveFlag.DB));
DataStore.saveLogsWithoutTransaction(cache.getGeocode(), logs);
// avoid the cachecache using lots of memory for caches which the user did not actually look at
- DataStore.removeCache(geocode, EnumSet.of(RemoveFlag.REMOVE_CACHE));
+ DataStore.removeCache(geocode, EnumSet.of(RemoveFlag.CACHE));
showProgressMessage(progressHandler, progressStream.getProgress());
} else if (StringUtils.isNotBlank(cache.getName())
&& StringUtils.containsIgnoreCase(type, "waypoint")) {
@@ -379,14 +381,14 @@ public abstract class GPXParser extends FileParser {
waypoint.setCoords(cache.getCoords());
waypoint.setNote(cache.getDescription());
waypoint.setVisited(wptVisited);
- final ArrayList<Waypoint> mergedWayPoints = new ArrayList<Waypoint>();
+ final ArrayList<Waypoint> mergedWayPoints = new ArrayList<>();
mergedWayPoints.addAll(cacheForWaypoint.getWaypoints());
- final ArrayList<Waypoint> newPoints = new ArrayList<Waypoint>();
+ final ArrayList<Waypoint> newPoints = new ArrayList<>();
newPoints.add(waypoint);
Waypoint.mergeWayPoints(newPoints, mergedWayPoints, true);
cacheForWaypoint.setWaypoints(newPoints, false);
- DataStore.saveCache(cacheForWaypoint, EnumSet.of(SaveFlag.SAVE_DB));
+ DataStore.saveCache(cacheForWaypoint, EnumSet.of(SaveFlag.DB));
showProgressMessage(progressHandler, progressStream.getProgress());
}
}
@@ -814,7 +816,7 @@ public abstract class GPXParser extends FileParser {
progressStream = new ProgressInputStream(stream);
BufferedReader reader = new BufferedReader(new InputStreamReader(progressStream, CharEncoding.UTF_8));
Xml.parse(new InvalidXMLCharacterFilterReader(reader), root.getContentHandler());
- return DataStore.loadCaches(result, EnumSet.of(LoadFlag.LOAD_DB_MINIMAL));
+ return DataStore.loadCaches(result, EnumSet.of(LoadFlag.DB_MINIMAL));
} catch (final SAXException e) {
throw new ParserException("Cannot parse .gpx file as GPX " + version + ": could not parse XML", e);
}
@@ -999,7 +1001,7 @@ public abstract class GPXParser extends FileParser {
parentCacheCode = null;
wptVisited = false;
wptUserDefined = false;
- logs = new ArrayList<LogEntry>();
+ logs = new ArrayList<>();
cache = new Geocache(this);
diff --git a/main/src/cgeo/geocaching/files/LocParser.java b/main/src/cgeo/geocaching/files/LocParser.java
index 3d01c1b..2871d77 100644
--- a/main/src/cgeo/geocaching/files/LocParser.java
+++ b/main/src/cgeo/geocaching/files/LocParser.java
@@ -12,6 +12,8 @@ import cgeo.geocaching.utils.Log;
import cgeo.geocaching.utils.MatcherWrapper;
import org.apache.commons.lang3.StringUtils;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
import java.io.IOException;
import java.io.InputStream;
@@ -53,7 +55,7 @@ public final class LocParser extends FileParser {
final Map<String, Geocache> cidCoords = parseCoordinates(fileContent);
// save found cache coordinates
- final HashSet<String> contained = new HashSet<String>();
+ final HashSet<String> contained = new HashSet<>();
for (String geocode : searchResult.getGeocodes()) {
if (cidCoords.containsKey(geocode)) {
contained.add(geocode);
@@ -80,7 +82,7 @@ public final class LocParser extends FileParser {
}
static Map<String, Geocache> parseCoordinates(final String fileContent) {
- final Map<String, Geocache> coords = new HashMap<String, Geocache>();
+ final Map<String, Geocache> coords = new HashMap<>();
if (StringUtils.isBlank(fileContent)) {
return coords;
}
@@ -116,11 +118,11 @@ public final class LocParser extends FileParser {
}
@Override
- public Collection<Geocache> parse(InputStream stream, CancellableHandler progressHandler) throws IOException, ParserException {
- // TODO: progress reporting happens during reading stream only, not during parsing
- String streamContent = readStream(stream, progressHandler).toString();
+ public Collection<Geocache> parse(@NonNull final InputStream stream, @Nullable final CancellableHandler progressHandler) throws IOException, ParserException {
+ final String streamContent = readStream(stream, null).toString();
+ final int maxSize = streamContent.length();
final Map<String, Geocache> coords = parseCoordinates(streamContent);
- final List<Geocache> caches = new ArrayList<Geocache>();
+ final List<Geocache> caches = new ArrayList<>();
for (Entry<String, Geocache> entry : coords.entrySet()) {
Geocache coord = entry.getValue();
if (StringUtils.isBlank(coord.getGeocode()) || StringUtils.isBlank(coord.getName())) {
@@ -136,6 +138,9 @@ public final class LocParser extends FileParser {
cache.setListId(listId);
cache.setDetailed(true);
cache.store(null);
+ if (progressHandler != null) {
+ progressHandler.sendMessage(progressHandler.obtainMessage(0, maxSize * caches.size() / coords.size(), 0));
+ }
}
Log.i("Caches found in .loc file: " + caches.size());
return caches;
diff --git a/main/src/cgeo/geocaching/files/LocalStorage.java b/main/src/cgeo/geocaching/files/LocalStorage.java
index 01c090b..63a1844 100644
--- a/main/src/cgeo/geocaching/files/LocalStorage.java
+++ b/main/src/cgeo/geocaching/files/LocalStorage.java
@@ -431,7 +431,7 @@ public final class LocalStorage {
public static List<File> getStorages() {
String extStorage = Environment.getExternalStorageDirectory().getAbsolutePath();
- List<File> storages = new ArrayList<File>();
+ List<File> storages = new ArrayList<>();
storages.add(new File(extStorage));
File file = new File(FILE_SYSTEM_TABLE_PATH);
if (file.canRead()) {
diff --git a/main/src/cgeo/geocaching/files/SimpleDirChooser.java b/main/src/cgeo/geocaching/files/SimpleDirChooser.java
index 1e1296a..2aadf16 100644
--- a/main/src/cgeo/geocaching/files/SimpleDirChooser.java
+++ b/main/src/cgeo/geocaching/files/SimpleDirChooser.java
@@ -1,5 +1,7 @@
package cgeo.geocaching.files;
+import butterknife.ButterKnife;
+
import cgeo.geocaching.Intents;
import cgeo.geocaching.R;
import cgeo.geocaching.activity.AbstractListActivity;
@@ -45,7 +47,7 @@ public class SimpleDirChooser extends AbstractListActivity {
private boolean chooseForWriting = false;
@Override
- public void onCreate(Bundle savedInstanceState) {
+ public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final Bundle extras = getIntent().getExtras();
currentDir = dirContaining(extras.getString(Intents.EXTRA_START_DIR));
@@ -60,27 +62,27 @@ public class SimpleDirChooser extends AbstractListActivity {
resetOkButton();
okButton.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View v) {
+ public void onClick(final View v) {
setResult(RESULT_OK, new Intent()
.setData(Uri.fromFile(new File(currentDir, adapter.getItem(lastPosition).getName()))));
finish();
}
});
- Button cancelButton = (Button) findViewById(R.id.simple_dir_chooser_cancel);
+ final Button cancelButton = (Button) findViewById(R.id.simple_dir_chooser_cancel);
cancelButton.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View v) {
- Intent intent = new Intent();
+ public void onClick(final View v) {
+ final Intent intent = new Intent();
setResult(RESULT_CANCELED, intent);
finish();
}
});
- EditText pathField = (EditText) findViewById(R.id.simple_dir_chooser_path);
+ final EditText pathField = (EditText) findViewById(R.id.simple_dir_chooser_path);
pathField.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View v) {
+ public void onClick(final View v) {
editPath();
}
@@ -88,7 +90,7 @@ public class SimpleDirChooser extends AbstractListActivity {
}
public void editPath() {
- AlertDialog.Builder builder = new AlertDialog.Builder(this);
+ final AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.simple_dir_chooser_current_path);
final EditText input = new EditText(this);
input.setInputType(InputType.TYPE_CLASS_TEXT);
@@ -96,9 +98,9 @@ public class SimpleDirChooser extends AbstractListActivity {
builder.setView(input);
builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int which) {
- String pathText = input.getText().toString();
- File newPathDir = new File(pathText);
+ public void onClick(final DialogInterface dialog, final int which) {
+ final String pathText = input.getText().toString();
+ final File newPathDir = new File(pathText);
if (newPathDir.exists() && newPathDir.isDirectory()) {
currentDir = newPathDir;
fill(currentDir);
@@ -109,7 +111,7 @@ public class SimpleDirChooser extends AbstractListActivity {
});
builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int which) {
+ public void onClick(final DialogInterface dialog, final int which) {
dialog.cancel();
}
});
@@ -129,18 +131,18 @@ public class SimpleDirChooser extends AbstractListActivity {
Environment.getExternalStorageDirectory();
}
- private void fill(File dir) {
+ private void fill(final File dir) {
lastPosition = -1;
resetOkButton();
- EditText path = (EditText) findViewById(R.id.simple_dir_chooser_path);
+ final EditText path = (EditText) findViewById(R.id.simple_dir_chooser_path);
path.setText(this.getResources().getString(R.string.simple_dir_chooser_current_path) + " " + dir.getAbsolutePath());
final File[] dirs = dir.listFiles(new DirOnlyFilenameFilter());
- List<Option> listDirs = new ArrayList<Option>();
+ final List<Option> listDirs = new ArrayList<>();
try {
- for (File currentDir : dirs) {
+ for (final File currentDir : dirs) {
listDirs.add(new Option(currentDir.getName(), currentDir.getAbsolutePath(), currentDir.canWrite()));
}
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
}
Collections.sort(listDirs, Option.NAME_COMPARATOR);
if (dir.getParent() != null) {
@@ -159,11 +161,11 @@ public class SimpleDirChooser extends AbstractListActivity {
public class FileArrayAdapter extends ArrayAdapter<Option> {
- private Context context;
- private int id;
- private List<Option> items;
+ private final Context context;
+ private final int id;
+ private final List<Option> items;
- public FileArrayAdapter(Context context, int simpleDirItemResId, List<Option> objects) {
+ public FileArrayAdapter(final Context context, final int simpleDirItemResId, final List<Option> objects) {
super(context, simpleDirItemResId, objects);
this.context = context;
this.id = simpleDirItemResId;
@@ -171,26 +173,26 @@ public class SimpleDirChooser extends AbstractListActivity {
}
@Override
- public Option getItem(int index) {
+ public Option getItem(final int index) {
return items.get(index);
}
@Override
- public View getView(int position, View convertView, ViewGroup parent) {
+ public View getView(final int position, final View convertView, final ViewGroup parent) {
View v = convertView;
if (v == null) {
- LayoutInflater vi = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ final LayoutInflater vi = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(id, null);
}
final Option option = items.get(position);
if (option != null) {
- TextView t1 = (TextView) v.findViewById(R.id.TextView01);
+ final TextView t1 = ButterKnife.findById(v, R.id.TextView01);
if (t1 != null) {
t1.setOnClickListener(new OnTextViewClickListener(position));
t1.setText(option.getName());
}
- CheckBox check = (CheckBox) v.findViewById(R.id.CheckBox);
+ final CheckBox check = ButterKnife.findById(v, R.id.CheckBox);
if (check != null) {
if (!chooseForWriting || option.isWriteable()) {
check.setOnClickListener(new OnCheckBoxClickListener(position));
@@ -206,20 +208,20 @@ public class SimpleDirChooser extends AbstractListActivity {
}
public class OnTextViewClickListener implements OnClickListener {
- private int position;
+ private final int position;
- OnTextViewClickListener(int position) {
+ OnTextViewClickListener(final int position) {
this.position = position;
}
@Override
- public void onClick(View arg0) {
- Option option = adapter.getItem(position);
+ public void onClick(final View arg0) {
+ final Option option = adapter.getItem(position);
if (option.getName().equals(PARENT_DIR)) {
currentDir = new File(option.getPath());
fill(currentDir);
} else {
- File dir = new File(option.getPath());
+ final File dir = new File(option.getPath());
if (dir.list(new DirOnlyFilenameFilter()).length > 0) {
currentDir = dir;
fill(currentDir);
@@ -229,16 +231,16 @@ public class SimpleDirChooser extends AbstractListActivity {
}
public class OnCheckBoxClickListener implements OnClickListener {
- private int position;
+ private final int position;
- OnCheckBoxClickListener(int position) {
+ OnCheckBoxClickListener(final int position) {
this.position = position;
}
@Override
- public void onClick(View arg0) {
- Option lastOption = (lastPosition > -1) ? adapter.getItem(lastPosition) : null;
- Option currentOption = adapter.getItem(position);
+ public void onClick(final View arg0) {
+ final Option lastOption = (lastPosition > -1) ? adapter.getItem(lastPosition) : null;
+ final Option currentOption = adapter.getItem(position);
if (lastOption != null) {
lastOption.setChecked(false);
}
@@ -264,13 +266,13 @@ public class SimpleDirChooser extends AbstractListActivity {
private static Comparator<Option> NAME_COMPARATOR = new Comparator<SimpleDirChooser.Option>() {
@Override
- public int compare(Option lhs, Option rhs) {
+ public int compare(final Option lhs, final Option rhs) {
return String.CASE_INSENSITIVE_ORDER.compare(lhs.name, rhs.name);
}
};
- public Option(String name, String path, boolean writeable) {
+ public Option(final String name, final String path, final boolean writeable) {
this.name = name;
this.path = path;
this.writeable = writeable;
@@ -288,7 +290,7 @@ public class SimpleDirChooser extends AbstractListActivity {
return this.checked;
}
- public void setChecked(boolean checked) {
+ public void setChecked(final boolean checked) {
this.checked = checked;
}
@@ -300,8 +302,8 @@ public class SimpleDirChooser extends AbstractListActivity {
public static class DirOnlyFilenameFilter implements FilenameFilter {
@Override
- public boolean accept(File dir, String filename) {
- File file = new File(dir, filename);
+ public boolean accept(final File dir, final String filename) {
+ final File file = new File(dir, filename);
return file.isDirectory() && file.canRead();
}
diff --git a/main/src/cgeo/geocaching/filter/AbstractFilter.java b/main/src/cgeo/geocaching/filter/AbstractFilter.java
index 6bd8587..e602b0f 100644
--- a/main/src/cgeo/geocaching/filter/AbstractFilter.java
+++ b/main/src/cgeo/geocaching/filter/AbstractFilter.java
@@ -14,7 +14,7 @@ abstract class AbstractFilter implements IFilter {
@Override
public void filter(final List<Geocache> list) {
- final List<Geocache> itemsToRemove = new ArrayList<Geocache>();
+ final List<Geocache> itemsToRemove = new ArrayList<>();
for (Geocache item : list) {
if (!accepts(item)) {
itemsToRemove.add(item);
diff --git a/main/src/cgeo/geocaching/filter/AttributeFilter.java b/main/src/cgeo/geocaching/filter/AttributeFilter.java
index 552a48c..b59ab29 100644
--- a/main/src/cgeo/geocaching/filter/AttributeFilter.java
+++ b/main/src/cgeo/geocaching/filter/AttributeFilter.java
@@ -36,7 +36,7 @@ class AttributeFilter extends AbstractFilter {
final String packageName = CgeoApplication.getInstance().getBaseContext().getPackageName();
final Resources res = CgeoApplication.getInstance().getResources();
- final List<IFilter> filters = new LinkedList<IFilter>();
+ final List<IFilter> filters = new LinkedList<>();
for (final String id: res.getStringArray(R.array.attribute_ids)) {
filters.add(new AttributeFilter(getName("attribute_" + id, res, packageName), id));
}
diff --git a/main/src/cgeo/geocaching/filter/DifficultyFilter.java b/main/src/cgeo/geocaching/filter/DifficultyFilter.java
index 438c25a..175ad75 100644
--- a/main/src/cgeo/geocaching/filter/DifficultyFilter.java
+++ b/main/src/cgeo/geocaching/filter/DifficultyFilter.java
@@ -25,7 +25,7 @@ class DifficultyFilter extends AbstractRangeFilter {
@Override
public List<IFilter> getFilters() {
- final ArrayList<IFilter> filters = new ArrayList<IFilter>(DIFFICULTY_MAX);
+ final ArrayList<IFilter> filters = new ArrayList<>(DIFFICULTY_MAX);
for (int difficulty = DIFFICULTY_MIN; difficulty <= DIFFICULTY_MAX; difficulty++) {
filters.add(new DifficultyFilter(difficulty));
}
diff --git a/main/src/cgeo/geocaching/filter/DistanceFilter.java b/main/src/cgeo/geocaching/filter/DistanceFilter.java
index c217e7c..3328c72 100644
--- a/main/src/cgeo/geocaching/filter/DistanceFilter.java
+++ b/main/src/cgeo/geocaching/filter/DistanceFilter.java
@@ -40,7 +40,7 @@ class DistanceFilter extends AbstractFilter {
@Override
public List<IFilter> getFilters() {
- final List<IFilter> filters = new ArrayList<IFilter>(KILOMETERS.length);
+ final List<IFilter> filters = new ArrayList<>(KILOMETERS.length);
for (int i = 0; i < KILOMETERS.length; i++) {
final int minRange = KILOMETERS[i];
final int maxRange;
diff --git a/main/src/cgeo/geocaching/filter/FilterUserInterface.java b/main/src/cgeo/geocaching/filter/FilterUserInterface.java
index b6eaa78..9f1d563 100644
--- a/main/src/cgeo/geocaching/filter/FilterUserInterface.java
+++ b/main/src/cgeo/geocaching/filter/FilterUserInterface.java
@@ -44,7 +44,7 @@ public final class FilterUserInterface {
this.activity = activity;
this.res = CgeoApplication.getInstance().getResources();
- registry = new ArrayList<FactoryEntry>();
+ registry = new ArrayList<>();
if (Settings.getCacheType() == CacheType.ALL) {
register(R.string.caches_filter_type, TypeFilter.Factory.class);
}
@@ -82,7 +82,7 @@ public final class FilterUserInterface {
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(R.string.caches_filter_title);
- final ArrayAdapter<FactoryEntry> adapter = new ArrayAdapter<FactoryEntry>(activity, android.R.layout.select_dialog_item, registry);
+ final ArrayAdapter<FactoryEntry> adapter = new ArrayAdapter<>(activity, android.R.layout.select_dialog_item, registry);
builder.setAdapter(adapter, new DialogInterface.OnClickListener() {
@Override
@@ -116,7 +116,7 @@ public final class FilterUserInterface {
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(menuTitle);
- final ArrayAdapter<IFilter> adapter = new ArrayAdapter<IFilter>(activity, android.R.layout.select_dialog_item, filters);
+ final ArrayAdapter<IFilter> adapter = new ArrayAdapter<>(activity, android.R.layout.select_dialog_item, filters);
builder.setAdapter(adapter, new DialogInterface.OnClickListener() {
@Override
public void onClick(final DialogInterface dialog, final int item) {
diff --git a/main/src/cgeo/geocaching/filter/OriginFilter.java b/main/src/cgeo/geocaching/filter/OriginFilter.java
index 8c54a4c..99d1c05 100644
--- a/main/src/cgeo/geocaching/filter/OriginFilter.java
+++ b/main/src/cgeo/geocaching/filter/OriginFilter.java
@@ -27,7 +27,7 @@ public class OriginFilter extends AbstractFilter {
@Override
public List<OriginFilter> getFilters() {
- final ArrayList<OriginFilter> filters = new ArrayList<OriginFilter>();
+ final ArrayList<OriginFilter> filters = new ArrayList<>();
for (IConnector connector : ConnectorFactory.getConnectors()) {
filters.add(new OriginFilter(connector));
}
diff --git a/main/src/cgeo/geocaching/filter/PopularityFilter.java b/main/src/cgeo/geocaching/filter/PopularityFilter.java
index d4f54ef..a0244b9 100644
--- a/main/src/cgeo/geocaching/filter/PopularityFilter.java
+++ b/main/src/cgeo/geocaching/filter/PopularityFilter.java
@@ -28,7 +28,7 @@ class PopularityFilter extends AbstractFilter {
@Override
public List<IFilter> getFilters() {
- final List<IFilter> filters = new ArrayList<IFilter>(FAVORITES.length);
+ final List<IFilter> filters = new ArrayList<>(FAVORITES.length);
for (int i = 0; i < FAVORITES.length; i++) {
final int minRange = FAVORITES[i];
final int maxRange = Integer.MAX_VALUE;
diff --git a/main/src/cgeo/geocaching/filter/PopularityRatioFilter.java b/main/src/cgeo/geocaching/filter/PopularityRatioFilter.java
index 2d7207a..a04f219 100644
--- a/main/src/cgeo/geocaching/filter/PopularityRatioFilter.java
+++ b/main/src/cgeo/geocaching/filter/PopularityRatioFilter.java
@@ -24,22 +24,15 @@ class PopularityRatioFilter extends AbstractFilter {
@Override
public boolean accepts(final Geocache cache) {
+ final int finds = getFindsCount(cache);
- int finds;
- int favorites;
- float ratio;
-
- finds = getFindsCount(cache);
-
- // prevent division by zero
- if (finds == 0) {
+ if (finds == 0) { // Prevent division by zero
return false;
}
- favorites = cache.getFavoritePoints();
- ratio = ((float) favorites / (float) finds) * 100.0f;
-
- return (ratio > minRatio) && (ratio <= maxRatio);
+ final int favorites = cache.getFavoritePoints();
+ final float ratio = 100.0f * favorites / finds;
+ return ratio > minRatio && ratio <= maxRatio;
}
private static int getFindsCount(Geocache cache) {
@@ -59,7 +52,7 @@ class PopularityRatioFilter extends AbstractFilter {
@Override
public List<IFilter> getFilters() {
- final List<IFilter> filters = new ArrayList<IFilter>(RATIOS.length);
+ final List<IFilter> filters = new ArrayList<>(RATIOS.length);
for (int i = 0; i < RATIOS.length; i++) {
final int minRange = RATIOS[i];
final int maxRange = Integer.MAX_VALUE;
diff --git a/main/src/cgeo/geocaching/filter/SizeFilter.java b/main/src/cgeo/geocaching/filter/SizeFilter.java
index 13c1d87..f02874c 100644
--- a/main/src/cgeo/geocaching/filter/SizeFilter.java
+++ b/main/src/cgeo/geocaching/filter/SizeFilter.java
@@ -29,7 +29,7 @@ class SizeFilter extends AbstractFilter {
@Override
public List<IFilter> getFilters() {
final CacheSize[] cacheSizes = CacheSize.values();
- final List<IFilter> filters = new LinkedList<IFilter>();
+ final List<IFilter> filters = new LinkedList<>();
for (CacheSize cacheSize : cacheSizes) {
if (cacheSize != CacheSize.UNKNOWN) {
filters.add(new SizeFilter(cacheSize));
diff --git a/main/src/cgeo/geocaching/filter/StateFilter.java b/main/src/cgeo/geocaching/filter/StateFilter.java
index f452259..ebe133c 100644
--- a/main/src/cgeo/geocaching/filter/StateFilter.java
+++ b/main/src/cgeo/geocaching/filter/StateFilter.java
@@ -32,6 +32,19 @@ abstract class StateFilter extends AbstractFilter {
}
+ static class StateNotFoundFilter extends StateFilter {
+
+ public StateNotFoundFilter() {
+ super(res.getString(R.string.cache_not_status_found));
+ }
+
+ @Override
+ public boolean accepts(final Geocache cache) {
+ return !cache.isFound();
+ }
+
+ }
+
static class StateArchivedFilter extends StateFilter {
public StateArchivedFilter() {
super(res.getString(R.string.cache_status_archived));
@@ -113,8 +126,9 @@ abstract class StateFilter extends AbstractFilter {
@Override
public List<StateFilter> getFilters() {
- final List<StateFilter> filters = new ArrayList<StateFilter>(6);
+ final List<StateFilter> filters = new ArrayList<>(6);
filters.add(new StateFoundFilter());
+ filters.add(new StateNotFoundFilter());
filters.add(new StateArchivedFilter());
filters.add(new StateDisabledFilter());
filters.add(new StatePremiumFilter());
diff --git a/main/src/cgeo/geocaching/filter/TerrainFilter.java b/main/src/cgeo/geocaching/filter/TerrainFilter.java
index f14313c..7da6a19 100644
--- a/main/src/cgeo/geocaching/filter/TerrainFilter.java
+++ b/main/src/cgeo/geocaching/filter/TerrainFilter.java
@@ -24,7 +24,7 @@ class TerrainFilter extends AbstractRangeFilter {
@Override
public List<IFilter> getFilters() {
- final ArrayList<IFilter> filters = new ArrayList<IFilter>(TERRAIN_MAX);
+ final ArrayList<IFilter> filters = new ArrayList<>(TERRAIN_MAX);
for (int terrain = TERRAIN_MIN; terrain <= TERRAIN_MAX; terrain++) {
filters.add(new TerrainFilter(terrain));
}
diff --git a/main/src/cgeo/geocaching/filter/TypeFilter.java b/main/src/cgeo/geocaching/filter/TypeFilter.java
index ea0ccff..d363d39 100644
--- a/main/src/cgeo/geocaching/filter/TypeFilter.java
+++ b/main/src/cgeo/geocaching/filter/TypeFilter.java
@@ -29,7 +29,7 @@ class TypeFilter extends AbstractFilter {
@Override
public List<IFilter> getFilters() {
final CacheType[] types = CacheType.values();
- final List<IFilter> filters = new LinkedList<IFilter>();
+ final List<IFilter> filters = new LinkedList<>();
for (CacheType cacheType : types) {
if (cacheType != CacheType.ALL) {
filters.add(new TypeFilter(cacheType));
diff --git a/main/src/cgeo/geocaching/gcvote/GCVote.java b/main/src/cgeo/geocaching/gcvote/GCVote.java
index 0ab1fe3..8de3edc 100644
--- a/main/src/cgeo/geocaching/gcvote/GCVote.java
+++ b/main/src/cgeo/geocaching/gcvote/GCVote.java
@@ -1,6 +1,8 @@
package cgeo.geocaching.gcvote;
+import cgeo.geocaching.CgeoApplication;
import cgeo.geocaching.Geocache;
+import cgeo.geocaching.R;
import cgeo.geocaching.network.Network;
import cgeo.geocaching.network.Parameters;
import cgeo.geocaching.settings.Settings;
@@ -33,7 +35,7 @@ public final class GCVote {
private static final Pattern PATTERN_VOTE_ELEMENT = Pattern.compile("<vote ([^>]+)>", Pattern.CASE_INSENSITIVE);
private static final int MAX_CACHED_RATINGS = 1000;
- private static final LeastRecentlyUsedMap<String, GCVoteRating> RATINGS_CACHE = new LeastRecentlyUsedMap.LruCache<String, GCVoteRating>(MAX_CACHED_RATINGS);
+ private static final LeastRecentlyUsedMap<String, GCVoteRating> RATINGS_CACHE = new LeastRecentlyUsedMap.LruCache<>(MAX_CACHED_RATINGS);
private static final float MIN_RATING = 1;
private static final float MAX_RATING = 5;
@@ -74,7 +76,7 @@ public final class GCVote {
return null;
}
- final Map<String, GCVoteRating> ratings = new HashMap<String, GCVoteRating>();
+ final Map<String, GCVoteRating> ratings = new HashMap<>();
try {
final Parameters params = new Parameters();
@@ -253,13 +255,13 @@ public final class GCVote {
/**
* Get geocodes of all the caches, which can be used with GCVote. Non-GC caches will be filtered out.
- *
+ *
* @param caches
* @return
*/
private static @NonNull
ArrayList<String> getVotableGeocodes(final @NonNull Collection<Geocache> caches) {
- final ArrayList<String> geocodes = new ArrayList<String>(caches.size());
+ final ArrayList<String> geocodes = new ArrayList<>(caches.size());
for (final Geocache cache : caches) {
String geocode = cache.getGeocode();
if (StringUtils.isNotBlank(geocode) && cache.supportsGCVote()) {
@@ -281,4 +283,33 @@ public final class GCVote {
return Settings.isGCvoteLogin() && StringUtils.isNotBlank(cache.getGuid()) && cache.supportsGCVote();
}
+ public static String getDescription(final float rating) {
+ switch (Math.round(rating * 2f)) {
+ case 2:
+ return getString(R.string.log_stars_1_description);
+ case 3:
+ return getString(R.string.log_stars_15_description);
+ case 4:
+ return getString(R.string.log_stars_2_description);
+ case 5:
+ return getString(R.string.log_stars_25_description);
+ case 6:
+ return getString(R.string.log_stars_3_description);
+ case 7:
+ return getString(R.string.log_stars_35_description);
+ case 8:
+ return getString(R.string.log_stars_4_description);
+ case 9:
+ return getString(R.string.log_stars_45_description);
+ case 10:
+ return getString(R.string.log_stars_5_description);
+ default:
+ return getString(R.string.log_no_rating);
+ }
+ }
+
+ private static String getString(int resId) {
+ return CgeoApplication.getInstance().getString(resId);
+ }
+
}
diff --git a/main/src/cgeo/geocaching/geopoint/Geopoint.java b/main/src/cgeo/geocaching/geopoint/Geopoint.java
index 1655343..bb34114 100644
--- a/main/src/cgeo/geocaching/geopoint/Geopoint.java
+++ b/main/src/cgeo/geocaching/geopoint/Geopoint.java
@@ -556,15 +556,14 @@ public final class Geopoint implements ICoordinates, Parcelable {
* Gets distance in meters (workaround for 4.2.1 JIT bug).
*/
public static double getDistance(double lat1, double lon1, double lat2, double lon2) {
- double earthRadius = 6372.8; // for haversine use R = 6372.8 km instead of 6371 km
+ // for haversine use R = 6372.8 km instead of 6371 km
+ double earthRadius = 6372.8;
double dLat = toRadians(lat2 - lat1);
double dLon = toRadians(lon2 - lon1);
double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
Math.cos(toRadians(lat1)) * Math.cos(toRadians(lat2)) *
Math.sin(dLon / 2) * Math.sin(dLon / 2);
- //double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
- //return R * c * 1000;
- // simplify haversine:
+ // simplify haversine
return (2 * earthRadius * 1000 * Math.asin(Math.sqrt(a)));
}
@@ -582,8 +581,8 @@ public final class Geopoint implements ICoordinates, Parcelable {
}
/**
- * Check whether a lo bngitudeuilt from user supplied data is valid. We accept both E180/W180.
- *
+ * Check whether a longitude from user supplied data is valid. We accept both E180/W180.
+ *
* @return <tt>true</tt> if the longitude looks valid, <tt>false</tt> otherwise
*/
public static boolean isValidLongitude(final double longitude) {
diff --git a/main/src/cgeo/geocaching/geopoint/Units.java b/main/src/cgeo/geocaching/geopoint/Units.java
index b99e00e..018216d 100644
--- a/main/src/cgeo/geocaching/geopoint/Units.java
+++ b/main/src/cgeo/geocaching/geopoint/Units.java
@@ -4,6 +4,8 @@ import cgeo.geocaching.settings.Settings;
import org.apache.commons.lang3.tuple.ImmutablePair;
+import java.util.Locale;
+
public class Units {
public static ImmutablePair<Double, String> scaleDistance(final double distanceKilometers) {
@@ -26,7 +28,7 @@ public class Units {
units = "m";
}
}
- return new ImmutablePair<Double, String>(distance, units);
+ return new ImmutablePair<>(distance, units);
}
public static String getDistanceFromKilometers(final Float distanceKilometers) {
@@ -51,11 +53,10 @@ public class Units {
return getDistanceFromKilometers(meters / 1000f);
}
- public static String getSpeed(float kilometersPerHour) {
- final String speed = getDistanceFromKilometers(kilometersPerHour);
- if (speed.endsWith("mi")) {
- return speed.substring(0, speed.length() - 2) + "mph";
+ public static String getSpeed(final float kilometersPerHour) {
+ if (Settings.isUseImperialUnits()) {
+ return String.format(Locale.US, "%.0f mph", kilometersPerHour / IConversion.MILES_TO_KILOMETER);
}
- return speed + (!Settings.isUseImperialUnits() ? "/h" : "ph");
+ return String.format(Locale.US, "%.0f km/h", kilometersPerHour);
}
}
diff --git a/main/src/cgeo/geocaching/list/AbstractList.java b/main/src/cgeo/geocaching/list/AbstractList.java
index ec783eb..9b57b3a 100644
--- a/main/src/cgeo/geocaching/list/AbstractList.java
+++ b/main/src/cgeo/geocaching/list/AbstractList.java
@@ -8,7 +8,7 @@ public abstract class AbstractList {
public final int id;
public final String title;
- private static SparseArray<AbstractList> LISTS = new SparseArray<AbstractList>();
+ private static SparseArray<AbstractList> LISTS = new SparseArray<>();
public AbstractList(final int id, final String title) {
this.id = id;
@@ -20,6 +20,10 @@ public abstract class AbstractList {
public abstract boolean isConcrete();
+ public abstract String getTitle();
+
+ public abstract int getNumberOfCaches();
+
@Nullable
public static AbstractList getListById(int listId) {
return LISTS.get(listId);
diff --git a/main/src/cgeo/geocaching/list/PseudoList.java b/main/src/cgeo/geocaching/list/PseudoList.java
index f2cc7ed..9ee920c 100644
--- a/main/src/cgeo/geocaching/list/PseudoList.java
+++ b/main/src/cgeo/geocaching/list/PseudoList.java
@@ -1,32 +1,48 @@
package cgeo.geocaching.list;
import cgeo.geocaching.CgeoApplication;
+import cgeo.geocaching.DataStore;
import cgeo.geocaching.R;
-public class PseudoList extends AbstractList {
+public abstract class PseudoList extends AbstractList {
private static final int ALL_LIST_ID = 2;
/**
* list entry to show all caches
*/
- public static final PseudoList ALL_LIST = new PseudoList(ALL_LIST_ID, R.string.list_all_lists);
+ public static final PseudoList ALL_LIST = new PseudoList(ALL_LIST_ID, R.string.list_all_lists) {
+ @Override
+ public int getNumberOfCaches() {
+ return DataStore.getAllCachesCount();
+ }
+ };
private static final int NEW_LIST_ID = 3;
/**
* list entry to create a new list
*/
- public static final AbstractList NEW_LIST = new PseudoList(NEW_LIST_ID, R.string.list_menu_create);
+ public static final AbstractList NEW_LIST = new PseudoList(NEW_LIST_ID, R.string.list_menu_create) {
+ @Override
+ public int getNumberOfCaches() {
+ return -1;
+ }
+ };
private static final int HISTORY_LIST_ID = 4;
/**
* list entry to create a new list
*/
- public static final AbstractList HISTORY_LIST = new PseudoList(HISTORY_LIST_ID, R.string.menu_history);
+ public static final AbstractList HISTORY_LIST = new PseudoList(HISTORY_LIST_ID, R.string.menu_history) {
+ @Override
+ public int getNumberOfCaches() {
+ return DataStore.getAllHistoryCachesCount();
+ }
+ };
/**
* private constructor to have all instances as constants in the class
*/
- private PseudoList(int id, final int titleResourceId) {
+ private PseudoList(final int id, final int titleResourceId) {
super(id, CgeoApplication.getInstance().getResources().getString(titleResourceId));
}
@@ -36,6 +52,11 @@ public class PseudoList extends AbstractList {
}
@Override
+ public String getTitle() {
+ return title;
+ }
+
+ @Override
public boolean isConcrete() {
return false;
}
diff --git a/main/src/cgeo/geocaching/list/StoredList.java b/main/src/cgeo/geocaching/list/StoredList.java
index e557fc8..53632a0 100644
--- a/main/src/cgeo/geocaching/list/StoredList.java
+++ b/main/src/cgeo/geocaching/list/StoredList.java
@@ -16,6 +16,7 @@ import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.res.Resources;
+import java.lang.ref.WeakReference;
import java.text.Collator;
import java.util.ArrayList;
import java.util.Collections;
@@ -58,12 +59,12 @@ public final class StoredList extends AbstractList {
}
public static class UserInterface {
- private final Activity activity;
+ private final WeakReference<Activity> activityRef;
private final CgeoApplication app;
private final Resources res;
- public UserInterface(final Activity activity) {
- this.activity = activity;
+ public UserInterface(final @NonNull Activity activity) {
+ this.activityRef = new WeakReference<>(activity);
app = CgeoApplication.getInstance();
res = app.getResources();
}
@@ -77,33 +78,16 @@ public final class StoredList extends AbstractList {
}
public void promptForListSelection(final int titleId, @NonNull final Action1<Integer> runAfterwards, final boolean onlyConcreteLists, final int exceptListId, final String newListName) {
- final List<AbstractList> lists = new ArrayList<AbstractList>();
- lists.addAll(getSortedLists());
-
- if (exceptListId > StoredList.TEMPORARY_LIST_ID) {
- StoredList exceptList = DataStore.getList(exceptListId);
- if (exceptList != null) {
- lists.remove(exceptList);
- }
- }
-
- if (!onlyConcreteLists) {
- if (exceptListId != PseudoList.ALL_LIST.id) {
- lists.add(PseudoList.ALL_LIST);
- }
- if (exceptListId != PseudoList.HISTORY_LIST.id) {
- lists.add(PseudoList.HISTORY_LIST);
- }
- }
- lists.add(PseudoList.NEW_LIST);
+ final List<AbstractList> lists = getMenuLists(onlyConcreteLists, exceptListId);
- final List<CharSequence> listsTitle = new ArrayList<CharSequence>();
+ final List<CharSequence> listsTitle = new ArrayList<>();
for (AbstractList list : lists) {
listsTitle.add(list.getTitleAndCount());
}
final CharSequence[] items = new CharSequence[listsTitle.size()];
+ final Activity activity = activityRef.get();
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(res.getString(titleId));
builder.setItems(listsTitle.toArray(items), new DialogInterface.OnClickListener() {
@@ -122,6 +106,31 @@ public final class StoredList extends AbstractList {
builder.create().show();
}
+ public static List<AbstractList> getMenuLists(boolean onlyConcreteLists, int exceptListId) {
+ final List<AbstractList> lists = new ArrayList<>();
+ lists.addAll(getSortedLists());
+
+ if (exceptListId > StoredList.TEMPORARY_LIST_ID) {
+ StoredList exceptList = DataStore.getList(exceptListId);
+ if (exceptList != null) {
+ lists.remove(exceptList);
+ }
+ }
+
+ if (!onlyConcreteLists) {
+ if (exceptListId != PseudoList.ALL_LIST.id) {
+ lists.add(PseudoList.ALL_LIST);
+ }
+ if (exceptListId != PseudoList.HISTORY_LIST.id) {
+ lists.add(PseudoList.HISTORY_LIST);
+ }
+ }
+ if (exceptListId != PseudoList.NEW_LIST.id) {
+ lists.add(PseudoList.NEW_LIST);
+ }
+ return lists;
+ }
+
@NonNull
private static List<StoredList> getSortedLists() {
final Collator collator = Collator.getInstance();
@@ -151,6 +160,10 @@ public final class StoredList extends AbstractList {
@SuppressWarnings("unused")
@Override
public void call(final String listName) {
+ final Activity activity = activityRef.get();
+ if (activity == null) {
+ return;
+ }
final int newId = DataStore.createList(listName);
new StoredList(newId, listName, 0);
@@ -165,6 +178,10 @@ public final class StoredList extends AbstractList {
}
private void handleListNameInput(final String defaultValue, int dialogTitle, int buttonTitle, final Action1<String> runnable) {
+ final Activity activity = activityRef.get();
+ if (activity == null) {
+ return;
+ }
Dialogs.input(activity, dialogTitle, defaultValue, buttonTitle, new Action1<String>() {
@Override
@@ -193,14 +210,18 @@ public final class StoredList extends AbstractList {
}
/**
- * Get the list title. This method is not public by intention to make clients use the {@link UserInterface} class.
- *
- * @return
+ * Get the list title.
*/
- protected String getTitle() {
+ @Override
+ public String getTitle() {
return title;
}
+ @Override
+ public int getNumberOfCaches() {
+ return count;
+ }
+
/**
* Return the given list, if it is a concrete list. Return the default list otherwise.
*/
diff --git a/main/src/cgeo/geocaching/loaders/OfflineGeocacheListLoader.java b/main/src/cgeo/geocaching/loaders/OfflineGeocacheListLoader.java
index b80a1b8..0d5af6a 100644
--- a/main/src/cgeo/geocaching/loaders/OfflineGeocacheListLoader.java
+++ b/main/src/cgeo/geocaching/loaders/OfflineGeocacheListLoader.java
@@ -1,18 +1,20 @@
package cgeo.geocaching.loaders;
import cgeo.geocaching.DataStore;
+import cgeo.geocaching.Intents;
import cgeo.geocaching.SearchResult;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.settings.Settings;
import android.content.Context;
+import android.os.Bundle;
public class OfflineGeocacheListLoader extends AbstractSearchLoader {
- private int listId;
- private Geopoint searchCenter;
+ private final int listId;
+ private final Geopoint searchCenter;
- public OfflineGeocacheListLoader(Context context, Geopoint searchCenter, int listId) {
+ public OfflineGeocacheListLoader(final Context context, final Geopoint searchCenter, final int listId) {
super(context);
this.searchCenter = searchCenter;
this.listId = listId;
@@ -23,12 +25,14 @@ public class OfflineGeocacheListLoader extends AbstractSearchLoader {
return DataStore.getBatchOfStoredCaches(searchCenter, Settings.getCacheType(), listId);
}
- public void setListId(int listId) {
- this.listId = listId;
- }
-
- public void setSearchCenter(Geopoint searchCenter) {
- this.searchCenter = searchCenter;
+ /**
+ * @param listId
+ * @return the bundle needed for querying the LoaderManager for the offline list with the given id
+ */
+ public static Bundle getBundleForList(final int listId) {
+ final Bundle bundle = new Bundle();
+ bundle.putInt(Intents.EXTRA_LIST_ID, listId);
+ return bundle;
}
}
diff --git a/main/src/cgeo/geocaching/maps/AbstractMap.java b/main/src/cgeo/geocaching/maps/AbstractMap.java
index d341823..2eceadb 100644
--- a/main/src/cgeo/geocaching/maps/AbstractMap.java
+++ b/main/src/cgeo/geocaching/maps/AbstractMap.java
@@ -5,10 +5,11 @@ import cgeo.geocaching.maps.interfaces.MapActivityImpl;
import android.app.Activity;
import android.content.res.Resources;
+import android.os.Build;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
-import android.view.View;
+import android.view.Window;
/**
* Base class for the map activity. Delegates base class calls to the
@@ -31,7 +32,11 @@ public abstract class AbstractMap {
}
public void onCreate(Bundle savedInstanceState) {
+
mapActivity.superOnCreate(savedInstanceState);
+ if (Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB) {
+ mapActivity.getActivity().requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
+ }
}
public void onResume() {
@@ -64,8 +69,6 @@ public abstract class AbstractMap {
return mapActivity.superOnOptionsItemSelected(item);
}
- public abstract void goHome(View view);
-
public abstract void onSaveInstanceState(final Bundle outState);
}
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java
index 00aee36..2ca0cfd 100644
--- a/main/src/cgeo/geocaching/maps/CGeoMap.java
+++ b/main/src/cgeo/geocaching/maps/CGeoMap.java
@@ -1,5 +1,7 @@
package cgeo.geocaching.maps;
+import butterknife.ButterKnife;
+
import cgeo.geocaching.CacheListActivity;
import cgeo.geocaching.CgeoApplication;
import cgeo.geocaching.DataStore;
@@ -38,19 +40,19 @@ import cgeo.geocaching.utils.AngleUtils;
import cgeo.geocaching.utils.CancellableHandler;
import cgeo.geocaching.utils.LeastRecentlyUsedSet;
import cgeo.geocaching.utils.Log;
+import cgeo.geocaching.utils.MapUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.eclipse.jdt.annotation.NonNull;
-import rx.Scheduler;
import rx.Subscription;
+import rx.functions.Action0;
import rx.functions.Action1;
import rx.schedulers.Schedulers;
-import rx.subscriptions.CompositeSubscription;
import rx.subscriptions.Subscriptions;
+import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
@@ -61,18 +63,20 @@ import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.location.Location;
+import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
-import android.util.SparseArray;
import android.view.Menu;
import android.view.MenuItem;
import android.view.SubMenu;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
+import android.widget.CheckBox;
import android.widget.ImageSwitcher;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
+import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.ViewSwitcher.ViewFactory;
@@ -92,11 +96,14 @@ import java.util.concurrent.TimeUnit;
/**
* Class representing the Map in c:geo
*/
-public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFactory {
+public class CGeoMap extends AbstractMap implements ViewFactory {
/** max. number of caches displayed in the Live Map */
public static final int MAX_CACHES = 500;
- private CompositeSubscription resumeSubscription;
+ /**
+ * initialization with an empty subscription to make static code analysis tools more happy
+ */
+ private Subscription resumeSubscription = Subscriptions.empty();
/** Controls the behavior of the map */
public enum MapMode {
@@ -133,11 +140,17 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
private static final String BUNDLE_LIVE_ENABLED = "liveEnabled";
private static final String BUNDLE_TRAIL_HISTORY = "trailHistory";
- private Resources res = null;
- private MapItemFactory mapItemFactory = null;
- private Activity activity = null;
- private MapViewImpl mapView = null;
- private CgeoApplication app = null;
+ // Those are initialized in onCreate() and will never be null afterwards
+ private Resources res;
+ private Activity activity;
+ private CgeoApplication app;
+ private MapItemFactory mapItemFactory;
+ private String mapTitle;
+ private LeastRecentlyUsedSet<Geocache> caches;
+ private MapViewImpl mapView;
+ private CachesOverlay overlayCaches;
+ private PositionAndScaleOverlay overlayPositionAndScale;
+
final private GeoDirHandler geoDirUpdate;
private SearchResult searchIntent = null;
private String geocodeIntent = null;
@@ -151,8 +164,6 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
private boolean noMapTokenShowed = false;
// map status data
private boolean followMyLocation = false;
- private Viewport viewport = null;
- private int zoom = -100;
// threads
private Subscription loadTimer;
private LoadDetails loadDetailsThread = null;
@@ -160,33 +171,20 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
private volatile long loadThreadRun = 0L;
//Interthread communication flag
private volatile boolean downloaded = false;
- // overlays
- private CachesOverlay overlayCaches = null;
- private PositionAndScaleOverlay overlayPositionAndScale = null;
- // data for overlays
- private static final int[][] INSET_RELIABLE = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } }; // center, 33x40 / 45x51 / 60x68
- private static final int[][] INSET_TYPE = { { 5, 8, 6, 10 }, { 4, 4, 5, 11 }, { 4, 4, 5, 11 } }; // center, 22x22 / 36x36
- private static final int[][] INSET_OWN = { { 21, 0, 0, 26 }, { 25, 0, 0, 35 }, { 40, 0, 0, 48 } }; // top right, 12x12 / 16x16 / 20x20
- private static final int[][] INSET_FOUND = { { 0, 0, 21, 28 }, { 0, 0, 25, 35 }, { 0, 0, 40, 48 } }; // top left, 12x12 / 16x16 / 20x20
- private static final int[][] INSET_USERMODIFIEDCOORDS = { { 21, 28, 0, 0 }, { 19, 25, 0, 0 }, { 25, 33, 0, 0 } }; // bottom right, 12x12 / 26x26 / 35x35
- private static final int[][] INSET_PERSONALNOTE = { { 0, 28, 21, 0 }, { 0, 25, 19, 0 }, { 0, 33, 25, 0 } }; // bottom left, 12x12 / 26x26 / 35x35
-
- private SparseArray<LayerDrawable> overlaysCache = new SparseArray<LayerDrawable>();
+
/** Count of caches currently visible */
private int cachesCnt = 0;
- /** List of caches in the viewport */
- private LeastRecentlyUsedSet<Geocache> caches = null;
/** List of waypoints in the viewport */
- private final LeastRecentlyUsedSet<Waypoint> waypoints = new LeastRecentlyUsedSet<Waypoint>(MAX_CACHES);
+ private final LeastRecentlyUsedSet<Waypoint> waypoints = new LeastRecentlyUsedSet<>(MAX_CACHES);
// storing for offline
private ProgressDialog waitDialog = null;
private int detailTotal = 0;
private int detailProgress = 0;
private long detailProgressTime = 0L;
- // views
- private ImageSwitcher myLocSwitch = null;
- /** Controls the map behaviour */
+ // views
+ private CheckBox myLocSwitch = null;
+ /** Controls the map behavior */
private MapMode mapMode = null;
/** Live mode enabled for map. **/
private boolean isLiveEnabled;
@@ -194,90 +192,147 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
private boolean markersInvalidated = false; // previous state for loadTimer
private boolean centered = false; // if map is already centered
private boolean alreadyCentered = false; // -""- for setting my location
- private static final Set<String> dirtyCaches = new HashSet<String>();
+ private static final Set<String> dirtyCaches = new HashSet<>();
+
/**
* if live map is enabled, this is the minimum zoom level, independent of the stored setting
*/
private static final int MIN_LIVEMAP_ZOOM = 12;
-
// Thread pooling
- private static BlockingQueue<Runnable> displayQueue = new ArrayBlockingQueue<Runnable>(1);
+ private static BlockingQueue<Runnable> displayQueue = new ArrayBlockingQueue<>(1);
private static ThreadPoolExecutor displayExecutor = new ThreadPoolExecutor(1, 1, 60, TimeUnit.SECONDS, displayQueue, new ThreadPoolExecutor.DiscardOldestPolicy());
- private static BlockingQueue<Runnable> downloadQueue = new ArrayBlockingQueue<Runnable>(1);
+ private static BlockingQueue<Runnable> downloadQueue = new ArrayBlockingQueue<>(1);
private static ThreadPoolExecutor downloadExecutor = new ThreadPoolExecutor(1, 1, 60, TimeUnit.SECONDS, downloadQueue, new ThreadPoolExecutor.DiscardOldestPolicy());
- private static BlockingQueue<Runnable> loadQueue = new ArrayBlockingQueue<Runnable>(1);
- private static ThreadPoolExecutor loadExecutor = new ThreadPoolExecutor(1, 1, 60, TimeUnit.SECONDS, loadQueue, new ThreadPoolExecutor.DiscardOldestPolicy());
+ private static BlockingQueue<Runnable> loadQueue = new ArrayBlockingQueue<>(1);
+ private static ThreadPoolExecutor loadExecutor = new ThreadPoolExecutor(1, 1, 60, TimeUnit.SECONDS, loadQueue, new ThreadPoolExecutor.DiscardOldestPolicy());
// handlers
/** Updates the titles */
- final private Handler displayHandler = new Handler() {
+ private final static class DisplayHandler extends Handler {
+
+ private final WeakReference<CGeoMap> mapRef;
+
+ public DisplayHandler(@NonNull final CGeoMap map) {
+ this.mapRef = new WeakReference<>(map);
+ }
@Override
- public void handleMessage(Message msg) {
+ public void handleMessage(final Message msg) {
final int what = msg.what;
+ final CGeoMap map = mapRef.get();
+ if (map == null) {
+ return;
+ }
switch (what) {
case UPDATE_TITLE:
// set title
final StringBuilder title = new StringBuilder();
- if (mapMode == MapMode.LIVE && isLiveEnabled) {
- title.append(res.getString(R.string.map_live));
+ if (map.mapMode == MapMode.LIVE && map.isLiveEnabled) {
+ title.append(map.res.getString(R.string.map_live));
} else {
- title.append(mapTitle);
+ title.append(map.mapTitle);
}
- countVisibleCaches();
- if (caches != null && !caches.isEmpty() && !mapTitle.contains("[")) {
- title.append(" [").append(cachesCnt);
- if (cachesCnt != caches.size()) {
- title.append('/').append(caches.size());
+ map.countVisibleCaches();
+ if (!map.caches.isEmpty() && !map.mapTitle.contains("[")) {
+ title.append(" [").append(map.cachesCnt);
+ if (map.cachesCnt != map.caches.size()) {
+ title.append('/').append(map.caches.size());
}
title.append(']');
}
- if (Settings.isDebug() && lastSearchResult != null && StringUtils.isNotBlank(lastSearchResult.getUrl())) {
- title.append('[').append(lastSearchResult.getUrl()).append(']');
+ if (Settings.isDebug() && map.lastSearchResult != null && StringUtils.isNotBlank(map.lastSearchResult.getUrl())) {
+ title.append('[').append(map.lastSearchResult.getUrl()).append(']');
}
- ActivityMixin.setTitle(activity, title.toString());
+ map.setTitle(title.toString());
break;
case INVALIDATE_MAP:
- mapView.repaintRequired(null);
+ map.mapView.repaintRequired(null);
break;
default:
break;
}
}
- };
- /** Updates the progress. */
- final private Handler showProgressHandler = new Handler() {
+ }
+
+ final private Handler displayHandler = new DisplayHandler(this);
+
+ private void setTitle(final String title) {
+ /* Compatibility for the old Action Bar, only used by the maps activity at the moment */
+ final TextView titleview = ButterKnife.findById(activity, R.id.actionbar_title);
+ if (titleview != null) {
+ titleview.setText(title);
+
+ }
+ if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)) {
+ setTitleHoneyComb(title);
+ }
+ }
+
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB)
+ private void setTitleHoneyComb(final String title) {
+ activity.getActionBar().setTitle(title);
+ }
+ /** Updates the progress. */
+ private static final class ShowProgressHandler extends Handler {
private int counter = 0;
+ @NonNull private final WeakReference<CGeoMap> mapRef;
+
+ public ShowProgressHandler(@NonNull final CGeoMap map) {
+ this.mapRef = new WeakReference<>(map);
+ }
+
@Override
- public void handleMessage(Message msg) {
+ public void handleMessage(final Message msg) {
final int what = msg.what;
if (what == HIDE_PROGRESS) {
if (--counter == 0) {
- ActivityMixin.showProgress(activity, false);
+ showProgress(false);
}
} else if (what == SHOW_PROGRESS) {
- ActivityMixin.showProgress(activity, true);
+ showProgress(true);
counter++;
}
}
- };
+ private void showProgress(final boolean show) {
+ final CGeoMap map = mapRef.get();
+ if (map == null) {
+ return;
+ }
+
+ final ProgressBar progress = (ProgressBar) map.activity.findViewById(R.id.actionbar_progress);
+ if (progress != null) {
+ if (show) {
+ progress.setVisibility(View.VISIBLE);
+ } else {
+ progress.setVisibility(View.GONE);
+
+ }
+ }
+ if (Build.VERSION.SDK_INT >= 11) {
+ map.activity.setProgressBarIndeterminateVisibility(show);
+ }
+ }
+
+ }
+
+ final private Handler showProgressHandler = new ShowProgressHandler(this);
final private class LoadDetailsHandler extends CancellableHandler {
@Override
- public void handleRegularMessage(Message msg) {
+ public void handleRegularMessage(final Message msg) {
if (msg.what == UPDATE_PROGRESS) {
if (waitDialog != null) {
- int secondsElapsed = (int) ((System.currentTimeMillis() - detailProgressTime) / 1000);
+ final int secondsElapsed = (int) ((System.currentTimeMillis() - detailProgressTime) / 1000);
int secondsRemaining;
if (detailProgress > 0) {
secondsRemaining = (detailTotal - detailProgress) * secondsElapsed / detailProgress;
@@ -289,8 +344,8 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
if (secondsRemaining < 40) {
waitDialog.setMessage(res.getString(R.string.caches_downloading) + " " + res.getString(R.string.caches_eta_ltm));
} else {
- int minsRemaining = secondsRemaining / 60;
- waitDialog.setMessage(res.getString(R.string.caches_downloading) + " " + minsRemaining + " " + res.getQuantityString(R.plurals.caches_eta_mins, minsRemaining));
+ final int minsRemaining = secondsRemaining / 60;
+ waitDialog.setMessage(res.getString(R.string.caches_downloading) + " " + res.getQuantityString(R.plurals.caches_eta_mins, minsRemaining, minsRemaining));
}
}
} else if (msg.what == FINISHED_LOADING_DETAILS) {
@@ -300,35 +355,19 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
}
}
}
-
@Override
public void handleCancel(final Object extra) {
if (loadDetailsThread != null) {
loadDetailsThread.stopIt();
}
}
- }
- final private Handler noMapTokenHandler = new Handler() {
-
- @Override
- public void handleMessage(Message msg) {
- if (!noMapTokenShowed) {
- ActivityMixin.showToast(activity, res.getString(R.string.map_token_err));
-
- noMapTokenShowed = true;
- }
- }
- };
- /**
- * calling activities can set the map title via extras
- */
- private String mapTitle;
+ }
/* Current source id */
private int currentSourceId;
- public CGeoMap(MapActivityImpl activity) {
+ public CGeoMap(final MapActivityImpl activity) {
super(activity);
geoDirUpdate = new UpdateLoc(this);
}
@@ -356,13 +395,12 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
outState.putInt(BUNDLE_MAP_SOURCE, currentSourceId);
outState.putIntArray(BUNDLE_MAP_STATE, currentMapState());
outState.putBoolean(BUNDLE_LIVE_ENABLED, isLiveEnabled);
- if (overlayPositionAndScale != null) {
- outState.putParcelableArrayList(BUNDLE_TRAIL_HISTORY, overlayPositionAndScale.getHistory());
- }
+ outState.putParcelableArrayList(BUNDLE_TRAIL_HISTORY, overlayPositionAndScale.getHistory());
}
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB)
@Override
- public void onCreate(Bundle savedInstanceState) {
+ public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// class init
@@ -370,8 +408,8 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
activity = this.getActivity();
app = (CgeoApplication) activity.getApplication();
- int countBubbleCnt = DataStore.getAllCachesCount();
- caches = new LeastRecentlyUsedSet<Geocache>(MAX_CACHES + countBubbleCnt);
+ final int countBubbleCnt = DataStore.getAllCachesCount();
+ caches = new LeastRecentlyUsedSet<>(MAX_CACHES + countBubbleCnt);
final MapProvider mapProvider = Settings.getMapProvider();
mapItemFactory = mapProvider.getMapItemFactory();
@@ -418,10 +456,14 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
ActivityMixin.keepScreenOn(activity, true);
+
// set layout
ActivityMixin.setTheme(activity);
+ if (Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB) {
+ activity.getActionBar().setDisplayHomeAsUpEnabled(true);
+ }
activity.setContentView(mapProvider.getMapLayoutId());
- ActivityMixin.setTitle(activity, res.getString(R.string.map_map));
+ setTitle(res.getString(R.string.map_map));
// initialize map
mapView = (MapViewImpl) activity.findViewById(mapProvider.getMapViewId());
@@ -429,20 +471,15 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
mapView.setBuiltInZoomControls(true);
mapView.displayZoomControls(true);
mapView.preLoad();
- mapView.setOnDragListener(this);
+ mapView.setOnDragListener(new MapDragListener(this));
// initialize overlays
mapView.clearOverlays();
- if (overlayCaches == null) {
- overlayCaches = mapView.createAddMapOverlay(mapView.getContext(), getResources().getDrawable(R.drawable.marker));
- }
-
- if (overlayPositionAndScale == null) {
- overlayPositionAndScale = mapView.createAddPositionAndScaleOverlay(activity);
- if (trailHistory != null) {
- overlayPositionAndScale.setHistory(trailHistory);
- }
+ overlayCaches = mapView.createAddMapOverlay(mapView.getContext(), getResources().getDrawable(R.drawable.marker));
+ overlayPositionAndScale = mapView.createAddPositionAndScaleOverlay();
+ if (trailHistory != null) {
+ overlayPositionAndScale.setHistory(trailHistory);
}
mapView.repaintRequired(null);
@@ -462,14 +499,11 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
centerMap(geocodeIntent, searchIntent, coordsIntent, mapStateIntent);
}
- // prepare my location button
- myLocSwitch = (ImageSwitcher) activity.findViewById(R.id.my_position);
- myLocSwitch.setFactory(this);
- myLocSwitch.setInAnimation(activity, android.R.anim.fade_in);
- myLocSwitch.setOutAnimation(activity, android.R.anim.fade_out);
- myLocSwitch.setOnClickListener(new MyLocationListener());
- switchMyLocationButton();
+ final CheckBox locSwitch = ButterKnife.findById(activity, R.id.my_position);
+ if (locSwitch!=null) {
+ initMyLocationSwitchButton(locSwitch);
+ }
prepareFilterBar();
if (!app.isLiveMapHintShownInThisSession() && !Settings.getHideLiveMapHint() && Settings.getLiveMapHintShowCount() <= 3) {
@@ -477,6 +511,16 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
}
}
+ private void initMyLocationSwitchButton(final CheckBox locSwitch) {
+ myLocSwitch = locSwitch;
+ /* TODO: Switch back to ImageSwitcher for animations?
+ myLocSwitch.setFactory(this);
+ myLocSwitch.setInAnimation(activity, android.R.anim.fade_in);
+ myLocSwitch.setOutAnimation(activity, android.R.anim.fade_out); */
+ myLocSwitch.setOnClickListener(new MyLocationListener(this));
+ switchMyLocationButton();
+ }
+
/**
* Set the zoom of the map. The zoom is restricted to a certain minimum in case of live map.
*
@@ -489,8 +533,9 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
private void prepareFilterBar() {
// show the filter warning bar if the filter is set
if (Settings.getCacheType() != CacheType.ALL) {
- String cacheType = Settings.getCacheType().getL10n();
- ((TextView) activity.findViewById(R.id.filter_text)).setText(cacheType);
+ final String cacheType = Settings.getCacheType().getL10n();
+ final TextView filterTitleView = ButterKnife.findById(activity, R.id.filter_text);
+ filterTitleView.setText(cacheType);
activity.findViewById(R.id.filter_bar).setVisibility(View.VISIBLE);
} else {
activity.findViewById(R.id.filter_bar).setVisibility(View.GONE);
@@ -503,8 +548,8 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
resumeSubscription = Subscriptions.from(geoDirUpdate.start(GeoDirHandler.UPDATE_GEODIR), startTimer());
if (!CollectionUtils.isEmpty(dirtyCaches)) {
- for (String geocode : dirtyCaches) {
- Geocache cache = DataStore.loadCache(geocode, LoadFlags.LOAD_WAYPOINTS);
+ for (final String geocode : dirtyCaches) {
+ final Geocache cache = DataStore.loadCache(geocode, LoadFlags.LOAD_WAYPOINTS);
if (cache != null) {
// new collection type needs to remove first
caches.remove(cache);
@@ -514,7 +559,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
}
dirtyCaches.clear();
// Update display
- displayExecutor.execute(new DisplayRunnable(mapView.getViewport()));
+ displayExecutor.execute(new DisplayRunnable(this));
}
}
@@ -523,17 +568,16 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
resumeSubscription.unsubscribe();
savePrefs();
- if (mapView != null) {
- mapView.destroyDrawingCache();
- }
+ mapView.destroyDrawingCache();
- overlaysCache.clear();
+ MapUtils.clearCachedItems();
super.onPause();
}
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB)
@Override
- public boolean onCreateOptionsMenu(Menu menu) {
+ public boolean onCreateOptionsMenu(final Menu menu) {
// menu inflation happens in Google/Mapsforge specific classes
super.onCreateOptionsMenu(menu);
@@ -541,26 +585,35 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
final SubMenu subMenuStrategy = menu.findItem(R.id.submenu_strategy).getSubMenu();
subMenuStrategy.setHeaderTitle(res.getString(R.string.map_strategy_title));
+
+
+ if (Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB) {
+ /* if we have an Actionbar find the my position toggle */
+ final MenuItem item = menu.findItem(R.id.menu_toggle_mypos);
+ myLocSwitch = new CheckBox(activity);
+ myLocSwitch.setButtonDrawable(R.drawable.ic_menu_myposition);
+ item.setActionView(myLocSwitch);
+ initMyLocationSwitchButton(myLocSwitch);
+ } else {
+ // Already on the fake Actionbar
+ menu.removeItem(R.id.menu_toggle_mypos);
+ }
return true;
}
@Override
- public boolean onPrepareOptionsMenu(Menu menu) {
+ public boolean onPrepareOptionsMenu(final Menu menu) {
super.onPrepareOptionsMenu(menu);
- for (MapSource mapSource : MapProviderFactory.getMapSources()) {
+ for (final MapSource mapSource : MapProviderFactory.getMapSources()) {
final MenuItem menuItem = menu.findItem(mapSource.getNumericalId());
if (menuItem != null) {
- menuItem.setEnabled(mapSource.isAvailable());
+ menuItem.setVisible(mapSource.isAvailable());
}
}
try {
MenuItem item = menu.findItem(R.id.menu_trail_mode);
- if (Settings.isMapTrail()) {
- item.setTitle(res.getString(R.string.map_trail_hide));
- } else {
- item.setTitle(res.getString(R.string.map_trail_show));
- }
+ item.setChecked(Settings.isMapTrail());
item = menu.findItem(R.id.menu_map_live); // live map
if (isLiveEnabled) {
@@ -570,28 +623,20 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
}
item = menu.findItem(R.id.menu_mycaches_mode); // own & found caches
- if (Settings.isExcludeMyCaches()) {
- item.setTitle(res.getString(R.string.map_mycaches_show));
- } else {
- item.setTitle(res.getString(R.string.map_mycaches_hide));
- }
+ item.setChecked(Settings.isExcludeMyCaches());
final Set<String> geocodesInViewport = getGeocodesForCachesInViewport();
- menu.findItem(R.id.menu_store_caches).setEnabled(!isLoading() && CollectionUtils.isNotEmpty(geocodesInViewport) && new SearchResult(geocodesInViewport).hasUnsavedCaches());
+ menu.findItem(R.id.menu_store_caches).setVisible(!isLoading() && CollectionUtils.isNotEmpty(geocodesInViewport) && new SearchResult(geocodesInViewport).hasUnsavedCaches());
item = menu.findItem(R.id.menu_circle_mode); // show circles
- if (overlayCaches != null && overlayCaches.getCircles()) {
- item.setTitle(res.getString(R.string.map_circles_hide));
- } else {
- item.setTitle(res.getString(R.string.map_circles_show));
- }
+ item.setChecked(overlayCaches.getCircles());
item = menu.findItem(R.id.menu_theme_mode); // show theme selection
item.setVisible(mapView.hasMapThemes());
- menu.findItem(R.id.menu_as_list).setEnabled(!isLoading());
+ menu.findItem(R.id.menu_as_list).setVisible(!isLoading());
- menu.findItem(R.id.submenu_strategy).setEnabled(isLiveEnabled);
+ menu.findItem(R.id.submenu_strategy).setVisible(isLiveEnabled);
switch (Settings.getLiveMapStrategy()) {
case FASTEST:
@@ -606,7 +651,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
default: // DETAILED
menu.findItem(R.id.menu_strategy_detailed).setChecked(true);
}
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
Log.e("CGeoMap.onPrepareOptionsMenu", e);
}
@@ -614,9 +659,12 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
}
@Override
- public boolean onOptionsItemSelected(MenuItem item) {
+ public boolean onOptionsItemSelected(final MenuItem item) {
final int id = item.getItemId();
switch (id) {
+ case android.R.id.home:
+ ActivityMixin.navigateUp(activity);
+ return true;
case R.id.menu_trail_mode:
Settings.setMapTrail(!Settings.isMapTrail());
mapView.repaintRequired(overlayPositionAndScale);
@@ -635,7 +683,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
case R.id.menu_store_caches:
if (!isLoading()) {
final Set<String> geocodesInViewport = getGeocodesForCachesInViewport();
- final List<String> geocodes = new ArrayList<String>();
+ final List<String> geocodes = new ArrayList<>();
for (final String geocode : geocodesInViewport) {
if (!DataStore.isOffline(geocode, null)) {
@@ -667,10 +715,6 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
}
return true;
case R.id.menu_circle_mode:
- if (overlayCaches == null) {
- return false;
- }
-
overlayCaches.switchCircles();
mapView.repaintRequired(overlayCaches);
ActivityMixin.invalidateOptionsMenu(activity);
@@ -726,16 +770,16 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
final File[] themeFiles = Settings.getMapThemeFiles();
String currentTheme = StringUtils.EMPTY;
- String currentThemePath = Settings.getCustomRenderThemeFilePath();
+ final String currentThemePath = Settings.getCustomRenderThemeFilePath();
if (StringUtils.isNotEmpty(currentThemePath)) {
- File currentThemeFile = new File(currentThemePath);
+ final File currentThemeFile = new File(currentThemePath);
currentTheme = currentThemeFile.getName();
}
- List<String> names = new ArrayList<String>();
+ final List<String> names = new ArrayList<>();
names.add(res.getString(R.string.map_theme_builtin));
int currentItem = 0;
- for (File file : themeFiles) {
+ for (final File file : themeFiles) {
if (currentTheme.equalsIgnoreCase(file.getName())) {
currentItem = names.size();
}
@@ -744,7 +788,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
final int selectedItem = currentItem;
- AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+ final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(R.string.map_theme_select);
@@ -752,7 +796,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int newItem) {
+ public void onClick(final DialogInterface dialog, final int newItem) {
if (newItem != selectedItem) {
// Adjust index because of <default> selection
if (newItem > 0) {
@@ -773,7 +817,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
* @return a non-null Set of geocodes corresponding to the caches that are shown on screen.
*/
private Set<String> getGeocodesForCachesInViewport() {
- final Set<String> geocodes = new HashSet<String>();
+ final Set<String> geocodes = new HashSet<>();
final List<Geocache> cachesProtected = caches.getAsList();
final Viewport viewport = mapView.getViewport();
@@ -802,7 +846,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
if (restartRequired) {
mapRestart();
- } else if (mapView != null) {
+ } else if (mapView != null) { // changeMapSource can be called by onCreate()
mapView.setMapSource();
ActivityMixin.invalidateOptionsMenu(activity);
}
@@ -818,7 +862,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
activity.finish();
// prepare information to restart a similar view
- Intent mapIntent = new Intent(activity, Settings.getMapProvider().getMapClass());
+ final Intent mapIntent = new Intent(activity, Settings.getMapProvider().getMapClass());
mapIntent.putExtra(EXTRAS_SEARCH, searchIntent);
mapIntent.putExtra(EXTRAS_GEOCODE, geocodeIntent);
@@ -845,10 +889,6 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
* @return the current map state as an array of int, or null if no map state is available
*/
private int[] currentMapState() {
- if (mapView == null) {
- return mapStateIntent;
- }
-
final GeoPointImpl mapCenter = mapView.getMapViewCenter();
return new int[] {
mapCenter.getLatitudeE6(),
@@ -860,10 +900,6 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
}
private void savePrefs() {
- if (mapView == null) {
- return;
- }
-
Settings.setMapZoom(mapView.getMapZoomLevel());
Settings.setMapCenter(mapView.getMapViewCenter());
}
@@ -894,10 +930,10 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
/**
* weak reference to the outer class
*/
- private final WeakReference<CGeoMap> map;
+ private final WeakReference<CGeoMap> mapRef;
- public UpdateLoc(CGeoMap map) {
- this.map = new WeakReference<CGeoMap>(map);
+ public UpdateLoc(final CGeoMap map) {
+ mapRef = new WeakReference<>(map);
}
@Override
@@ -922,41 +958,35 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
timeLastPositionOverlayCalculation = currentTimeMillis;
try {
- CGeoMap cgeoMapRef = map.get();
- if (cgeoMapRef != null) {
- if (cgeoMapRef.mapView != null) {
- if (cgeoMapRef.overlayPositionAndScale == null) {
- cgeoMapRef.overlayPositionAndScale = cgeoMapRef.mapView.createAddPositionAndScaleOverlay(cgeoMapRef.activity);
- }
-
- boolean needsRepaintForDistance = needsRepaintForDistance();
- boolean needsRepaintForHeading = needsRepaintForHeading();
-
- if (needsRepaintForDistance) {
- if (cgeoMapRef.followMyLocation) {
- cgeoMapRef.centerMap(new Geopoint(currentLocation));
- }
+ final CGeoMap map = mapRef.get();
+ if (map != null) {
+ final boolean needsRepaintForDistance = needsRepaintForDistance();
+ final boolean needsRepaintForHeading = needsRepaintForHeading();
+
+ if (needsRepaintForDistance) {
+ if (map.followMyLocation) {
+ map.centerMap(new Geopoint(currentLocation));
}
+ }
- if (needsRepaintForDistance || needsRepaintForHeading) {
- cgeoMapRef.overlayPositionAndScale.setCoordinates(currentLocation);
- cgeoMapRef.overlayPositionAndScale.setHeading(currentHeading);
- cgeoMapRef.mapView.repaintRequired(cgeoMapRef.overlayPositionAndScale);
- }
+ if (needsRepaintForDistance || needsRepaintForHeading) {
+ map.overlayPositionAndScale.setCoordinates(currentLocation);
+ map.overlayPositionAndScale.setHeading(currentHeading);
+ map.mapView.repaintRequired(map.overlayPositionAndScale);
}
}
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
Log.w("Failed to update location.");
}
}
}
boolean needsRepaintForHeading() {
- final CGeoMap cgeoMapRef = map.get();
- if (cgeoMapRef == null) {
+ final CGeoMap map = mapRef.get();
+ if (map == null) {
return false;
}
- return Math.abs(AngleUtils.difference(currentHeading, cgeoMapRef.overlayPositionAndScale.getHeading())) > MIN_HEADING_DELTA;
+ return Math.abs(AngleUtils.difference(currentHeading, map.overlayPositionAndScale.getHeading())) > MIN_HEADING_DELTA;
}
boolean needsRepaintForDistance() {
@@ -964,11 +994,11 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
return false;
}
- final CGeoMap cgeoMapRef = map.get();
- if (cgeoMapRef == null) {
+ final CGeoMap map = mapRef.get();
+ if (map == null) {
return false;
}
- final Location lastLocation = cgeoMapRef.overlayPositionAndScale.getCoordinates();
+ final Location lastLocation = map.overlayPositionAndScale.getCoordinates();
float dist = Float.MAX_VALUE;
if (lastLocation != null) {
@@ -976,11 +1006,11 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
}
final float[] mapDimension = new float[1];
- if (cgeoMapRef.mapView.getWidth() < cgeoMapRef.mapView.getHeight()) {
- final double span = cgeoMapRef.mapView.getLongitudeSpan() / 1e6;
+ if (map.mapView.getWidth() < map.mapView.getHeight()) {
+ final double span = map.mapView.getLongitudeSpan() / 1e6;
Location.distanceBetween(currentLocation.getLatitude(), currentLocation.getLongitude(), currentLocation.getLatitude(), currentLocation.getLongitude() + span, mapDimension);
} else {
- final double span = cgeoMapRef.mapView.getLatitudeSpan() / 1e6;
+ final double span = map.mapView.getLatitudeSpan() / 1e6;
Location.distanceBetween(currentLocation.getLatitude(), currentLocation.getLongitude(), currentLocation.getLatitude() + span, currentLocation.getLongitude(), mapDimension);
}
@@ -1003,50 +1033,62 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
return loadTimer;
}
- /**
- * loading timer Triggers every 250ms and checks for viewport change and starts a {@link LoadRunnable}.
- */
- private Subscription startLoadTimer() {
- return Schedulers.newThread().schedulePeriodically(new Action1<Scheduler.Inner>() {
- @Override
- public void call(Scheduler.Inner inner) {
- try {
- if (mapView != null) {
- // get current viewport
- final Viewport viewportNow = mapView.getViewport();
- // Since zoomNow is used only for local comparison purposes,
- // it is ok to use the Google Maps compatible zoom level of OSM Maps
- final int zoomNow = mapView.getMapZoomLevel();
-
- // check if map moved or zoomed
- //TODO Portree Use Rectangle inside with bigger search window. That will stop reloading on every move
- final boolean moved = markersInvalidated || (isLiveEnabled && !downloaded) || (viewport == null) || zoomNow != zoom ||
- (mapMoved(viewport, viewportNow) && (cachesCnt <= 0 || CollectionUtils.isEmpty(caches) || !viewport.includes(viewportNow)));
-
- // update title on any change
- if (moved || !viewportNow.equals(viewport)) {
- displayHandler.sendEmptyMessage(UPDATE_TITLE);
- }
- zoom = zoomNow;
+ private static final class LoadTimerAction implements Action0 {
- // save new values
- if (moved) {
- markersInvalidated = false;
+ @NonNull private final WeakReference<CGeoMap> mapRef;
+ private int previousZoom = -100;
+ private Viewport previousViewport;
- long currentTime = System.currentTimeMillis();
+ public LoadTimerAction(@NonNull final CGeoMap map) {
+ this.mapRef = new WeakReference<>(map);
+ }
- if (1000 < (currentTime - loadThreadRun)) {
- viewport = viewportNow;
- loadExecutor.execute(new LoadRunnable(viewport));
- }
- }
- }
+ @Override
+ public void call() {
+ final CGeoMap map = mapRef.get();
+ if (map == null) {
+ return;
+ }
+ try {
+ // get current viewport
+ final Viewport viewportNow = map.mapView.getViewport();
+ // Since zoomNow is used only for local comparison purposes,
+ // it is ok to use the Google Maps compatible zoom level of OSM Maps
+ final int zoomNow = map.mapView.getMapZoomLevel();
+
+ // check if map moved or zoomed
+ //TODO Portree Use Rectangle inside with bigger search window. That will stop reloading on every move
+ final boolean moved = map.markersInvalidated || (map.isLiveEnabled && !map.downloaded) || (previousViewport == null) || zoomNow != previousZoom ||
+ (mapMoved(previousViewport, viewportNow) && (map.cachesCnt <= 0 || CollectionUtils.isEmpty(map.caches) || !previousViewport.includes(viewportNow)));
+
+ // update title on any change
+ if (moved || !viewportNow.equals(previousViewport)) {
+ map.displayHandler.sendEmptyMessage(UPDATE_TITLE);
+ }
+ previousZoom = zoomNow;
- } catch (Exception e) {
- Log.w("CGeoMap.startLoadtimer.start", e);
+ // save new values
+ if (moved) {
+ map.markersInvalidated = false;
+
+ final long currentTime = System.currentTimeMillis();
+
+ if (1000 < (currentTime - map.loadThreadRun)) {
+ previousViewport = viewportNow;
+ loadExecutor.execute(new LoadRunnable(map));
+ }
}
+ } catch (final Exception e) {
+ Log.w("CGeoMap.startLoadtimer.start", e);
}
- }, 250, 250, TimeUnit.MILLISECONDS);
+ }
+ }
+
+ /**
+ * loading timer Triggers every 250ms and checks for viewport change and starts a {@link LoadRunnable}.
+ */
+ private Subscription startLoadTimer() {
+ return Schedulers.newThread().createWorker().schedulePeriodically(new LoadTimerAction(this), 0, 250, TimeUnit.MILLISECONDS);
}
/**
@@ -1066,79 +1108,84 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
* started by {@link LoadTimer}
*/
- private class LoadRunnable extends DoRunnable {
+ private static class LoadRunnable extends DoRunnable {
- public LoadRunnable(final Viewport viewport) {
- super(viewport);
+ public LoadRunnable(@NonNull final CGeoMap map) {
+ super(map);
}
@Override
- public void run() {
- try {
- showProgressHandler.sendEmptyMessage(SHOW_PROGRESS);
- loadThreadRun = System.currentTimeMillis();
-
- SearchResult searchResult;
- if (mapMode == MapMode.LIVE) {
- searchResult = isLiveEnabled ? new SearchResult() : new SearchResult(DataStore.loadStoredInViewport(viewport, Settings.getCacheType()));
- } else {
- // map started from another activity
- searchResult = searchIntent != null ? new SearchResult(searchIntent) : new SearchResult();
- if (geocodeIntent != null) {
- searchResult.addGeocode(geocodeIntent);
- }
- }
- // live mode search result
- if (isLiveEnabled) {
- searchResult.addSearchResult(DataStore.loadCachedInViewport(viewport, Settings.getCacheType()));
- }
+ public void runWithMap(final CGeoMap map) {
+ map.doLoadRun();
+ }
+ }
- downloaded = true;
- Set<Geocache> cachesFromSearchResult = searchResult.getCachesFromSearchResult(LoadFlags.LOAD_WAYPOINTS);
- // update the caches
- // new collection type needs to remove first
- caches.removeAll(cachesFromSearchResult);
- caches.addAll(cachesFromSearchResult);
+ private void doLoadRun() {
+ try {
+ showProgressHandler.sendEmptyMessage(SHOW_PROGRESS);
+ loadThreadRun = System.currentTimeMillis();
- final boolean excludeMine = Settings.isExcludeMyCaches();
- final boolean excludeDisabled = Settings.isExcludeDisabledCaches();
- if (mapMode == MapMode.LIVE) {
- CGeoMap.filter(caches);
+ SearchResult searchResult;
+ if (mapMode == MapMode.LIVE) {
+ searchResult = isLiveEnabled ? new SearchResult() : new SearchResult(DataStore.loadStoredInViewport(mapView.getViewport(), Settings.getCacheType()));
+ } else {
+ // map started from another activity
+ searchResult = searchIntent != null ? new SearchResult(searchIntent) : new SearchResult();
+ if (geocodeIntent != null) {
+ searchResult.addGeocode(geocodeIntent);
}
- countVisibleCaches();
- if (cachesCnt < Settings.getWayPointsThreshold() || geocodeIntent != null) {
- // we don't want to see any stale waypoints
- waypoints.clear();
- if (isLiveEnabled || mapMode == MapMode.LIVE
- || mapMode == MapMode.COORDS) {
- //All visible waypoints
- CacheType type = Settings.getCacheType();
- Set<Waypoint> waypointsInViewport = DataStore.loadWaypoints(viewport, excludeMine, excludeDisabled, type);
- waypoints.addAll(waypointsInViewport);
- }
- else {
- //All waypoints from the viewed caches
- for (Geocache c : caches.getAsList()) {
- waypoints.addAll(c.getWaypoints());
- }
- }
+ }
+ // live mode search result
+ if (isLiveEnabled) {
+ searchResult.addSearchResult(DataStore.loadCachedInViewport(mapView.getViewport(), Settings.getCacheType()));
+ }
+
+ downloaded = true;
+ final Set<Geocache> cachesFromSearchResult = searchResult.getCachesFromSearchResult(LoadFlags.LOAD_WAYPOINTS);
+ // update the caches
+ // new collection type needs to remove first
+ caches.removeAll(cachesFromSearchResult);
+ caches.addAll(cachesFromSearchResult);
+
+ final boolean excludeMine = Settings.isExcludeMyCaches();
+ final boolean excludeDisabled = Settings.isExcludeDisabledCaches();
+ if (mapMode == MapMode.LIVE) {
+ CGeoMap.filter(caches);
+ }
+ countVisibleCaches();
+ if (cachesCnt < Settings.getWayPointsThreshold() || geocodeIntent != null) {
+ // we don't want to see any stale waypoints
+ waypoints.clear();
+ if (isLiveEnabled || mapMode == MapMode.LIVE
+ || mapMode == MapMode.COORDS) {
+ //All visible waypoints
+ final CacheType type = Settings.getCacheType();
+ final Set<Waypoint> waypointsInViewport = DataStore.loadWaypoints(mapView.getViewport(), excludeMine, excludeDisabled, type);
+ waypoints.addAll(waypointsInViewport);
}
else {
- // we don't want to see any stale waypoints when above threshold
- waypoints.clear();
+ //All waypoints from the viewed caches
+ for (final Geocache c : caches.getAsList()) {
+ waypoints.addAll(c.getWaypoints());
+ }
}
+ }
+ else {
+ // we don't want to see any stale waypoints when above threshold
+ waypoints.clear();
+ }
- //render
- displayExecutor.execute(new DisplayRunnable(viewport));
+ //render
+ displayExecutor.execute(new DisplayRunnable(this));
- if (isLiveEnabled) {
- downloadExecutor.execute(new DownloadRunnable(viewport));
- }
- lastSearchResult = searchResult;
- } finally {
- showProgressHandler.sendEmptyMessage(HIDE_PROGRESS); // hide progress
+ if (isLiveEnabled) {
+ downloadExecutor.execute(new DownloadRunnable(this));
}
+ lastSearchResult = searchResult;
+ } finally {
+ showProgressHandler.sendEmptyMessage(HIDE_PROGRESS); // hide progress
}
+
}
/**
@@ -1146,111 +1193,119 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
* Started by {@link LoadRunnable}.
*/
- private class DownloadRunnable extends DoRunnable {
+ private static class DownloadRunnable extends DoRunnable {
- public DownloadRunnable(final Viewport viewport) {
- super(viewport);
+ public DownloadRunnable(final CGeoMap map) {
+ super(map);
}
@Override
- public void run() {
- try {
- showProgressHandler.sendEmptyMessage(SHOW_PROGRESS); // show progress
- if (Settings.isGCConnectorActive()) {
- if (tokens == null) {
- tokens = GCLogin.getInstance().getMapTokens();
- if (noMapTokenHandler != null && (StringUtils.isEmpty(tokens.getUserSession()) || StringUtils.isEmpty(tokens.getSessionToken()))) {
- tokens = null;
- noMapTokenHandler.sendEmptyMessage(0);
+ public void runWithMap(final CGeoMap map) {
+ map.doDownloadRun();
+ }
+ }
+
+ private void doDownloadRun() {
+ try {
+ showProgressHandler.sendEmptyMessage(SHOW_PROGRESS); // show progress
+ if (Settings.isGCConnectorActive()) {
+ if (tokens == null) {
+ tokens = GCLogin.getInstance().getMapTokens();
+ if (StringUtils.isEmpty(tokens.getUserSession()) || StringUtils.isEmpty(tokens.getSessionToken())) {
+ tokens = null;
+ if (!noMapTokenShowed) {
+ ActivityMixin.showToast(activity, res.getString(R.string.map_token_err));
+ noMapTokenShowed = true;
}
}
}
- final SearchResult searchResult = ConnectorFactory.searchByViewport(viewport.resize(0.8), tokens);
- downloaded = true;
-
- Set<Geocache> result = searchResult.getCachesFromSearchResult(LoadFlags.LOAD_CACHE_OR_DB);
- CGeoMap.filter(result);
- // update the caches
- // first remove filtered out
- final Set<String> filteredCodes = searchResult.getFilteredGeocodes();
- Log.d("Filtering out " + filteredCodes.size() + " caches: " + filteredCodes.toString());
- caches.removeAll(DataStore.loadCaches(filteredCodes, LoadFlags.LOAD_CACHE_ONLY));
- DataStore.removeCaches(filteredCodes, EnumSet.of(RemoveFlag.REMOVE_CACHE));
- // new collection type needs to remove first to refresh
- caches.removeAll(result);
- caches.addAll(result);
- lastSearchResult = searchResult;
-
- //render
- displayExecutor.execute(new DisplayRunnable(viewport));
-
- } catch (ThreadDeath e) {
- Log.d("DownloadThread stopped");
- displayHandler.sendEmptyMessage(UPDATE_TITLE);
- } finally {
- showProgressHandler.sendEmptyMessage(HIDE_PROGRESS); // hide progress
}
+ final SearchResult searchResult = ConnectorFactory.searchByViewport(mapView.getViewport().resize(0.8), tokens);
+ downloaded = true;
+
+ final Set<Geocache> result = searchResult.getCachesFromSearchResult(LoadFlags.LOAD_CACHE_OR_DB);
+ CGeoMap.filter(result);
+ // update the caches
+ // first remove filtered out
+ final Set<String> filteredCodes = searchResult.getFilteredGeocodes();
+ Log.d("Filtering out " + filteredCodes.size() + " caches: " + filteredCodes.toString());
+ caches.removeAll(DataStore.loadCaches(filteredCodes, LoadFlags.LOAD_CACHE_ONLY));
+ DataStore.removeCaches(filteredCodes, EnumSet.of(RemoveFlag.CACHE));
+ // new collection type needs to remove first to refresh
+ caches.removeAll(result);
+ caches.addAll(result);
+ lastSearchResult = searchResult;
+
+ //render
+ displayExecutor.execute(new DisplayRunnable(this));
+
+ } catch (final ThreadDeath e) {
+ Log.d("DownloadThread stopped");
+ displayHandler.sendEmptyMessage(UPDATE_TITLE);
+ } finally {
+ showProgressHandler.sendEmptyMessage(HIDE_PROGRESS); // hide progress
}
}
/**
* Thread to Display (down)loaded caches. Started by {@link LoadRunnable} and {@link DownloadRunnable}
*/
- private class DisplayRunnable extends DoRunnable {
+ private static class DisplayRunnable extends DoRunnable {
- public DisplayRunnable(final Viewport viewport) {
- super(viewport);
+ public DisplayRunnable(@NonNull final CGeoMap map) {
+ super(map);
}
@Override
- public void run() {
- try {
- showProgressHandler.sendEmptyMessage(SHOW_PROGRESS);
- if (mapView == null || caches == null) {
- throw new ThreadDeath();
- }
+ public void runWithMap(final CGeoMap map) {
+ map.doDisplayRun();
+ }
+ }
- // display caches
- final List<Geocache> cachesToDisplay = caches.getAsList();
- final List<Waypoint> waypointsToDisplay = new ArrayList<Waypoint>(waypoints);
- final List<CachesOverlayItemImpl> itemsToDisplay = new ArrayList<CachesOverlayItemImpl>();
+ private void doDisplayRun() {
+ try {
+ showProgressHandler.sendEmptyMessage(SHOW_PROGRESS);
- if (!cachesToDisplay.isEmpty()) {
- // Only show waypoints for single view or setting
- // when less than showWaypointsthreshold Caches shown
- if (mapMode == MapMode.SINGLE || (cachesCnt < Settings.getWayPointsThreshold())) {
- for (Waypoint waypoint : waypointsToDisplay) {
+ // display caches
+ final List<Geocache> cachesToDisplay = caches.getAsList();
+ final List<Waypoint> waypointsToDisplay = new ArrayList<>(waypoints);
+ final List<CachesOverlayItemImpl> itemsToDisplay = new ArrayList<>();
- if (waypoint == null || waypoint.getCoords() == null) {
- continue;
- }
+ if (!cachesToDisplay.isEmpty()) {
+ // Only show waypoints for single view or setting
+ // when less than showWaypointsthreshold Caches shown
+ if (mapMode == MapMode.SINGLE || (cachesCnt < Settings.getWayPointsThreshold())) {
+ for (final Waypoint waypoint : waypointsToDisplay) {
- itemsToDisplay.add(getWaypointItem(waypoint));
- }
- }
- for (Geocache cache : cachesToDisplay) {
-
- if (cache == null || cache.getCoords() == null) {
+ if (waypoint == null || waypoint.getCoords() == null) {
continue;
}
- itemsToDisplay.add(getCacheItem(cache));
- }
- overlayCaches.updateItems(itemsToDisplay);
- displayHandler.sendEmptyMessage(INVALIDATE_MAP);
+ itemsToDisplay.add(getWaypointItem(waypoint));
+ }
+ }
+ for (final Geocache cache : cachesToDisplay) {
- } else {
- overlayCaches.updateItems(itemsToDisplay);
- displayHandler.sendEmptyMessage(INVALIDATE_MAP);
+ if (cache == null || cache.getCoords() == null) {
+ continue;
+ }
+ itemsToDisplay.add(getCacheItem(cache));
}
- displayHandler.sendEmptyMessage(UPDATE_TITLE);
- } catch (ThreadDeath e) {
- Log.d("DisplayThread stopped");
- displayHandler.sendEmptyMessage(UPDATE_TITLE);
- } finally {
- showProgressHandler.sendEmptyMessage(HIDE_PROGRESS);
+ overlayCaches.updateItems(itemsToDisplay);
+ displayHandler.sendEmptyMessage(INVALIDATE_MAP);
+
+ } else {
+ overlayCaches.updateItems(itemsToDisplay);
+ displayHandler.sendEmptyMessage(INVALIDATE_MAP);
}
+
+ displayHandler.sendEmptyMessage(UPDATE_TITLE);
+ } catch (final ThreadDeath e) {
+ Log.d("DisplayThread stopped");
+ displayHandler.sendEmptyMessage(UPDATE_TITLE);
+ } finally {
+ showProgressHandler.sendEmptyMessage(HIDE_PROGRESS);
}
}
@@ -1268,11 +1323,21 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
private static abstract class DoRunnable implements Runnable {
- final protected Viewport viewport;
+ private final WeakReference<CGeoMap> mapRef;
- protected DoRunnable(final Viewport viewport) {
- this.viewport = viewport;
+ protected DoRunnable(@NonNull final CGeoMap map) {
+ mapRef = new WeakReference<>(map);
}
+
+ @Override
+ final public void run() {
+ final CGeoMap map = mapRef.get();
+ if (map != null) {
+ runWithMap(map);
+ }
+ }
+
+ abstract protected void runWithMap(final CGeoMap map);
}
/**
@@ -1281,7 +1346,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
* @param listId
* the list to store the caches in
*/
- private void storeCaches(List<String> geocodes, int listId) {
+ private void storeCaches(final List<String> geocodes, final int listId) {
final LoadDetailsHandler loadDetailsHandler = new LoadDetailsHandler();
waitDialog = new ProgressDialog(activity);
@@ -1292,23 +1357,23 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
waitDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
- public void onCancel(DialogInterface arg0) {
+ public void onCancel(final DialogInterface arg0) {
try {
if (loadDetailsThread != null) {
loadDetailsThread.stopIt();
}
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("CGeoMap.storeCaches.onCancel", e);
}
}
});
- float etaTime = detailTotal * 7.0f / 60.0f;
- int roundedEta = Math.round(etaTime);
+ final float etaTime = detailTotal * 7.0f / 60.0f;
+ final int roundedEta = Math.round(etaTime);
if (etaTime < 0.4) {
waitDialog.setMessage(res.getString(R.string.caches_downloading) + " " + res.getString(R.string.caches_eta_ltm));
} else {
- waitDialog.setMessage(res.getString(R.string.caches_downloading) + " " + roundedEta + " " + res.getQuantityString(R.plurals.caches_eta_mins, roundedEta));
+ waitDialog.setMessage(res.getString(R.string.caches_downloading) + " " + res.getQuantityString(R.plurals.caches_eta_mins, roundedEta, roundedEta));
}
waitDialog.show();
@@ -1353,7 +1418,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
if (!DataStore.isOffline(geocode, null)) {
Geocache.storeCache(null, geocode, listId, false, handler);
}
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("CGeoMap.LoadDetails.run", e);
} finally {
// one more cache over
@@ -1367,13 +1432,13 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
}
}
- private static synchronized void filter(Collection<Geocache> caches) {
- boolean excludeMine = Settings.isExcludeMyCaches();
- boolean excludeDisabled = Settings.isExcludeDisabledCaches();
+ private static synchronized void filter(final Collection<Geocache> caches) {
+ final boolean excludeMine = Settings.isExcludeMyCaches();
+ final boolean excludeDisabled = Settings.isExcludeDisabledCaches();
- List<Geocache> removeList = new ArrayList<Geocache>();
- for (Geocache cache : caches) {
- if ((excludeMine && cache.isFound()) || (excludeMine && cache.isOwner()) || (excludeDisabled && cache.isDisabled())) {
+ final List<Geocache> removeList = new ArrayList<>();
+ for (final Geocache cache : caches) {
+ if ((excludeMine && cache.isFound()) || (excludeMine && cache.isOwner()) || (excludeDisabled && cache.isDisabled()) || (excludeDisabled && cache.isArchived())) {
removeList.add(cache);
}
}
@@ -1392,9 +1457,6 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
if (coords == null) {
return;
}
- if (mapView == null) {
- return;
- }
final MapControllerImpl mapController = mapView.getMapController();
final GeoPointImpl target = makeGeoPoint(coords);
@@ -1410,14 +1472,14 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
}
// move map to view results of searchIntent
- private void centerMap(String geocodeCenter, final SearchResult searchCenter, final Geopoint coordsCenter, int[] mapState) {
+ private void centerMap(final String geocodeCenter, final SearchResult searchCenter, final Geopoint coordsCenter, final int[] mapState) {
final MapControllerImpl mapController = mapView.getMapController();
if (!centered && mapState != null) {
try {
mapController.setCenter(mapItemFactory.getGeoPointBase(new Geopoint(mapState[0] / 1.0e6, mapState[1] / 1.0e6)));
setZoom(mapState[2]);
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
Log.e("centermap", e);
}
@@ -1441,7 +1503,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
if (viewport.getLatitudeSpan() != 0 && viewport.getLongitudeSpan() != 0) {
mapController.zoomToSpan((int) (viewport.getLatitudeSpan() * 1e6), (int) (viewport.getLongitudeSpan() * 1e6));
}
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
Log.e("centermap", e);
}
@@ -1450,7 +1512,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
} else if (!centered && coordsCenter != null) {
try {
mapController.setCenter(makeGeoPoint(coordsCenter));
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("centermap", e);
}
@@ -1461,25 +1523,54 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
// switch My Location button image
private void switchMyLocationButton() {
+ myLocSwitch.setChecked(followMyLocation);
if (followMyLocation) {
- myLocSwitch.setImageResource(R.drawable.actionbar_mylocation_on);
myLocationInMiddle(app.currentGeo());
- } else {
- myLocSwitch.setImageResource(R.drawable.actionbar_mylocation_off);
}
}
// set my location listener
- private class MyLocationListener implements View.OnClickListener {
+ private static class MyLocationListener implements View.OnClickListener {
+
+ private final WeakReference<CGeoMap> mapRef;
+
+ public MyLocationListener(@NonNull final CGeoMap map) {
+ mapRef = new WeakReference<>(map);
+ }
+
@Override
- public void onClick(View view) {
- followMyLocation = !followMyLocation;
- switchMyLocationButton();
+ public void onClick(final View view) {
+ final CGeoMap map = mapRef.get();
+ if (map != null) {
+ map.onFollowMyLocationClicked();
+ }
}
}
- @Override
- public void onDrag() {
+ private void onFollowMyLocationClicked() {
+ followMyLocation = !followMyLocation;
+ switchMyLocationButton();
+ }
+
+ public static class MapDragListener implements OnMapDragListener {
+
+ private final WeakReference<CGeoMap> mapRef;
+
+ public MapDragListener(@NonNull final CGeoMap map) {
+ mapRef = new WeakReference<>(map);
+ }
+
+ @Override
+ public void onDrag() {
+ final CGeoMap map = mapRef.get();
+ if (map != null) {
+ map.onDrag();
+ }
+ }
+
+ }
+
+ private void onDrag() {
if (followMyLocation) {
followMyLocation = false;
switchMyLocationButton();
@@ -1491,15 +1582,9 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
return mapItemFactory.getGeoPointBase(coords);
}
- // close activity and open homescreen
- @Override
- public void goHome(View view) {
- ActivityMixin.goHome(activity);
- }
-
@Override
public View makeView() {
- ImageView imageView = new ImageView(activity);
+ final ImageView imageView = new ImageView(activity);
imageView.setScaleType(ScaleType.CENTER);
imageView.setLayoutParams(new ImageSwitcher.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
return imageView;
@@ -1556,88 +1641,13 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
private CachesOverlayItemImpl getCacheItem(final Geocache cache) {
final CachesOverlayItemImpl item = mapItemFactory.getCachesOverlayItem(cache, cache.applyDistanceRule());
-
- final int hashcode = new HashCodeBuilder()
- .append(cache.isReliableLatLon())
- .append(cache.getType().id)
- .append(cache.isDisabled() || cache.isArchived())
- .append(cache.getMapMarkerId())
- .append(cache.isOwner())
- .append(cache.isFound())
- .append(cache.hasUserModifiedCoords())
- .append(cache.getPersonalNote())
- .append(cache.isLogOffline())
- .append(cache.getListId() > 0)
- .toHashCode();
-
- LayerDrawable drawable = overlaysCache.get(hashcode);
- if (drawable == null) {
- drawable = createCacheItem(cache, hashcode);
- }
- item.setMarker(drawable);
+ item.setMarker(MapUtils.getCacheItem(getResources(), cache));
return item;
}
- private LayerDrawable createCacheItem(final Geocache cache, final int hashcode) {
- // Set initial capacities to the maximum of layers and insets to avoid dynamic reallocation
- final ArrayList<Drawable> layers = new ArrayList<Drawable>(9);
- final ArrayList<int[]> insets = new ArrayList<int[]>(8);
-
- // background: disabled or not
- final Drawable marker = getResources().getDrawable(cache.getMapMarkerId());
- layers.add(marker);
- final int resolution = marker.getIntrinsicWidth() > 40 ? (marker.getIntrinsicWidth() > 50 ? 2 : 1) : 0;
- // reliable or not
- if (!cache.isReliableLatLon()) {
- insets.add(INSET_RELIABLE[resolution]);
- layers.add(getResources().getDrawable(R.drawable.marker_notreliable));
- }
- // cache type
- layers.add(getResources().getDrawable(cache.getType().markerId));
- insets.add(INSET_TYPE[resolution]);
- // own
- if (cache.isOwner()) {
- layers.add(getResources().getDrawable(R.drawable.marker_own));
- insets.add(INSET_OWN[resolution]);
- // if not, checked if stored
- } else if (cache.getListId() > 0) {
- layers.add(getResources().getDrawable(R.drawable.marker_stored));
- insets.add(INSET_OWN[resolution]);
- }
- // found
- if (cache.isFound()) {
- layers.add(getResources().getDrawable(R.drawable.marker_found));
- insets.add(INSET_FOUND[resolution]);
- // if not, perhaps logged offline
- } else if (cache.isLogOffline()) {
- layers.add(getResources().getDrawable(R.drawable.marker_found_offline));
- insets.add(INSET_FOUND[resolution]);
- }
- // user modified coords
- if (cache.hasUserModifiedCoords()) {
- layers.add(getResources().getDrawable(R.drawable.marker_usermodifiedcoords));
- insets.add(INSET_USERMODIFIEDCOORDS[resolution]);
- }
- // personal note
- if (cache.getPersonalNote() != null) {
- layers.add(getResources().getDrawable(R.drawable.marker_personalnote));
- insets.add(INSET_PERSONALNOTE[resolution]);
- }
-
- final LayerDrawable ld = new LayerDrawable(layers.toArray(new Drawable[layers.size()]));
-
- int index = 1;
- for (final int[] inset : insets) {
- ld.setLayerInset(index++, inset[0], inset[1], inset[2], inset[3]);
- }
-
- overlaysCache.put(hashcode, ld);
- return ld;
- }
-
private CachesOverlayItemImpl getWaypointItem(final Waypoint waypoint) {
final CachesOverlayItemImpl item = mapItemFactory.getCachesOverlayItem(waypoint, waypoint.getWaypointType().applyDistanceRule());
- Drawable marker = getResources().getDrawable(!waypoint.isVisited() ? R.drawable.marker : R.drawable.marker_transparent);
+ final Drawable marker = getResources().getDrawable(!waypoint.isVisited() ? R.drawable.marker : R.drawable.marker_transparent);
final Drawable[] layers = new Drawable[] {
marker,
getResources().getDrawable(waypoint.getWaypointType().markerId)
diff --git a/main/src/cgeo/geocaching/maps/CachesOverlay.java b/main/src/cgeo/geocaching/maps/CachesOverlay.java
index 0c7c296..3c6109e 100644
--- a/main/src/cgeo/geocaching/maps/CachesOverlay.java
+++ b/main/src/cgeo/geocaching/maps/CachesOverlay.java
@@ -40,7 +40,7 @@ import java.util.List;
public class CachesOverlay extends AbstractItemizedOverlay {
- private List<CachesOverlayItemImpl> items = new ArrayList<CachesOverlayItemImpl>();
+ private List<CachesOverlayItemImpl> items = new ArrayList<>();
private Context context = null;
private boolean displayCircles = false;
private Progress progress = new Progress();
@@ -61,7 +61,7 @@ public class CachesOverlay extends AbstractItemizedOverlay {
}
void updateItems(CachesOverlayItemImpl item) {
- List<CachesOverlayItemImpl> itemsPre = new ArrayList<CachesOverlayItemImpl>();
+ List<CachesOverlayItemImpl> itemsPre = new ArrayList<>();
itemsPre.add(item);
updateItems(itemsPre);
@@ -79,7 +79,7 @@ public class CachesOverlay extends AbstractItemizedOverlay {
// ensure no interference between the draw and content changing routines
getOverlayImpl().lock();
try {
- items = new ArrayList<CachesOverlayItemImpl>(itemsPre);
+ items = new ArrayList<>(itemsPre);
setLastFocusedItemIndex(-1); // to reset tap during data change
populate();
@@ -211,9 +211,9 @@ public class CachesOverlay extends AbstractItemizedOverlay {
progress.show(context, context.getResources().getString(R.string.map_live), context.getResources().getString(R.string.cache_dialog_loading_details), true, null);
- CachesOverlayItemImpl item = null;
// prevent concurrent changes
getOverlayImpl().lock();
+ CachesOverlayItemImpl item = null;
try {
if (index < items.size()) {
item = items.get(index);
diff --git a/main/src/cgeo/geocaching/maps/MapProviderFactory.java b/main/src/cgeo/geocaching/maps/MapProviderFactory.java
index 890274d..dd4ff0f 100644
--- a/main/src/cgeo/geocaching/maps/MapProviderFactory.java
+++ b/main/src/cgeo/geocaching/maps/MapProviderFactory.java
@@ -2,7 +2,7 @@ package cgeo.geocaching.maps;
import cgeo.geocaching.CgeoApplication;
import cgeo.geocaching.R;
-import cgeo.geocaching.maps.google.GoogleMapProvider;
+import cgeo.geocaching.maps.google.v1.GoogleMapProvider;
import cgeo.geocaching.maps.interfaces.MapProvider;
import cgeo.geocaching.maps.interfaces.MapSource;
import cgeo.geocaching.maps.mapsforge.MapsforgeMapProvider;
@@ -21,7 +21,7 @@ import java.util.List;
public class MapProviderFactory {
- private final static ArrayList<MapSource> mapSources = new ArrayList<MapSource>();
+ private final static ArrayList<MapSource> mapSources = new ArrayList<>();
static {
// add GoogleMapProvider only if google api is available in order to support x86 android emulator
@@ -108,7 +108,7 @@ public class MapProviderFactory {
* remove offline map sources after changes of the settings
*/
public static void deleteOfflineMapSources() {
- final ArrayList<MapSource> deletion = new ArrayList<MapSource>();
+ final ArrayList<MapSource> deletion = new ArrayList<>();
for (MapSource mapSource : mapSources) {
if (mapSource instanceof MapsforgeMapProvider.OfflineMapSource) {
deletion.add(mapSource);
diff --git a/main/src/cgeo/geocaching/maps/PositionAndScaleOverlay.java b/main/src/cgeo/geocaching/maps/PositionAndScaleOverlay.java
index 6b34b75..63fcd73 100644
--- a/main/src/cgeo/geocaching/maps/PositionAndScaleOverlay.java
+++ b/main/src/cgeo/geocaching/maps/PositionAndScaleOverlay.java
@@ -5,7 +5,6 @@ import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
import cgeo.geocaching.maps.interfaces.MapViewImpl;
import cgeo.geocaching.maps.interfaces.OverlayImpl;
-import android.app.Activity;
import android.graphics.Canvas;
import android.graphics.Point;
import android.location.Location;
@@ -18,10 +17,10 @@ public class PositionAndScaleOverlay implements GeneralOverlay {
PositionDrawer positionDrawer = null;
ScaleDrawer scaleDrawer = null;
- public PositionAndScaleOverlay(Activity activity, OverlayImpl ovlImpl) {
+ public PositionAndScaleOverlay(OverlayImpl ovlImpl) {
this.ovlImpl = ovlImpl;
- positionDrawer = new PositionDrawer(activity);
- scaleDrawer = new ScaleDrawer(activity);
+ positionDrawer = new PositionDrawer();
+ scaleDrawer = new ScaleDrawer();
}
public void setCoordinates(Location coordinatesIn) {
diff --git a/main/src/cgeo/geocaching/maps/PositionDrawer.java b/main/src/cgeo/geocaching/maps/PositionDrawer.java
index 1a5dcaf..08244ef 100644
--- a/main/src/cgeo/geocaching/maps/PositionDrawer.java
+++ b/main/src/cgeo/geocaching/maps/PositionDrawer.java
@@ -1,5 +1,6 @@
package cgeo.geocaching.maps;
+import cgeo.geocaching.CgeoApplication;
import cgeo.geocaching.R;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.maps.interfaces.GeoPointImpl;
@@ -7,7 +8,6 @@ import cgeo.geocaching.maps.interfaces.MapItemFactory;
import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
import cgeo.geocaching.settings.Settings;
-import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
@@ -36,11 +36,9 @@ public class PositionDrawer {
private PaintFlagsDrawFilter setfil = null;
private PaintFlagsDrawFilter remfil = null;
private PositionHistory positionHistory = new PositionHistory();
- private Activity activity;
private MapItemFactory mapItemFactory;
- public PositionDrawer(Activity activity) {
- this.activity = activity;
+ public PositionDrawer() {
this.mapItemFactory = Settings.getMapProvider().getMapItemFactory();
}
@@ -105,7 +103,7 @@ public class PositionDrawer {
if (Settings.isMapTrail()) {
// always add current position to drawn history to have a closed connection
- final ArrayList<Location> paintHistory = new ArrayList<Location>(positionHistory.getHistory());
+ final ArrayList<Location> paintHistory = new ArrayList<>(positionHistory.getHistory());
paintHistory.add(coordinates);
int size = paintHistory.size();
@@ -144,7 +142,7 @@ public class PositionDrawer {
}
if (arrow == null) {
- arrow = BitmapFactory.decodeResource(activity.getResources(), R.drawable.my_location_chevron);
+ arrow = BitmapFactory.decodeResource(CgeoApplication.getInstance().getResources(), R.drawable.my_location_chevron);
widthArrowHalf = arrow.getWidth() / 2;
heightArrowHalf = arrow.getHeight() / 2;
}
diff --git a/main/src/cgeo/geocaching/maps/PositionHistory.java b/main/src/cgeo/geocaching/maps/PositionHistory.java
index bc6779e..af13740 100644
--- a/main/src/cgeo/geocaching/maps/PositionHistory.java
+++ b/main/src/cgeo/geocaching/maps/PositionHistory.java
@@ -19,7 +19,7 @@ public class PositionHistory {
*/
private static final int MAX_POSITIONS = 700;
- private ArrayList<Location> history = new ArrayList<Location>();
+ private ArrayList<Location> history = new ArrayList<>();
/**
* Adds the current position to the trail history to be able to show the trail on the map.
diff --git a/main/src/cgeo/geocaching/maps/ScaleDrawer.java b/main/src/cgeo/geocaching/maps/ScaleDrawer.java
index fb46408..95c987d 100644
--- a/main/src/cgeo/geocaching/maps/ScaleDrawer.java
+++ b/main/src/cgeo/geocaching/maps/ScaleDrawer.java
@@ -1,5 +1,6 @@
package cgeo.geocaching.maps;
+import cgeo.geocaching.CgeoApplication;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.Units;
import cgeo.geocaching.maps.interfaces.GeoPointImpl;
@@ -7,12 +8,13 @@ import cgeo.geocaching.maps.interfaces.MapViewImpl;
import org.apache.commons.lang3.tuple.ImmutablePair;
-import android.app.Activity;
+import android.content.Context;
import android.graphics.BlurMaskFilter;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.util.DisplayMetrics;
+import android.view.WindowManager;
public class ScaleDrawer {
private static final double SCALE_WIDTH_FACTOR = 1.0 / 2.5;
@@ -22,9 +24,10 @@ public class ScaleDrawer {
private BlurMaskFilter blur = null;
private float pixelDensity = 0;
- public ScaleDrawer(Activity activity) {
+ public ScaleDrawer() {
DisplayMetrics metrics = new DisplayMetrics();
- activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
+ WindowManager windowManager = (WindowManager) CgeoApplication.getInstance().getSystemService(Context.WINDOW_SERVICE);
+ windowManager.getDefaultDisplay().getMetrics(metrics);
pixelDensity = metrics.density;
}
diff --git a/main/src/cgeo/geocaching/maps/google/GoogleCacheOverlay.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleCacheOverlay.java
index d14c687..9b18c2d 100644
--- a/main/src/cgeo/geocaching/maps/google/GoogleCacheOverlay.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleCacheOverlay.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.maps.google;
+package cgeo.geocaching.maps.google.v1;
import cgeo.geocaching.maps.CachesOverlay;
import cgeo.geocaching.maps.interfaces.ItemizedOverlayImpl;
diff --git a/main/src/cgeo/geocaching/maps/google/GoogleCacheOverlayItem.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleCacheOverlayItem.java
index b26654a..463aae9 100644
--- a/main/src/cgeo/geocaching/maps/google/GoogleCacheOverlayItem.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleCacheOverlayItem.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.maps.google;
+package cgeo.geocaching.maps.google.v1;
import cgeo.geocaching.IWaypoint;
import cgeo.geocaching.maps.interfaces.CachesOverlayItemImpl;
diff --git a/main/src/cgeo/geocaching/maps/google/GoogleGeoPoint.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleGeoPoint.java
index d5f6385..2f540ad 100644
--- a/main/src/cgeo/geocaching/maps/google/GoogleGeoPoint.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleGeoPoint.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.maps.google;
+package cgeo.geocaching.maps.google.v1;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.maps.interfaces.GeoPointImpl;
diff --git a/main/src/cgeo/geocaching/maps/google/GoogleMapActivity.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapActivity.java
index a98241f..374e7b0 100644
--- a/main/src/cgeo/geocaching/maps/google/GoogleMapActivity.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapActivity.java
@@ -1,5 +1,6 @@
-package cgeo.geocaching.maps.google;
+package cgeo.geocaching.maps.google.v1;
+import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.activity.FilteredActivity;
import cgeo.geocaching.maps.AbstractMap;
import cgeo.geocaching.maps.CGeoMap;
@@ -97,6 +98,11 @@ public class GoogleMapActivity extends MapActivity implements MapActivityImpl, F
}
@Override
+ public void navigateUp(View view) {
+ ActivityMixin.navigateUp(this);
+ }
+
+ @Override
public void superOnResume() {
super.onResume();
}
@@ -116,12 +122,6 @@ public class GoogleMapActivity extends MapActivity implements MapActivityImpl, F
return super.onPrepareOptionsMenu(menu);
}
- // close activity and open homescreen
- @Override
- public void goHome(View view) {
- mapBase.goHome(view);
- }
-
@Override
public void showFilterMenu(View view) {
// do nothing, the filter bar only shows the global filter
diff --git a/main/src/cgeo/geocaching/maps/google/GoogleMapController.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapController.java
index 096cd61..ea95676 100644
--- a/main/src/cgeo/geocaching/maps/google/GoogleMapController.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapController.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.maps.google;
+package cgeo.geocaching.maps.google.v1;
import cgeo.geocaching.maps.interfaces.GeoPointImpl;
import cgeo.geocaching.maps.interfaces.MapControllerImpl;
diff --git a/main/src/cgeo/geocaching/maps/google/GoogleMapItemFactory.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapItemFactory.java
index c708dc5..d7e9380 100644
--- a/main/src/cgeo/geocaching/maps/google/GoogleMapItemFactory.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapItemFactory.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.maps.google;
+package cgeo.geocaching.maps.google.v1;
import cgeo.geocaching.IWaypoint;
import cgeo.geocaching.geopoint.Geopoint;
diff --git a/main/src/cgeo/geocaching/maps/google/GoogleMapProjection.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapProjection.java
index dc694b8..901a369 100644
--- a/main/src/cgeo/geocaching/maps/google/GoogleMapProjection.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapProjection.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.maps.google;
+package cgeo.geocaching.maps.google.v1;
import cgeo.geocaching.maps.interfaces.GeoPointImpl;
import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
diff --git a/main/src/cgeo/geocaching/maps/google/GoogleMapProvider.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapProvider.java
index 38d7d96..884e076 100644
--- a/main/src/cgeo/geocaching/maps/google/GoogleMapProvider.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapProvider.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.maps.google;
+package cgeo.geocaching.maps.google.v1;
import cgeo.geocaching.CgeoApplication;
import cgeo.geocaching.R;
diff --git a/main/src/cgeo/geocaching/maps/google/GoogleMapView.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapView.java
index 610dbe1..c611790 100644
--- a/main/src/cgeo/geocaching/maps/google/GoogleMapView.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleMapView.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.maps.google;
+package cgeo.geocaching.maps.google.v1;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
@@ -20,7 +20,6 @@ import com.google.android.maps.MapView;
import org.apache.commons.lang3.reflect.MethodUtils;
import org.eclipse.jdt.annotation.NonNull;
-import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
@@ -39,16 +38,23 @@ public class GoogleMapView extends MapView implements MapViewImpl {
public GoogleMapView(Context context, AttributeSet attrs) {
super(context, attrs);
- gestureDetector = new GestureDetector(context, new GestureListener());
+ initialize(context);
}
public GoogleMapView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
- gestureDetector = new GestureDetector(context, new GestureListener());
+ initialize(context);
}
public GoogleMapView(Context context, String apiKey) {
super(context, apiKey);
+ initialize(context);
+ }
+
+ private void initialize(Context context) {
+ if (isInEditMode()) {
+ return;
+ }
gestureDetector = new GestureDetector(context, new GestureListener());
}
@@ -120,9 +126,9 @@ public class GoogleMapView extends MapView implements MapViewImpl {
}
@Override
- public PositionAndScaleOverlay createAddPositionAndScaleOverlay(Activity activity) {
+ public PositionAndScaleOverlay createAddPositionAndScaleOverlay() {
- GoogleOverlay ovl = new GoogleOverlay(activity);
+ GoogleOverlay ovl = new GoogleOverlay();
getOverlays().add(ovl);
return (PositionAndScaleOverlay) ovl.getBase();
}
diff --git a/main/src/cgeo/geocaching/maps/google/GoogleOverlay.java b/main/src/cgeo/geocaching/maps/google/v1/GoogleOverlay.java
index 0a5cf69..40a5539 100644
--- a/main/src/cgeo/geocaching/maps/google/GoogleOverlay.java
+++ b/main/src/cgeo/geocaching/maps/google/v1/GoogleOverlay.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.maps.google;
+package cgeo.geocaching.maps.google.v1;
import cgeo.geocaching.maps.PositionAndScaleOverlay;
import cgeo.geocaching.maps.interfaces.GeneralOverlay;
@@ -8,7 +8,6 @@ import cgeo.geocaching.maps.interfaces.OverlayImpl;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
-import android.app.Activity;
import android.graphics.Canvas;
import java.util.concurrent.locks.Lock;
@@ -19,8 +18,8 @@ public class GoogleOverlay extends Overlay implements OverlayImpl {
private PositionAndScaleOverlay overlayBase = null;
private Lock lock = new ReentrantLock();
- public GoogleOverlay(Activity activityIn) {
- overlayBase = new PositionAndScaleOverlay(activityIn, this);
+ public GoogleOverlay() {
+ overlayBase = new PositionAndScaleOverlay(this);
}
@Override
diff --git a/main/src/cgeo/geocaching/maps/interfaces/MapActivityImpl.java b/main/src/cgeo/geocaching/maps/interfaces/MapActivityImpl.java
index e7deebd..3596d5f 100644
--- a/main/src/cgeo/geocaching/maps/interfaces/MapActivityImpl.java
+++ b/main/src/cgeo/geocaching/maps/interfaces/MapActivityImpl.java
@@ -33,6 +33,5 @@ public interface MapActivityImpl {
boolean superOnOptionsItemSelected(MenuItem item);
- public abstract void goHome(View view);
-
+ public abstract void navigateUp(View view);
}
diff --git a/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java b/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java
index 5ae8e15..4a6d733 100644
--- a/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java
+++ b/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java
@@ -6,7 +6,6 @@ import cgeo.geocaching.maps.PositionAndScaleOverlay;
import org.eclipse.jdt.annotation.NonNull;
-import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.Drawable;
@@ -47,7 +46,7 @@ public interface MapViewImpl {
CachesOverlay createAddMapOverlay(Context context, Drawable drawable);
- PositionAndScaleOverlay createAddPositionAndScaleOverlay(Activity activity);
+ PositionAndScaleOverlay createAddPositionAndScaleOverlay();
void setMapSource();
diff --git a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapActivity.java b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapActivity.java
index a0384b8..94213ba 100644
--- a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapActivity.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapActivity.java
@@ -1,5 +1,6 @@
package cgeo.geocaching.maps.mapsforge;
+import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.activity.FilteredActivity;
import cgeo.geocaching.maps.AbstractMap;
import cgeo.geocaching.maps.CGeoMap;
@@ -111,10 +112,9 @@ public class MapsforgeMapActivity extends MapActivity implements MapActivityImpl
return super.onPrepareOptionsMenu(menu);
}
- // close activity and open homescreen
@Override
- public void goHome(View view) {
- mapBase.goHome(view);
+ public void navigateUp(View view) {
+ ActivityMixin.navigateUp(this);
}
@Override
diff --git a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapProvider.java b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapProvider.java
index 9f09991..01b10ec 100644
--- a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapProvider.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapProvider.java
@@ -59,7 +59,7 @@ public final class MapsforgeMapProvider extends AbstractMapProvider {
File directory = new File(directoryPath);
if (directory.isDirectory()) {
try {
- ArrayList<String> mapFileList = new ArrayList<String>();
+ ArrayList<String> mapFileList = new ArrayList<>();
final File[] files = directory.listFiles();
if (ArrayUtils.isNotEmpty(files)) {
for (File file : files) {
diff --git a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java
index 7a5aab2..d95cc80 100644
--- a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java
@@ -24,7 +24,6 @@ import org.mapsforge.android.maps.mapgenerator.MapGeneratorInternal;
import org.mapsforge.android.maps.overlay.Overlay;
import org.mapsforge.core.GeoPoint;
-import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
@@ -43,6 +42,13 @@ public class MapsforgeMapView extends MapView implements MapViewImpl {
public MapsforgeMapView(Context context, AttributeSet attrs) {
super(context, attrs);
+ initialize(context);
+ }
+
+ private void initialize(Context context) {
+ if (isInEditMode()) {
+ return;
+ }
gestureDetector = new GestureDetector(context, new GestureListener());
if (Settings.isScaleMapsforgeText()) {
this.setTextScale(getResources().getDisplayMetrics().density);
@@ -105,8 +111,8 @@ public class MapsforgeMapView extends MapView implements MapViewImpl {
}
@Override
- public PositionAndScaleOverlay createAddPositionAndScaleOverlay(Activity activity) {
- MapsforgeOverlay ovl = new MapsforgeOverlay(activity);
+ public PositionAndScaleOverlay createAddPositionAndScaleOverlay() {
+ MapsforgeOverlay ovl = new MapsforgeOverlay();
getOverlays().add(ovl);
return (PositionAndScaleOverlay) ovl.getBase();
}
diff --git a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeOverlay.java b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeOverlay.java
index 74a8601..3df4ab0 100644
--- a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeOverlay.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeOverlay.java
@@ -8,7 +8,6 @@ import cgeo.geocaching.maps.interfaces.OverlayImpl;
import org.mapsforge.android.maps.Projection;
import org.mapsforge.android.maps.overlay.Overlay;
-import android.app.Activity;
import android.graphics.Canvas;
import android.graphics.Point;
@@ -20,8 +19,8 @@ public class MapsforgeOverlay extends Overlay implements OverlayImpl {
private PositionAndScaleOverlay overlayBase = null;
private Lock lock = new ReentrantLock();
- public MapsforgeOverlay(Activity activityIn) {
- overlayBase = new PositionAndScaleOverlay(activityIn, this);
+ public MapsforgeOverlay() {
+ overlayBase = new PositionAndScaleOverlay(this);
}
@Override
diff --git a/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapActivity024.java b/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapActivity024.java
index 33ed30e..daeb2b8 100644
--- a/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapActivity024.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapActivity024.java
@@ -1,5 +1,6 @@
package cgeo.geocaching.maps.mapsforge.v024;
+import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.activity.FilteredActivity;
import cgeo.geocaching.maps.AbstractMap;
import cgeo.geocaching.maps.CGeoMap;
@@ -111,10 +112,9 @@ public class MapsforgeMapActivity024 extends MapActivity implements MapActivityI
return super.onPrepareOptionsMenu(menu);
}
- // close activity and open homescreen
@Override
- public void goHome(View view) {
- mapBase.goHome(view);
+ public void navigateUp(View view) {
+ ActivityMixin.navigateUp(this);
}
@Override
diff --git a/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapView024.java b/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapView024.java
index 4fa4e02..8dd15fc 100644
--- a/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapView024.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeMapView024.java
@@ -21,7 +21,6 @@ import org.mapsforge.android.mapsold.MapViewMode;
import org.mapsforge.android.mapsold.Overlay;
import org.mapsforge.android.mapsold.Projection;
-import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
@@ -37,6 +36,13 @@ public class MapsforgeMapView024 extends MapView implements MapViewImpl {
public MapsforgeMapView024(Context context, AttributeSet attrs) {
super(context, attrs);
+ initialize(context);
+ }
+
+ private void initialize(Context context) {
+ if (isInEditMode()) {
+ return;
+ }
gestureDetector = new GestureDetector(context, new GestureListener());
}
@@ -96,8 +102,8 @@ public class MapsforgeMapView024 extends MapView implements MapViewImpl {
}
@Override
- public PositionAndScaleOverlay createAddPositionAndScaleOverlay(Activity activity) {
- MapsforgeOverlay ovl = new MapsforgeOverlay(activity);
+ public PositionAndScaleOverlay createAddPositionAndScaleOverlay() {
+ MapsforgeOverlay ovl = new MapsforgeOverlay();
getOverlays().add(ovl);
return (PositionAndScaleOverlay) ovl.getBase();
}
diff --git a/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeOverlay.java b/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeOverlay.java
index 655e0b9..bfb3548 100644
--- a/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeOverlay.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/v024/MapsforgeOverlay.java
@@ -8,7 +8,6 @@ import cgeo.geocaching.maps.interfaces.OverlayImpl;
import org.mapsforge.android.mapsold.Overlay;
import org.mapsforge.android.mapsold.Projection;
-import android.app.Activity;
import android.graphics.Canvas;
import android.graphics.Point;
@@ -20,8 +19,8 @@ public class MapsforgeOverlay extends Overlay implements OverlayImpl {
private PositionAndScaleOverlay overlayBase = null;
private Lock lock = new ReentrantLock();
- public MapsforgeOverlay(Activity activityIn) {
- overlayBase = new PositionAndScaleOverlay(activityIn, this);
+ public MapsforgeOverlay() {
+ overlayBase = new PositionAndScaleOverlay(this);
}
@Override
diff --git a/main/src/cgeo/geocaching/network/HtmlImage.java b/main/src/cgeo/geocaching/network/HtmlImage.java
index 9c55fe9..31edc9f 100644
--- a/main/src/cgeo/geocaching/network/HtmlImage.java
+++ b/main/src/cgeo/geocaching/network/HtmlImage.java
@@ -9,25 +9,25 @@ import cgeo.geocaching.list.StoredList;
import cgeo.geocaching.utils.CancellableHandler;
import cgeo.geocaching.utils.FileUtils;
import cgeo.geocaching.utils.ImageUtils;
+import cgeo.geocaching.utils.ImageUtils.ContainerDrawable;
import cgeo.geocaching.utils.Log;
import cgeo.geocaching.utils.RxUtils;
import ch.boye.httpclientandroidlib.HttpResponse;
+
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
+
import rx.Observable;
import rx.Observable.OnSubscribe;
-import rx.Scheduler;
-import rx.Scheduler.Inner;
import rx.Subscriber;
-import rx.functions.Action1;
+import rx.functions.Action0;
import rx.functions.Func0;
import rx.functions.Func1;
-import rx.schedulers.Schedulers;
import rx.subjects.PublishSubject;
import rx.subscriptions.CompositeSubscription;
@@ -38,15 +38,13 @@ import android.graphics.Point;
import android.graphics.drawable.BitmapDrawable;
import android.net.Uri;
import android.text.Html;
+import android.widget.TextView;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Date;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
public class HtmlImage implements Html.ImageGetter {
@@ -59,7 +57,9 @@ public class HtmlImage implements Html.ImageGetter {
// given URL will be returned. This observable will emit the local copy of the image if it is present,
// regardless of its freshness, then if needed an updated fresher copy after retrieving it from the network.
// - If onlySave is false and the instance is used as an ImageGetter, only the final version of the
- // image will be returned.
+ // image will be returned, unless a view has been provided. If it has, then a dummy drawable is returned
+ // and is updated when the image is available, possibly several times if we had a stale copy of the image
+ // and then got a new one from the network.
private static final String[] BLOCKED = new String[] {
"gccounter.de",
@@ -89,26 +89,55 @@ public class HtmlImage implements Html.ImageGetter {
final private int maxWidth;
final private int maxHeight;
final private Resources resources;
+ final private TextView view;
// Background loading
final private PublishSubject<Observable<String>> loading = PublishSubject.create();
- final Observable<String> waitForEnd = Observable.merge(loading).publish().refCount();
+ final private Observable<String> waitForEnd = Observable.merge(loading).publish().refCount();
final CompositeSubscription subscription = new CompositeSubscription(waitForEnd.subscribe());
- final private Scheduler downloadScheduler = Schedulers.executor(new ThreadPoolExecutor(10, 10, 5, TimeUnit.SECONDS,
- new LinkedBlockingQueue<Runnable>()));
- public HtmlImage(final String geocode, final boolean returnErrorImage, final int listId, final boolean onlySave) {
+ /**
+ * Create a new HtmlImage object with different behaviours depending on <tt>onlySave</tt> and <tt>view</tt> values.
+ *
+ * @param geocode the geocode of the item for which we are requesting the image
+ * @param returnErrorImage set to <tt>true</tt> if an error image should be returned in case of a problem,
+ * <tt>false</tt> to get a transparent 1x1 image instead
+ * @param listId the list this cache belongs to, used to determine if an older image for the offline case can be used or not
+ * @param onlySave if set to <tt>true</tt>, {@link #getDrawable(String)} will only fetch and store the image, not return it
+ * @param view if non-null, {@link #getDrawable(String)} will return an initially empty drawable which will be redrawn when
+ * the image is ready through an invalidation of the given view
+ */
+ public HtmlImage(final String geocode, final boolean returnErrorImage, final int listId, final boolean onlySave, final TextView view) {
this.geocode = geocode;
this.returnErrorImage = returnErrorImage;
this.listId = listId;
this.onlySave = onlySave;
+ this.view = view;
- Point displaySize = Compatibility.getDisplaySize();
+ final Point displaySize = Compatibility.getDisplaySize();
this.maxWidth = displaySize.x - 25;
this.maxHeight = displaySize.y - 25;
this.resources = CgeoApplication.getInstance().getResources();
}
+ /**
+ * Create a new HtmlImage object with different behaviours depending on <tt>onlySave</tt> value. No view object
+ * will be tied to this HtmlImage.
+ *
+ * For documentation, see {@link #HtmlImage(String, boolean, int, boolean, TextView)}.
+ */
+ public HtmlImage(final String geocode, final boolean returnErrorImage, final int listId, final boolean onlySave) {
+ this(geocode, returnErrorImage, listId, onlySave, null);
+ }
+
+ /**
+ * Retrieve and optionally display an image.
+ * See {@link #HtmlImage(String, boolean, int, boolean, TextView)} for the various behaviours.
+ *
+ * @param url
+ * the URL to fetch from cache or network
+ * @return a drawable containing the image, or <tt>null</tt> if <tt>onlySave</tt> is <tt>true</tt>
+ */
@Nullable
@Override
public BitmapDrawable getDrawable(final String url) {
@@ -122,7 +151,10 @@ public class HtmlImage implements Html.ImageGetter {
}));
return null;
}
- return drawable.toBlockingObservable().lastOrDefault(null);
+ if (view == null) {
+ return drawable.toBlocking().lastOrDefault(null);
+ }
+ return new ContainerDrawable(view, drawable);
}
// Caches are loaded from disk on a computation scheduler to avoid using more threads than cores while decoding
@@ -130,7 +162,7 @@ public class HtmlImage implements Html.ImageGetter {
public Observable<BitmapDrawable> fetchDrawable(final String url) {
if (StringUtils.isBlank(url) || ImageUtils.containsPattern(url, BLOCKED)) {
- return Observable.from(getTransparent1x1Image(resources));
+ return Observable.from(ImageUtils.getTransparent1x1Drawable(resources));
}
// Explicit local file URLs are loaded from the filesystem regardless of their age. The IO part is short
@@ -152,9 +184,9 @@ public class HtmlImage implements Html.ImageGetter {
@Override
public void call(final Subscriber<? super BitmapDrawable> subscriber) {
subscription.add(subscriber);
- subscriber.add(RxUtils.computationScheduler.schedule(new Action1<Inner>() {
+ subscriber.add(RxUtils.computationScheduler.createWorker().schedule(new Action0() {
@Override
- public void call(final Inner inner) {
+ public void call() {
final Pair<BitmapDrawable, Boolean> loaded = loadFromDisk();
final BitmapDrawable bitmap = loaded.getLeft();
if (loaded.getRight()) {
@@ -165,12 +197,11 @@ public class HtmlImage implements Html.ImageGetter {
if (bitmap != null && !onlySave) {
subscriber.onNext(bitmap);
}
- subscriber.add(downloadScheduler.schedule(new Action1<Inner>() {
- @Override
- public void call(final Inner inner) {
+ RxUtils.networkScheduler.createWorker().schedule(new Action0() {
+ @Override public void call() {
downloadAndSave(subscriber);
}
- }));
+ });
}
}));
}
@@ -178,7 +209,7 @@ public class HtmlImage implements Html.ImageGetter {
private Pair<BitmapDrawable, Boolean> loadFromDisk() {
final Pair<Bitmap, Boolean> loadResult = loadImageFromStorage(url, pseudoGeocode, shared);
final Bitmap bitmap = loadResult.getLeft();
- return new ImmutablePair<BitmapDrawable, Boolean>(bitmap != null ?
+ return new ImmutablePair<>(bitmap != null ?
ImageUtils.scaleBitmapToFitDisplay(bitmap) :
null,
loadResult.getRight()
@@ -195,19 +226,17 @@ public class HtmlImage implements Html.ImageGetter {
subscriber.onCompleted();
return;
}
- } else {
- if (subscriber.isUnsubscribed() || downloadOrRefreshCopy(url, file)) {
+ } else if (subscriber.isUnsubscribed() || downloadOrRefreshCopy(url, file)) {
// The existing copy was fresh enough or we were unsubscribed earlier.
subscriber.onCompleted();
return;
- }
}
if (onlySave) {
subscriber.onCompleted();
} else {
- RxUtils.computationScheduler.schedule(new Action1<Inner>() {
+ RxUtils.computationScheduler.createWorker().schedule(new Action0() {
@Override
- public void call(final Inner inner) {
+ public void call() {
final Pair<BitmapDrawable, Boolean> loaded = loadFromDisk();
final BitmapDrawable image = loaded.getLeft();
if (image != null) {
@@ -215,7 +244,7 @@ public class HtmlImage implements Html.ImageGetter {
} else {
subscriber.onNext(returnErrorImage ?
new BitmapDrawable(resources, BitmapFactory.decodeResource(resources, R.drawable.image_not_loaded)) :
- getTransparent1x1Image(resources));
+ ImageUtils.getTransparent1x1Drawable(resources));
}
subscriber.onCompleted();
}
@@ -225,12 +254,12 @@ public class HtmlImage implements Html.ImageGetter {
});
}
- public void waitForBackgroundLoading(@Nullable final CancellableHandler handler) {
+ public Observable<String> waitForEndObservable(@Nullable final CancellableHandler handler) {
if (handler != null) {
handler.unsubscribeIfCancelled(subscription);
}
loading.onCompleted();
- waitForEnd.toBlockingObservable().lastOrDefault(null);
+ return waitForEnd;
}
/**
@@ -257,7 +286,7 @@ public class HtmlImage implements Html.ImageGetter {
return true;
}
}
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("HtmlImage.downloadOrRefreshCopy", e);
}
}
@@ -284,10 +313,6 @@ public class HtmlImage implements Html.ImageGetter {
}
}
- private BitmapDrawable getTransparent1x1Image(final Resources res) {
- return new BitmapDrawable(res, BitmapFactory.decodeResource(resources, R.drawable.image_no_placement));
- }
-
/**
* Load an image from primary or secondary storage.
*
@@ -306,10 +331,10 @@ public class HtmlImage implements Html.ImageGetter {
}
final File fileSec = LocalStorage.getStorageSecFile(pseudoGeocode, url, true);
return loadCachedImage(fileSec, forceKeep);
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.w("HtmlImage.loadImageFromStorage", e);
}
- return new ImmutablePair<Bitmap, Boolean>(null, false);
+ return new ImmutablePair<>(null, false);
}
@Nullable
@@ -351,7 +376,7 @@ public class HtmlImage implements Html.ImageGetter {
if (file.exists()) {
final boolean freshEnough = listId >= StoredList.STANDARD_LIST_ID || file.lastModified() > (new Date().getTime() - (24 * 60 * 60 * 1000)) || forceKeep;
if (onlySave) {
- return new ImmutablePair<Bitmap, Boolean>(null, true);
+ return new ImmutablePair<>(null, true);
}
final BitmapFactory.Options bfOptions = new BitmapFactory.Options();
bfOptions.inTempStorage = new byte[16 * 1024];
@@ -360,24 +385,24 @@ public class HtmlImage implements Html.ImageGetter {
final Bitmap image = BitmapFactory.decodeFile(file.getPath(), bfOptions);
if (image == null) {
Log.e("Cannot decode bitmap from " + file.getPath());
- return new ImmutablePair<Bitmap, Boolean>(null, false);
+ return new ImmutablePair<>(null, false);
}
- return new ImmutablePair<Bitmap, Boolean>(image,
+ return new ImmutablePair<>(image,
freshEnough);
}
- return new ImmutablePair<Bitmap, Boolean>(null, false);
+ return new ImmutablePair<>(null, false);
}
private void setSampleSize(final File file, final BitmapFactory.Options bfOptions) {
//Decode image size only
- BitmapFactory.Options options = new BitmapFactory.Options();
+ final BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BufferedInputStream stream = null;
try {
stream = new BufferedInputStream(new FileInputStream(file));
BitmapFactory.decodeStream(stream, null, options);
- } catch (FileNotFoundException e) {
+ } catch (final FileNotFoundException e) {
Log.e("HtmlImage.setSampleSize", e);
} finally {
IOUtils.closeQuietly(stream);
diff --git a/main/src/cgeo/geocaching/network/OAuth.java b/main/src/cgeo/geocaching/network/OAuth.java
index fa376af..cfc62fc 100644
--- a/main/src/cgeo/geocaching/network/OAuth.java
+++ b/main/src/cgeo/geocaching/network/OAuth.java
@@ -31,7 +31,7 @@ public class OAuth {
"oauth_version", "1.0");
params.sort();
- final List<String> paramsEncoded = new ArrayList<String>();
+ final List<String> paramsEncoded = new ArrayList<>();
for (final NameValuePair nameValue : params) {
paramsEncoded.add(nameValue.getName() + "=" + OAuth.percentEncode(nameValue.getValue()));
}
diff --git a/main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java b/main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java
index e74751b..eb56f0b 100644
--- a/main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java
+++ b/main/src/cgeo/geocaching/network/OAuthAuthorizationActivity.java
@@ -106,7 +106,7 @@ public abstract class OAuthAuthorizationActivity extends AbstractActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState, R.layout.authorization_activity, true);
+ super.onCreate(savedInstanceState, R.layout.authorization_activity);
Bundle extras = getIntent().getExtras();
if (extras != null) {
diff --git a/main/src/cgeo/geocaching/network/StatusUpdater.java b/main/src/cgeo/geocaching/network/StatusUpdater.java
index 4055f01..82650d1 100644
--- a/main/src/cgeo/geocaching/network/StatusUpdater.java
+++ b/main/src/cgeo/geocaching/network/StatusUpdater.java
@@ -1,14 +1,14 @@
package cgeo.geocaching.network;
import cgeo.geocaching.CgeoApplication;
+import cgeo.geocaching.utils.RxUtils;
import cgeo.geocaching.utils.Version;
import org.json.JSONException;
import org.json.JSONObject;
-import rx.Scheduler;
-import rx.schedulers.Schedulers;
+
+import rx.functions.Action0;
import rx.subjects.BehaviorSubject;
-import rx.functions.Action1;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
@@ -52,9 +52,9 @@ public class StatusUpdater {
final static public BehaviorSubject<Status> latestStatus = BehaviorSubject.create(Status.defaultStatus(null));
static {
- Schedulers.io().schedulePeriodically(new Action1<Scheduler.Inner>() {
+ RxUtils.networkScheduler.createWorker().schedulePeriodically(new Action0() {
@Override
- public void call(final Scheduler.Inner inner) {
+ public void call() {
final JSONObject response =
Network.requestJSON("http://status.cgeo.org/api/status.json",
new Parameters("version_code", String.valueOf(Version.getVersionCode(CgeoApplication.getInstance())),
diff --git a/main/src/cgeo/geocaching/search/AutoCompleteAdapter.java b/main/src/cgeo/geocaching/search/AutoCompleteAdapter.java
index 45559f4..21cf089 100644
--- a/main/src/cgeo/geocaching/search/AutoCompleteAdapter.java
+++ b/main/src/cgeo/geocaching/search/AutoCompleteAdapter.java
@@ -1,6 +1,7 @@
package cgeo.geocaching.search;
import org.apache.commons.lang3.StringUtils;
+
import rx.functions.Func1;
import android.content.Context;
@@ -14,11 +15,11 @@ import android.widget.Filter;
*/
public class AutoCompleteAdapter extends ArrayAdapter<String> {
- private final String[] EMPTY = new String[0];
+ private final static String[] EMPTY = new String[0];
private String[] suggestions = EMPTY;
private final Func1<String, String[]> suggestionFunction;
- public AutoCompleteAdapter(Context context, int textViewResourceId, final Func1<String, String[]> suggestionFunction) {
+ public AutoCompleteAdapter(final Context context, final int textViewResourceId, final Func1<String, String[]> suggestionFunction) {
super(context, textViewResourceId);
this.suggestionFunction = suggestionFunction;
}
@@ -29,7 +30,7 @@ public class AutoCompleteAdapter extends ArrayAdapter<String> {
}
@Override
- public String getItem(int index) {
+ public String getItem(final int index) {
return suggestions[index];
}
@@ -38,14 +39,14 @@ public class AutoCompleteAdapter extends ArrayAdapter<String> {
return new Filter() {
@Override
- protected FilterResults performFiltering(CharSequence constraint) {
- FilterResults filterResults = new FilterResults();
+ protected FilterResults performFiltering(final CharSequence constraint) {
+ final FilterResults filterResults = new FilterResults();
if (constraint == null) {
return filterResults;
}
- String trimmed = StringUtils.trim(constraint.toString());
+ final String trimmed = StringUtils.trim(constraint.toString());
if (StringUtils.length(trimmed) >= 2) {
- String[] newResults = suggestionFunction.call(trimmed);
+ final String[] newResults = suggestionFunction.call(trimmed);
// Assign the data to the FilterResults, but do not yet store in the global member.
// Otherwise we might invalidate the adapter and cause an IllegalStateException.
@@ -56,7 +57,7 @@ public class AutoCompleteAdapter extends ArrayAdapter<String> {
}
@Override
- protected void publishResults(CharSequence constraint, FilterResults filterResults) {
+ protected void publishResults(final CharSequence constraint, final FilterResults filterResults) {
if (filterResults != null && filterResults.count > 0) {
suggestions = (String[]) filterResults.values;
notifyDataSetChanged();
diff --git a/main/src/cgeo/geocaching/search/SearchSuggestionCursor.java b/main/src/cgeo/geocaching/search/SearchSuggestionCursor.java
new file mode 100644
index 0000000..350e23a
--- /dev/null
+++ b/main/src/cgeo/geocaching/search/SearchSuggestionCursor.java
@@ -0,0 +1,46 @@
+package cgeo.geocaching.search;
+
+import cgeo.geocaching.Intents;
+import cgeo.geocaching.enumerations.CacheType;
+
+import org.eclipse.jdt.annotation.NonNull;
+
+import android.app.SearchManager;
+import android.database.MatrixCursor;
+import android.provider.BaseColumns;
+
+/**
+ * Fixed fields cursor holding the necessary data for the search provider of the global search bar.
+ *
+ */
+public class SearchSuggestionCursor extends MatrixCursor {
+
+ /**
+ * id of the row for callbacks after selection
+ */
+ private int rowId = 0;
+
+ public SearchSuggestionCursor() {
+ super(new String[] {
+ BaseColumns._ID,
+ SearchManager.SUGGEST_COLUMN_TEXT_1,
+ SearchManager.SUGGEST_COLUMN_TEXT_2,
+ SearchManager.SUGGEST_COLUMN_INTENT_ACTION,
+ SearchManager.SUGGEST_COLUMN_QUERY,
+ SearchManager.SUGGEST_COLUMN_ICON_1 });
+ }
+
+ public void addCache(@NonNull final String geocode, @NonNull final String name, final String type) {
+ final int icon = CacheType.getById(type).markerId;
+ addRow(new String[] {
+ String.valueOf(rowId),
+ name,
+ geocode,
+ Intents.ACTION_GEOCACHE,
+ geocode,
+ String.valueOf(icon)
+ });
+ rowId++;
+ }
+
+}
diff --git a/main/src/cgeo/geocaching/search/SuggestionProvider.java b/main/src/cgeo/geocaching/search/SuggestionProvider.java
index c0a7728..f60a43e 100644
--- a/main/src/cgeo/geocaching/search/SuggestionProvider.java
+++ b/main/src/cgeo/geocaching/search/SuggestionProvider.java
@@ -1,6 +1,7 @@
package cgeo.geocaching.search;
import cgeo.geocaching.DataStore;
+import cgeo.geocaching.Geocache;
import org.apache.commons.lang3.StringUtils;
@@ -12,8 +13,6 @@ import android.net.Uri;
public class SuggestionProvider extends ContentProvider {
- private static Cursor lastCursor;
-
@Override
public boolean onCreate() {
return true;
@@ -29,14 +28,21 @@ public class SuggestionProvider extends ContentProvider {
final String searchTerm = uri.getLastPathSegment();
// can be empty when deleting the query
if (StringUtils.equals(searchTerm, SearchManager.SUGGEST_URI_PATH_QUERY)) {
- return lastCursor;
+ return getLastOpenedCaches();
}
return getSuggestions(searchTerm);
}
+ private static Cursor getLastOpenedCaches() {
+ final SearchSuggestionCursor resultCursor = new SearchSuggestionCursor();
+ for (final Geocache geocache : DataStore.getLastOpenedCaches()) {
+ resultCursor.addCache(geocache.getGeocode(), geocache.getName(), geocache.getType().id);
+ }
+ return resultCursor;
+ }
+
private static Cursor getSuggestions(final String searchTerm) {
- lastCursor = DataStore.findSuggestions(searchTerm);
- return lastCursor;
+ return DataStore.findSuggestions(searchTerm);
}
@Override
diff --git a/main/src/cgeo/geocaching/sensors/DirectionProvider.java b/main/src/cgeo/geocaching/sensors/DirectionProvider.java
index ff4a439..ed5d76a 100644
--- a/main/src/cgeo/geocaching/sensors/DirectionProvider.java
+++ b/main/src/cgeo/geocaching/sensors/DirectionProvider.java
@@ -21,9 +21,13 @@ import android.view.WindowManager;
public class DirectionProvider {
- private static final BehaviorSubject<Float> subject = BehaviorSubject.create(0.0f);
+ private static final BehaviorSubject<Float> SUBJECT = BehaviorSubject.create(0.0f);
- private static final WindowManager windowManager = (WindowManager) CgeoApplication.getInstance().getSystemService(Context.WINDOW_SERVICE);
+ private static final WindowManager WINDOW_MANAGER = (WindowManager) CgeoApplication.getInstance().getSystemService(Context.WINDOW_SERVICE);
+
+ private DirectionProvider() {
+ // utility class
+ }
static class Listener implements SensorEventListener, StartableHandlerThread.Callback {
@@ -33,22 +37,17 @@ public class DirectionProvider {
@Override
public void onSensorChanged(final SensorEvent event) {
- subject.onNext(event.values[0]);
+ SUBJECT.onNext(event.values[0]);
}
@Override
public void onAccuracyChanged(final Sensor sensor, final int accuracy) {
- /*
- * There is a bug in Android, which apparently causes this method to be called every
- * time the sensor _value_ changed, even if the _accuracy_ did not change. So logging
- * this event leads to the log being flooded with multiple entries _per second_,
- * which I experienced when running cgeo in a building (with GPS and network being
- * unreliable).
- *
- * See for example https://code.google.com/p/android/issues/detail?id=14792
- */
-
- //Log.i(Settings.tag, "Compass' accuracy is low (" + accuracy + ")");
+ /*
+ * There is a bug in Android, which apparently causes this method to be called every
+ * time the sensor _value_ changed, even if the _accuracy_ did not change. Do not have any code in here.
+ *
+ * See for example https://code.google.com/p/android/issues/detail?id=14792
+ */
}
@Override
@@ -83,7 +82,7 @@ public class DirectionProvider {
private boolean hasSensorChecked = false;
public boolean hasSensor(Context context) {
- if (hasSensorChecked == false) {
+ if (!hasSensorChecked) {
hasSensor = getOrientationSensor(context) != null;
hasSensorChecked = true;
}
@@ -99,18 +98,19 @@ public class DirectionProvider {
}
- private static final StartableHandlerThread handlerThread =
+ private static final StartableHandlerThread HANDLER_THREAD =
new StartableHandlerThread("DirectionProvider thread", Process.THREAD_PRIORITY_BACKGROUND, new Listener());
static {
- handlerThread.start();
+ HANDLER_THREAD.start();
}
- static public Observable<Float> create(final Context context) {
+
+ public static Observable<Float> create(final Context context) {
return Observable.create(new OnSubscribe<Float>() {
@Override
public void call(final Subscriber<? super Float> subscriber) {
- handlerThread.start(subscriber, context);
- subject.subscribe(subscriber);
+ HANDLER_THREAD.start(subscriber, context);
+ SUBJECT.subscribe(subscriber);
}
});
}
@@ -131,7 +131,7 @@ public class DirectionProvider {
}
private static int getRotationOffset() {
- switch (windowManager.getDefaultDisplay().getRotation()) {
+ switch (WINDOW_MANAGER.getDefaultDisplay().getRotation()) {
case Surface.ROTATION_90:
return 90;
case Surface.ROTATION_180:
diff --git a/main/src/cgeo/geocaching/sensors/GeoDataProvider.java b/main/src/cgeo/geocaching/sensors/GeoDataProvider.java
index a77b477..a4799cb 100644
--- a/main/src/cgeo/geocaching/sensors/GeoDataProvider.java
+++ b/main/src/cgeo/geocaching/sensors/GeoDataProvider.java
@@ -1,13 +1,12 @@
package cgeo.geocaching.sensors;
-import android.os.*;
import cgeo.geocaching.utils.Log;
-
import cgeo.geocaching.utils.StartableHandlerThread;
+
import org.apache.commons.lang3.StringUtils;
+
import rx.Observable;
import rx.Observable.OnSubscribe;
-import rx.Scheduler.Inner;
import rx.Subscriber;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
@@ -24,6 +23,7 @@ import android.location.GpsStatus;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
+import android.os.Bundle;
import java.util.concurrent.TimeUnit;
@@ -96,11 +96,11 @@ public class GeoDataProvider implements OnSubscribe<IGeoData> {
final private Listener gpsListener = new Listener(LocationManager.GPS_PROVIDER, gpsLocation);
@Override
- public Subscription connect() {
+ public void connect(Action1<? super Subscription> connection) {
final CompositeSubscription subscription = new CompositeSubscription();
- AndroidSchedulers.handlerThread(handlerThread.getHandler()).schedule(new Action1<Inner>() {
+ AndroidSchedulers.handlerThread(handlerThread.getHandler()).createWorker().schedule(new Action0() {
@Override
- public void call(final Inner inner) {
+ public void call() {
synchronized(lock) {
if (count++ == 0) {
Log.d("GeoDataProvider: starting the GPS and network listeners" + " (" + ++debugSessionCounter + ")");
@@ -118,9 +118,9 @@ public class GeoDataProvider implements OnSubscribe<IGeoData> {
subscription.add(Subscriptions.create(new Action0() {
@Override
public void call() {
- AndroidSchedulers.handlerThread(handlerThread.getHandler()).schedule(new Action1<Inner>() {
+ AndroidSchedulers.handlerThread(handlerThread.getHandler()).createWorker().schedule(new Action0() {
@Override
- public void call(final Inner inner) {
+ public void call() {
synchronized (lock) {
if (--count == 0) {
Log.d("GeoDataProvider: stopping the GPS and network listeners" + " (" + debugSessionCounter + ")");
@@ -135,7 +135,7 @@ public class GeoDataProvider implements OnSubscribe<IGeoData> {
}));
}
});
- return subscription;
+ connection.call(subscription);
}
};
diff --git a/main/src/cgeo/geocaching/settings/AbstractCheckCredentialsPreference.java b/main/src/cgeo/geocaching/settings/AbstractCheckCredentialsPreference.java
index 917c9c4..2f83028 100644
--- a/main/src/cgeo/geocaching/settings/AbstractCheckCredentialsPreference.java
+++ b/main/src/cgeo/geocaching/settings/AbstractCheckCredentialsPreference.java
@@ -5,13 +5,15 @@ import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.enumerations.StatusCode;
import cgeo.geocaching.network.Cookies;
import cgeo.geocaching.ui.dialog.Dialogs;
+import cgeo.geocaching.utils.RxUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.ImmutablePair;
+
+import rx.Observable;
import rx.android.observables.AndroidObservable;
import rx.functions.Action1;
import rx.functions.Func0;
-import rx.schedulers.Schedulers;
import rx.util.async.Async;
import android.app.ProgressDialog;
@@ -38,55 +40,62 @@ public abstract class AbstractCheckCredentialsPreference extends AbstractClickab
protected abstract ImmutablePair<String, String> getCredentials();
- protected abstract ImmutablePair<StatusCode, ? extends Drawable> login();
+ /**
+ * Try to login.
+ *
+ * @return A pair containing the status code, and, if the status code is
+ * <tt>NO_ERROR</tt>, an observable (or <tt>null</tt>) wihch may emit
+ * the avatar for the user (every drawable will be shown in place of the previous one).
+ */
+ protected abstract ImmutablePair<StatusCode, Observable<Drawable>> login();
private class LoginCheckClickListener implements OnPreferenceClickListener {
- final private SettingsActivity activity;
+ final private SettingsActivity settingsActivity;
LoginCheckClickListener(final SettingsActivity activity) {
- this.activity = activity;
+ this.settingsActivity = activity;
}
@Override
public boolean onPreferenceClick(Preference preference) {
- final Resources res = activity.getResources();
+ final Resources res = settingsActivity.getResources();
final ImmutablePair<String, String> credentials = getCredentials();
// check credentials for validity
if (StringUtils.isBlank(credentials.getLeft())
|| StringUtils.isBlank(credentials.getRight())) {
- ActivityMixin.showToast(activity, R.string.err_missing_auth);
+ ActivityMixin.showToast(settingsActivity, R.string.err_missing_auth);
return false;
}
- final ProgressDialog loginDialog = ProgressDialog.show(activity,
+ final ProgressDialog loginDialog = ProgressDialog.show(settingsActivity,
res.getString(R.string.init_login_popup),
res.getString(R.string.init_login_popup_working), true);
loginDialog.setCancelable(false);
Cookies.clearCookies();
- AndroidObservable.bindActivity(activity, Async.start(new Func0<ImmutablePair<StatusCode, ? extends Drawable>>() {
+ AndroidObservable.bindActivity(settingsActivity, Async.start(new Func0<ImmutablePair<StatusCode, Observable<Drawable>>>() {
@Override
- public ImmutablePair<StatusCode, ? extends Drawable> call() {
+ public ImmutablePair<StatusCode, Observable<Drawable>> call() {
return login();
}
- })).subscribe(new Action1<ImmutablePair<StatusCode, ? extends Drawable>>() {
+ })).subscribeOn(RxUtils.networkScheduler).subscribe(new Action1<ImmutablePair<StatusCode, Observable<Drawable>>>() {
@Override
- public void call(final ImmutablePair<StatusCode, ? extends Drawable> loginInfo) {
+ public void call(final ImmutablePair<StatusCode, Observable<Drawable>> loginInfo) {
loginDialog.dismiss();
if (loginInfo.getLeft() == StatusCode.NO_ERROR) {
- Dialogs.message(activity, R.string.init_login_popup, R.string.init_login_popup_ok, loginInfo.getRight());
+ Dialogs.message(settingsActivity, R.string.init_login_popup, R.string.init_login_popup_ok, loginInfo.getRight());
} else {
- Dialogs.message(activity, R.string.init_login_popup,
+ Dialogs.message(settingsActivity, R.string.init_login_popup,
res.getString(R.string.init_login_popup_failed_reason)
+ " "
+ loginInfo.getLeft().getErrorString(res)
+ "."
);
}
- activity.initBasicMemberPreferences();
+ settingsActivity.initBasicMemberPreferences();
}
- }, Schedulers.io());
+ });
return false; // no shared preference has to be changed
}
diff --git a/main/src/cgeo/geocaching/settings/CheckECCredentialsPreference.java b/main/src/cgeo/geocaching/settings/CheckECCredentialsPreference.java
index c1cf740..f5d9ab5 100644
--- a/main/src/cgeo/geocaching/settings/CheckECCredentialsPreference.java
+++ b/main/src/cgeo/geocaching/settings/CheckECCredentialsPreference.java
@@ -6,6 +6,8 @@ import cgeo.geocaching.enumerations.StatusCode;
import org.apache.commons.lang3.tuple.ImmutablePair;
+import rx.Observable;
+
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
@@ -26,7 +28,7 @@ public class CheckECCredentialsPreference extends AbstractCheckCredentialsPrefer
}
@Override
- protected ImmutablePair<StatusCode, Drawable> login() {
- return new ImmutablePair<StatusCode, Drawable>(ECLogin.getInstance().login(), null);
+ protected ImmutablePair<StatusCode, Observable<Drawable>> login() {
+ return new ImmutablePair<>(ECLogin.getInstance().login(), null);
}
}
diff --git a/main/src/cgeo/geocaching/settings/CheckGcCredentialsPreference.java b/main/src/cgeo/geocaching/settings/CheckGcCredentialsPreference.java
index 2a05f47..0269f3b 100644
--- a/main/src/cgeo/geocaching/settings/CheckGcCredentialsPreference.java
+++ b/main/src/cgeo/geocaching/settings/CheckGcCredentialsPreference.java
@@ -5,6 +5,8 @@ import cgeo.geocaching.enumerations.StatusCode;
import org.apache.commons.lang3.tuple.ImmutablePair;
+import rx.Observable;
+
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
@@ -25,7 +27,7 @@ public class CheckGcCredentialsPreference extends AbstractCheckCredentialsPrefer
}
@Override
- protected ImmutablePair<StatusCode, ? extends Drawable> login() {
+ protected ImmutablePair<StatusCode, Observable<Drawable>> login() {
final StatusCode loginResult = GCLogin.getInstance().login();
switch (loginResult) {
case NO_ERROR:
diff --git a/main/src/cgeo/geocaching/settings/OAuthPreference.java b/main/src/cgeo/geocaching/settings/OAuthPreference.java
index 54f8023..54bad6d 100644
--- a/main/src/cgeo/geocaching/settings/OAuthPreference.java
+++ b/main/src/cgeo/geocaching/settings/OAuthPreference.java
@@ -23,13 +23,14 @@ public class OAuthPreference extends AbstractClickablePreference {
OCNL(R.string.pref_fakekey_ocnl_authorization, OCAuthorizationActivity.class, OCAuthParams.OC_NL_AUTH_PARAMS),
OCUS(R.string.pref_fakekey_ocus_authorization, OCAuthorizationActivity.class, OCAuthParams.OC_US_AUTH_PARAMS),
OCRO(R.string.pref_fakekey_ocro_authorization, OCAuthorizationActivity.class, OCAuthParams.OC_RO_AUTH_PARAMS),
+ OCUK(R.string.pref_fakekey_ocuk_authorization, OCAuthorizationActivity.class, OCAuthParams.OC_UK_AUTH_PARAMS),
TWITTER(R.string.pref_fakekey_twitter_authorization, TwitterAuthorizationActivity.class, TwitterAuthorizationActivity.TWITTER_OAUTH_PARAMS);
public final int prefKeyId;
public final Class<?> authActivity;
public final OAuthParameters authParams;
- OAuthActivityMapping(int prefKeyId, Class<?> authActivity, OAuthParameters authParams) {
+ OAuthActivityMapping(final int prefKeyId, final Class<?> authActivity, final OAuthParameters authParams) {
this.prefKeyId = prefKeyId;
this.authActivity = authActivity;
this.authParams = authParams;
@@ -40,7 +41,7 @@ public class OAuthPreference extends AbstractClickablePreference {
private OAuthActivityMapping getAuthorization() {
final String prefKey = getKey();
- for (OAuthActivityMapping auth : OAuthActivityMapping.values()) {
+ for (final OAuthActivityMapping auth : OAuthActivityMapping.values()) {
if (auth.prefKeyId != NO_KEY && prefKey.equals(CgeoApplication.getInstance().getString(auth.prefKeyId))) {
return auth;
}
@@ -48,12 +49,12 @@ public class OAuthPreference extends AbstractClickablePreference {
return OAuthActivityMapping.NONE;
}
- public OAuthPreference(Context context, AttributeSet attrs) {
+ public OAuthPreference(final Context context, final AttributeSet attrs) {
super(context, attrs);
this.oAuthMapping = getAuthorization();
}
- public OAuthPreference(Context context, AttributeSet attrs, int defStyle) {
+ public OAuthPreference(final Context context, final AttributeSet attrs, final int defStyle) {
super(context, attrs, defStyle);
this.oAuthMapping = getAuthorization();
}
@@ -63,9 +64,9 @@ public class OAuthPreference extends AbstractClickablePreference {
activity.setAuthTitle(oAuthMapping.prefKeyId);
return new OnPreferenceClickListener() {
@Override
- public boolean onPreferenceClick(Preference preference) {
+ public boolean onPreferenceClick(final Preference preference) {
if (oAuthMapping.authActivity != null && oAuthMapping.authParams != null) {
- Intent authIntent = new Intent(preference.getContext(),
+ final Intent authIntent = new Intent(preference.getContext(),
oAuthMapping.authActivity);
oAuthMapping.authParams.setOAuthExtras(authIntent);
activity.startActivityForResult(authIntent,
diff --git a/main/src/cgeo/geocaching/settings/OCPreferenceKeys.java b/main/src/cgeo/geocaching/settings/OCPreferenceKeys.java
index e3c5aca..d8983e8 100644
--- a/main/src/cgeo/geocaching/settings/OCPreferenceKeys.java
+++ b/main/src/cgeo/geocaching/settings/OCPreferenceKeys.java
@@ -26,11 +26,14 @@ public enum OCPreferenceKeys {
R.string.pref_ocnl_tokenpublic, R.string.pref_ocnl_tokensecret, OCAuthParams.OC_NL_AUTH_PARAMS),
OC_RO("oc.ro", R.string.pref_connectorOCROActive, R.string.preference_screen_ocro,
R.string.pref_fakekey_ocro_authorization, R.string.pref_fakekey_ocro_website,
- R.string.pref_ocro_tokenpublic, R.string.pref_ocro_tokensecret, OCAuthParams.OC_RO_AUTH_PARAMS);
+ R.string.pref_ocro_tokenpublic, R.string.pref_ocro_tokensecret, OCAuthParams.OC_RO_AUTH_PARAMS),
+ OC_UK("oc.uk", R.string.pref_connectorOCUKActive, R.string.preference_screen_ocuk,
+ R.string.pref_fakekey_ocuk_authorization, R.string.pref_fakekey_ocuk_website,
+ R.string.pref_ocuk_tokenpublic, R.string.pref_ocuk_tokensecret, OCAuthParams.OC_UK_AUTH_PARAMS);
- private OCPreferenceKeys(final String siteId, final int isActivePrefId, final int prefScreenId, final int authPrefId,
- final int websitePrefId, final int publicTokenPrefId, final int privateTokenPrefId, final OCAuthParams authParams) {
+ OCPreferenceKeys(final String siteId, final int isActivePrefId, final int prefScreenId, final int authPrefId,
+ final int websitePrefId, final int publicTokenPrefId, final int privateTokenPrefId, final OCAuthParams authParams) {
this.siteId = siteId;
this.isActivePrefId = isActivePrefId;
this.prefScreenId = prefScreenId;
@@ -46,10 +49,10 @@ public enum OCPreferenceKeys {
private static final SparseArray<OCPreferenceKeys> FIND_BY_AUTH_PREF_ID;
static {
- FIND_BY_ISACTIVE_ID = new SparseArray<OCPreferenceKeys>(values().length);
- FIND_BY_AUTH_PREF_ID = new SparseArray<OCPreferenceKeys>(values().length);
- Map<String, OCPreferenceKeys> byIsactiveKey = new HashMap<String, OCPreferenceKeys>();
- for (OCPreferenceKeys key : values()) {
+ FIND_BY_ISACTIVE_ID = new SparseArray<>(values().length);
+ FIND_BY_AUTH_PREF_ID = new SparseArray<>(values().length);
+ final Map<String, OCPreferenceKeys> byIsactiveKey = new HashMap<>();
+ for (final OCPreferenceKeys key : values()) {
FIND_BY_ISACTIVE_ID.put(key.isActivePrefId, key);
FIND_BY_AUTH_PREF_ID.put(key.authPrefId, key);
byIsactiveKey.put(CgeoApplication.getInstance().getString(key.isActivePrefId), key);
diff --git a/main/src/cgeo/geocaching/settings/RegisterSend2CgeoPreference.java b/main/src/cgeo/geocaching/settings/RegisterSend2CgeoPreference.java
index cc2de9f..84c343a 100644
--- a/main/src/cgeo/geocaching/settings/RegisterSend2CgeoPreference.java
+++ b/main/src/cgeo/geocaching/settings/RegisterSend2CgeoPreference.java
@@ -6,14 +6,16 @@ import cgeo.geocaching.network.Network;
import cgeo.geocaching.network.Parameters;
import cgeo.geocaching.ui.dialog.Dialogs;
import cgeo.geocaching.utils.Log;
+import cgeo.geocaching.utils.RxUtils;
import ch.boye.httpclientandroidlib.HttpResponse;
+
import org.apache.commons.lang3.StringUtils;
+
import rx.Observable;
import rx.android.observables.AndroidObservable;
import rx.functions.Action1;
import rx.functions.Func0;
-import rx.schedulers.Schedulers;
import android.app.ProgressDialog;
import android.content.Context;
@@ -75,7 +77,7 @@ public class RegisterSend2CgeoPreference extends AbstractClickablePreference {
return Observable.empty();
}
- }).firstOrDefault(0)).subscribe(new Action1<Integer>() {
+ }).firstOrDefault(0)).subscribeOn(RxUtils.networkScheduler).subscribe(new Action1<Integer>() {
@Override
public void call(final Integer pin) {
progressDialog.dismiss();
@@ -87,7 +89,7 @@ public class RegisterSend2CgeoPreference extends AbstractClickablePreference {
Dialogs.message(activity, R.string.init_sendToCgeo, R.string.init_sendToCgeo_register_fail);
}
}
- }, Schedulers.io());
+ });
return true;
}
diff --git a/main/src/cgeo/geocaching/settings/Settings.java b/main/src/cgeo/geocaching/settings/Settings.java
index 7a4dfdd..01ebd6f 100644
--- a/main/src/cgeo/geocaching/settings/Settings.java
+++ b/main/src/cgeo/geocaching/settings/Settings.java
@@ -13,7 +13,7 @@ import cgeo.geocaching.enumerations.LogType;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.list.StoredList;
import cgeo.geocaching.maps.MapProviderFactory;
-import cgeo.geocaching.maps.google.GoogleMapProvider;
+import cgeo.geocaching.maps.google.v1.GoogleMapProvider;
import cgeo.geocaching.maps.interfaces.GeoPointImpl;
import cgeo.geocaching.maps.interfaces.MapProvider;
import cgeo.geocaching.maps.interfaces.MapSource;
@@ -39,6 +39,7 @@ import android.preference.PreferenceManager;
import java.io.File;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import java.util.Locale;
@@ -47,6 +48,7 @@ import java.util.Locale;
*/
public class Settings {
+ private static final char HISTORY_SEPARATOR = ',';
public static final int SHOW_WP_THRESHOLD_DEFAULT = 10;
public static final int SHOW_WP_THRESHOLD_MAX = 50;
private static final int MAP_SOURCE_DEFAULT = GoogleMapProvider.GOOGLE_MAP_ID.hashCode();
@@ -63,7 +65,7 @@ public class Settings {
Min,
Sec;
- public static CoordInputFormatEnum fromInt(int id) {
+ public static CoordInputFormatEnum fromInt(final int id) {
final CoordInputFormatEnum[] values = CoordInputFormatEnum.values();
if (id < 0 || id >= values.length) {
return Min;
@@ -76,7 +78,9 @@ public class Settings {
.getDefaultSharedPreferences(CgeoApplication.getInstance().getBaseContext());
static {
migrateSettings();
- Log.setDebug(sharedPrefs.getBoolean(getKey(R.string.pref_debug), false));
+ final boolean isDebug = sharedPrefs.getBoolean(getKey(R.string.pref_debug), false);
+ Log.setDebug(isDebug);
+ CgeoApplication.dumpOnOutOfMemory(isDebug);
}
/**
@@ -91,7 +95,7 @@ public class Settings {
private static void migrateSettings() {
// migrate from non standard file location and integer based boolean types
- int oldVersion = getInt(R.string.pref_settingsversion, 0);
+ final int oldVersion = getInt(R.string.pref_settingsversion, 0);
if (oldVersion < 1) {
final String oldPreferencesName = "cgeo.pref";
final SharedPreferences old = CgeoApplication.getInstance().getSharedPreferences(oldPreferencesName, Context.MODE_PRIVATE);
@@ -173,13 +177,13 @@ public class Settings {
e.putInt(getKey(R.string.pref_showwaypointsthreshold), wpThreshold);
// KEY_MAP_SOURCE must be string, because it is the key for a ListPreference now
- int ms = sharedPrefs.getInt(getKey(R.string.pref_mapsource), MAP_SOURCE_DEFAULT);
+ final int ms = sharedPrefs.getInt(getKey(R.string.pref_mapsource), MAP_SOURCE_DEFAULT);
e.remove(getKey(R.string.pref_mapsource));
e.putString(getKey(R.string.pref_mapsource), String.valueOf(ms));
// navigation tool ids must be string, because ListPreference uses strings as keys
- int dnt1 = sharedPrefs.getInt(getKey(R.string.pref_defaultNavigationTool), NavigationAppsEnum.COMPASS.id);
- int dnt2 = sharedPrefs.getInt(getKey(R.string.pref_defaultNavigationTool2), NavigationAppsEnum.INTERNAL_MAP.id);
+ final int dnt1 = sharedPrefs.getInt(getKey(R.string.pref_defaultNavigationTool), NavigationAppsEnum.COMPASS.id);
+ final int dnt2 = sharedPrefs.getInt(getKey(R.string.pref_defaultNavigationTool2), NavigationAppsEnum.INTERNAL_MAP.id);
e.remove(getKey(R.string.pref_defaultNavigationTool));
e.remove(getKey(R.string.pref_defaultNavigationTool2));
e.putString(getKey(R.string.pref_defaultNavigationTool), String.valueOf(dnt1));
@@ -258,7 +262,7 @@ public class Settings {
return sharedPrefs.contains(getKey(prefKeyId));
}
- public static void setLanguage(boolean useEnglish) {
+ public static void setLanguage(final boolean useEnglish) {
final Configuration config = new Configuration();
config.locale = useEnglish ? Locale.ENGLISH : Locale.getDefault();
final Resources resources = CgeoApplication.getInstance().getResources();
@@ -291,10 +295,10 @@ public class Settings {
final String password = getString(connector.getPasswordPreferenceKey(), null);
if (StringUtils.isBlank(username) || StringUtils.isBlank(password)) {
- return new ImmutablePair<String, String>(StringUtils.EMPTY, StringUtils.EMPTY);
+ return new ImmutablePair<>(StringUtils.EMPTY, StringUtils.EMPTY);
}
- return new ImmutablePair<String, String>(username, password);
+ return new ImmutablePair<>(username, password);
}
public static String getUsername() {
@@ -330,7 +334,7 @@ public class Settings {
}
public static ImmutablePair<String, String> getTokenPair(final int tokenPublicPrefKey, final int tokenSecretPrefKey) {
- return new ImmutablePair<String, String>(getString(tokenPublicPrefKey, null), getString(tokenSecretPrefKey, null));
+ return new ImmutablePair<>(getString(tokenPublicPrefKey, null), getString(tokenSecretPrefKey, null));
}
public static void setTokens(final int tokenPublicPrefKey, @Nullable final String tokenPublic, final int tokenSecretPrefKey, @Nullable final String tokenSecret) {
@@ -346,11 +350,11 @@ public class Settings {
}
}
- public static boolean isOCConnectorActive(int isActivePrefKeyId) {
+ public static boolean isOCConnectorActive(final int isActivePrefKeyId) {
return getBoolean(isActivePrefKeyId, false);
}
- public static boolean hasOCAuthorization(int tokenPublicPrefKeyId, int tokenSecretPrefKeyId) {
+ public static boolean hasOCAuthorization(final int tokenPublicPrefKeyId, final int tokenSecretPrefKeyId) {
return StringUtils.isNotBlank(getString(tokenPublicPrefKeyId, ""))
&& StringUtils.isNotBlank(getString(tokenSecretPrefKeyId, ""));
}
@@ -370,11 +374,11 @@ public class Settings {
return null;
}
- return new ImmutablePair<String, String>(username, password);
+ return new ImmutablePair<>(username, password);
}
public static String getSignature() {
- return getString(R.string.pref_signature, null);
+ return getString(R.string.pref_signature, StringUtils.EMPTY);
}
public static boolean setCookieStore(final String cookies) {
@@ -424,7 +428,7 @@ public class Settings {
}
public static boolean setMapFile(final String mapFile) {
- boolean result = putString(R.string.pref_mapfile, mapFile);
+ final boolean result = putString(R.string.pref_mapfile, mapFile);
if (mapFile != null) {
setMapFileDirectory(new File(mapFile).getParent());
}
@@ -444,7 +448,7 @@ public class Settings {
}
public static boolean setMapFileDirectory(final String mapFileDirectory) {
- boolean result = putString(R.string.pref_mapDirectory, mapFileDirectory);
+ final boolean result = putString(R.string.pref_mapDirectory, mapFileDirectory);
MapsforgeMapProvider.getInstance().updateOfflineMaps();
return result;
}
@@ -624,6 +628,7 @@ public class Settings {
private final static int MAPNIK = 1;
private final static int CYCLEMAP = 3;
private final static int OFFLINE = 4;
+ private static final int HISTORY_SIZE = 10;
/**
* convert old preference ids for maps (based on constant values) into new hash based ids
@@ -676,8 +681,8 @@ public class Settings {
public static Geopoint getAnyCoordinates() {
if (contains(R.string.pref_anylatitude) && contains(R.string.pref_anylongitude)) {
- float lat = getFloat(R.string.pref_anylatitude, 0);
- float lon = getFloat(R.string.pref_anylongitude, 0);
+ final float lat = getFloat(R.string.pref_anylatitude, 0);
+ final float lon = getFloat(R.string.pref_anylongitude, 0);
return new Geopoint(lat, lon);
}
return null;
@@ -709,6 +714,10 @@ public class Settings {
return getString(R.string.pref_webDeviceCode, null);
}
+ public static boolean isRegisteredForSend2cgeo() {
+ return getWebDeviceCode() != null;
+ }
+
public static String getWebDeviceName() {
return getString(R.string.pref_webDeviceName, android.os.Build.MODEL);
}
@@ -760,7 +769,7 @@ public class Settings {
}
public static void setTwitterTokens(@Nullable final String tokenPublic,
- @Nullable final String tokenSecret, boolean enableTwitter) {
+ @Nullable final String tokenSecret, final boolean enableTwitter) {
putString(R.string.pref_twitter_token_public, tokenPublic);
putString(R.string.pref_twitter_token_secret, tokenSecret);
if (tokenPublic != null) {
@@ -777,9 +786,9 @@ public class Settings {
}
public static ImmutablePair<String, String> getTempToken() {
- String tokenPublic = getString(R.string.pref_temp_twitter_token_public, null);
- String tokenSecret = getString(R.string.pref_temp_twitter_token_secret, null);
- return new ImmutablePair<String, String>(tokenPublic, tokenSecret);
+ final String tokenPublic = getString(R.string.pref_temp_twitter_token_public, null);
+ final String tokenSecret = getString(R.string.pref_temp_twitter_token_secret, null);
+ return new ImmutablePair<>(tokenPublic, tokenSecret);
}
public static int getVersion() {
@@ -889,8 +898,8 @@ public class Settings {
}
public static File[] getMapThemeFiles() {
- File directory = new File(Settings.getCustomRenderThemeBaseFolder());
- List<File> result = new ArrayList<File>();
+ final File directory = new File(Settings.getCustomRenderThemeBaseFolder());
+ final List<File> result = new ArrayList<>();
FileUtils.listDir(result, directory, new ExtensionsBasedFileSelector(new String[] { "xml" }), null);
return result.toArray(new File[result.size()]);
@@ -898,13 +907,13 @@ public class Settings {
private static class ExtensionsBasedFileSelector extends FileSelector {
private final String[] extensions;
- public ExtensionsBasedFileSelector(String[] extensions) {
+ public ExtensionsBasedFileSelector(final String[] extensions) {
this.extensions = extensions;
}
@Override
- public boolean isSelected(File file) {
- String filename = file.getName();
- for (String ext : extensions) {
+ public boolean isSelected(final File file) {
+ final String filename = file.getName();
+ for (final String ext : extensions) {
if (StringUtils.endsWithIgnoreCase(filename, ext)) {
return true;
}
@@ -970,7 +979,7 @@ public class Settings {
putLong(R.string.pref_fieldNoteExportDate, date);
}
- public static boolean isUseNavigationApp(NavigationAppsEnum navApp) {
+ public static boolean isUseNavigationApp(final NavigationAppsEnum navApp) {
return getBoolean(navApp.preferenceKey, true);
}
@@ -979,7 +988,7 @@ public class Settings {
*
* @param upload
*/
- public static void setFieldNoteExportUpload(boolean upload) {
+ public static void setFieldNoteExportUpload(final boolean upload) {
putBoolean(R.string.pref_fieldNoteExportUpload, upload);
}
@@ -992,7 +1001,7 @@ public class Settings {
*
* @param onlyNew
*/
- public static void setFieldNoteExportOnlyNew(boolean onlyNew) {
+ public static void setFieldNoteExportOnlyNew(final boolean onlyNew) {
putBoolean(R.string.pref_fieldNoteExportOnlyNew, onlyNew);
}
@@ -1004,4 +1013,25 @@ public class Settings {
return getString(R.string.pref_ec_icons, "1");
}
+ /* Store last checksum of changelog for changelog display */
+ public static long getLastChangelogChecksum() {
+ return getLong(R.string.pref_changelog_last_checksum, 0);
+ }
+
+ public static void setLastChangelogChecksum(final long checksum) {
+ putLong(R.string.pref_changelog_last_checksum, checksum);
+ }
+
+ public static List<String> getLastOpenedCaches() {
+ final List<String> history = Arrays.asList(StringUtils.split(getString(R.string.pref_caches_history, StringUtils.EMPTY), HISTORY_SEPARATOR));
+ return history.subList(0, Math.min(HISTORY_SIZE, history.size()));
+ }
+
+ public static void addCacheToHistory(@NonNull final String geocode) {
+ final ArrayList<String> history = new ArrayList<>(getLastOpenedCaches());
+ // bring entry to front, if it already existed
+ history.remove(geocode);
+ history.add(0, geocode);
+ putString(R.string.pref_caches_history, StringUtils.join(history, HISTORY_SEPARATOR));
+ }
}
diff --git a/main/src/cgeo/geocaching/settings/SettingsActivity.java b/main/src/cgeo/geocaching/settings/SettingsActivity.java
index dc1a39d..bf73370 100644
--- a/main/src/cgeo/geocaching/settings/SettingsActivity.java
+++ b/main/src/cgeo/geocaching/settings/SettingsActivity.java
@@ -9,11 +9,11 @@ import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.apps.cache.navi.NavigationAppFactory;
import cgeo.geocaching.apps.cache.navi.NavigationAppFactory.NavigationAppsEnum;
import cgeo.geocaching.connector.gc.GCConnector;
-import cgeo.geocaching.connector.gc.GCLogin;
import cgeo.geocaching.files.SimpleDirChooser;
import cgeo.geocaching.maps.MapProviderFactory;
import cgeo.geocaching.maps.interfaces.MapSource;
import cgeo.geocaching.utils.DatabaseBackupUtils;
+import cgeo.geocaching.utils.DebugUtils;
import cgeo.geocaching.utils.Log;
import org.apache.commons.lang3.StringUtils;
@@ -90,21 +90,21 @@ public class SettingsActivity extends PreferenceActivity {
SettingsActivity.addPreferencesFromResource(this, R.xml.preferences);
initPreferences();
- Intent intent = getIntent();
+ final Intent intent = getIntent();
openInitialScreen(intent.getIntExtra(INTENT_OPEN_SCREEN, 0));
}
- private void openInitialScreen(int initialScreen) {
+ private void openInitialScreen(final int initialScreen) {
if (initialScreen == 0) {
return;
}
- PreferenceScreen screen = (PreferenceScreen) getPreference(initialScreen);
+ final PreferenceScreen screen = (PreferenceScreen) getPreference(initialScreen);
if (screen == null) {
return;
}
try {
setPreferenceScreen(screen);
- } catch (RuntimeException e) {
+ } catch (final RuntimeException e) {
Log.e("could not open preferences " + initialScreen, e);
}
}
@@ -129,7 +129,7 @@ public class SettingsActivity extends PreferenceActivity {
initNavigationMenuPreferences();
initMaintenanceButtons();
- for (int k : new int[] { R.string.pref_username, R.string.pref_password,
+ for (final int k : new int[] { R.string.pref_username, R.string.pref_password,
R.string.pref_pass_vote, R.string.pref_signature,
R.string.pref_mapsource, R.string.pref_renderthemepath,
R.string.pref_gpxExportDir, R.string.pref_gpxImportDir,
@@ -143,7 +143,7 @@ public class SettingsActivity extends PreferenceActivity {
}
private void initNavigationMenuPreferences() {
- for (NavigationAppsEnum appEnum : NavigationAppsEnum.values()) {
+ for (final NavigationAppsEnum appEnum : NavigationAppsEnum.values()) {
if (appEnum.app.isInstalled()) {
getPreference(appEnum.preferenceKey).setEnabled(true);
}
@@ -154,26 +154,33 @@ public class SettingsActivity extends PreferenceActivity {
}
private void initServicePreferences() {
- for (OCPreferenceKeys key : OCPreferenceKeys.values()) {
+ for (final OCPreferenceKeys key : OCPreferenceKeys.values()) {
getPreference(key.isActivePrefId).setOnPreferenceChangeListener(VALUE_CHANGE_LISTENER);
setWebsite(key.websitePrefId, key.authParams.host);
- setServiceScreenSummary(getPreferenceManager(), key.isActivePrefId);
+ getPreference(key.prefScreenId).setSummary(getServiceSummary(Settings.isOCConnectorActive(key.isActivePrefId)));
}
getPreference(R.string.pref_connectorGCActive).setOnPreferenceChangeListener(VALUE_CHANGE_LISTENER);
- getPreference(R.string.pref_connectorOXActive).setOnPreferenceChangeListener(VALUE_CHANGE_LISTENER);
- getPreference(R.string.pref_connectorECActive).setOnPreferenceChangeListener(VALUE_CHANGE_LISTENER);
setWebsite(R.string.pref_fakekey_gc_website, GCConnector.getInstance().getHost());
+ getPreference(R.string.preference_screen_gc).setSummary(getServiceSummary(Settings.isGCConnectorActive()));
+
+ getPreference(R.string.pref_connectorOXActive).setOnPreferenceChangeListener(VALUE_CHANGE_LISTENER);
setWebsite(R.string.pref_fakekey_ox_website, "opencaching.com");
+ getPreference(R.string.preference_screen_ox).setSummary(getServiceSummary(Settings.isOXConnectorActive()));
+
+ getPreference(R.string.pref_connectorECActive).setOnPreferenceChangeListener(VALUE_CHANGE_LISTENER);
setWebsite(R.string.pref_fakekey_ec_website, "extremcaching.com");
+ getPreference(R.string.preference_screen_ec).setSummary(getServiceSummary(Settings.isECConnectorActive()));
+
+ getPreference(R.string.pref_ratingwanted).setOnPreferenceChangeListener(VALUE_CHANGE_LISTENER);
setWebsite(R.string.pref_fakekey_gcvote_website, "gcvote.com");
+ getPreference(R.string.preference_screen_gcvote).setSummary(getServiceSummary(Settings.isRatingWanted()));
+
setWebsite(R.string.pref_fakekey_sendtocgeo_website, "send2.cgeo.org");
- setServiceScreenSummary(getPreferenceManager(), R.string.pref_connectorGCActive);
- setServiceScreenSummary(getPreferenceManager(), R.string.pref_connectorOXActive);
- setServiceScreenSummary(getPreferenceManager(), R.string.pref_connectorECActive);
+ getPreference(R.string.preference_screen_sendtocgeo).setSummary(getServiceSummary(Settings.isRegisteredForSend2cgeo()));
}
private void setWebsite(final int preferenceKey, final String host) {
- Preference preference = getPreference(preferenceKey);
+ final Preference preference = getPreference(preferenceKey);
preference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(final Preference preference) {
@@ -183,36 +190,10 @@ public class SettingsActivity extends PreferenceActivity {
});
}
- private static String getServiceSummary(boolean status) {
+ private static String getServiceSummary(final boolean status) {
return status ? CgeoApplication.getInstance().getString(R.string.settings_service_active) : StringUtils.EMPTY;
}
- private static void setServiceScreenSummary(PreferenceManager preferenceManager, final int preferenceKey) {
-
- String summary = StringUtils.EMPTY;
-
- switch (preferenceKey) {
- case R.string.pref_connectorGCActive:
- summary = getServiceSummary(Settings.isGCConnectorActive());
- preferenceManager.findPreference(getKey(R.string.preference_screen_gc)).setSummary(summary);
- break;
- case R.string.pref_connectorOXActive:
- summary = getServiceSummary(Settings.isOXConnectorActive());
- preferenceManager.findPreference(getKey(R.string.preference_screen_ox)).setSummary(summary);
- break;
- case R.string.pref_connectorECActive:
- summary = getServiceSummary(Settings.isECConnectorActive());
- preferenceManager.findPreference(getKey(R.string.preference_screen_ec)).setSummary(summary);
- break;
- default:
- if (OCPreferenceKeys.isOCPreference(preferenceKey)) {
- OCPreferenceKeys prefKey = OCPreferenceKeys.getById(preferenceKey);
- summary = getServiceSummary(Settings.isOCConnectorActive(prefKey.isActivePrefId));
- preferenceManager.findPreference(getKey(prefKey.prefScreenId)).setSummary(summary);
- }
- }
- }
-
private static String getKey(final int prefKeyId) {
return CgeoApplication.getInstance().getString(prefKeyId);
}
@@ -225,11 +206,11 @@ public class SettingsActivity extends PreferenceActivity {
* Fill the choice list for map sources.
*/
private void initMapSourcePreference() {
- ListPreference pref = (ListPreference) getPreference(R.string.pref_mapsource);
+ final ListPreference pref = (ListPreference) getPreference(R.string.pref_mapsource);
- List<MapSource> mapSources = MapProviderFactory.getMapSources();
- CharSequence[] entries = new CharSequence[mapSources.size()];
- CharSequence[] values = new CharSequence[mapSources.size()];
+ final List<MapSource> mapSources = MapProviderFactory.getMapSources();
+ final CharSequence[] entries = new CharSequence[mapSources.size()];
+ final CharSequence[] values = new CharSequence[mapSources.size()];
for (int i = 0; i < mapSources.size(); ++i) {
entries[i] = mapSources.get(i).getName();
values[i] = String.valueOf(mapSources.get(i).getNumericalId());
@@ -245,8 +226,8 @@ public class SettingsActivity extends PreferenceActivity {
final List<NavigationAppsEnum> apps = NavigationAppFactory.getInstalledDefaultNavigationApps();
- CharSequence[] entries = new CharSequence[apps.size()];
- CharSequence[] values = new CharSequence[apps.size()];
+ final CharSequence[] entries = new CharSequence[apps.size()];
+ final CharSequence[] values = new CharSequence[apps.size()];
for (int i = 0; i < apps.size(); ++i) {
entries[i] = apps.get(i).toString();
values[i] = String.valueOf(apps.get(i).id);
@@ -277,7 +258,7 @@ public class SettingsActivity extends PreferenceActivity {
new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(final Preference preference) {
- Intent i = new Intent(SettingsActivity.this,
+ final Intent i = new Intent(SettingsActivity.this,
SelectMapfileActivity.class);
startActivityForResult(i, R.string.pref_mapDirectory);
return false;
@@ -307,7 +288,7 @@ public class SettingsActivity extends PreferenceActivity {
dirChooser.putExtra(FileManagerIntents.EXTRA_BUTTON_TEXT,
getString(android.R.string.ok));
startActivityForResult(dirChooser, dct.requestCode);
- } catch (android.content.ActivityNotFoundException ex) {
+ } catch (final android.content.ActivityNotFoundException ex) {
// OI file manager not available
final Intent dirChooser = new Intent(this, SimpleDirChooser.class);
dirChooser.putExtra(Intents.EXTRA_START_DIR, startDirectory);
@@ -319,7 +300,7 @@ public class SettingsActivity extends PreferenceActivity {
private void setChosenDirectory(final DirChooserType dct, final Intent data) {
final String directory = new File(data.getData().getPath()).getAbsolutePath();
if (StringUtils.isNotBlank(directory)) {
- Preference p = getPreference(dct.keyId);
+ final Preference p = getPreference(dct.keyId);
if (p == null) {
return;
}
@@ -329,7 +310,7 @@ public class SettingsActivity extends PreferenceActivity {
}
public void initBackupButtons() {
- Preference backup = getPreference(R.string.pref_fakekey_preference_backup);
+ final Preference backup = getPreference(R.string.pref_fakekey_preference_backup);
backup.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(final Preference preference) {
@@ -343,7 +324,7 @@ public class SettingsActivity extends PreferenceActivity {
}
});
- Preference restore = getPreference(R.string.pref_fakekey_preference_restore);
+ final Preference restore = getPreference(R.string.pref_fakekey_preference_restore);
restore.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(final Preference preference) {
@@ -354,14 +335,14 @@ public class SettingsActivity extends PreferenceActivity {
}
public void initMaintenanceButtons() {
- Preference dirMaintenance = getPreference(R.string.pref_fakekey_preference_maintenance_directories);
+ final Preference dirMaintenance = getPreference(R.string.pref_fakekey_preference_maintenance_directories);
dirMaintenance.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(final Preference preference) {
// disable the button, as the cleanup runs in background and should not be invoked a second time
preference.setEnabled(false);
- Resources res = getResources();
+ final Resources res = getResources();
final SettingsActivity activity = SettingsActivity.this;
final ProgressDialog dialog = ProgressDialog.show(activity, res.getString(R.string.init_maintenance), res.getString(R.string.init_maintenance_directories), true, false);
new Thread() {
@@ -380,10 +361,19 @@ public class SettingsActivity extends PreferenceActivity {
return true;
}
});
+ final Preference memoryDumpPref = getPreference(R.string.pref_memory_dump);
+ memoryDumpPref
+ .setOnPreferenceClickListener(new OnPreferenceClickListener() {
+ @Override public boolean onPreferenceClick(
+ final Preference preference) {
+ DebugUtils.createMemoryDump(SettingsActivity.this);
+ return true;
+ }
+ });
}
private void initDbLocationPreference() {
- Preference p = getPreference(R.string.pref_dbonsdcard);
+ final Preference p = getPreference(R.string.pref_dbonsdcard);
p.setPersistent(false);
p.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
@@ -396,11 +386,13 @@ public class SettingsActivity extends PreferenceActivity {
}
private void initDebugPreference() {
- Preference p = getPreference(R.string.pref_debug);
+ final Preference p = getPreference(R.string.pref_debug);
p.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(final Preference preference, final Object newValue) {
- Log.setDebug((Boolean) newValue);
+ final boolean isDebug = (Boolean) newValue;
+ Log.setDebug(isDebug);
+ CgeoApplication.dumpOnOutOfMemory(isDebug);
return true;
}
});
@@ -434,7 +426,7 @@ public class SettingsActivity extends PreferenceActivity {
return;
}
final PreferenceScreen screen = (PreferenceScreen) preference;
- ListAdapter adapter = screen.getRootAdapter();
+ final ListAdapter adapter = screen.getRootAdapter();
if (adapter instanceof BaseAdapter) {
((BaseAdapter) adapter).notifyDataSetChanged();
}
@@ -444,13 +436,14 @@ public class SettingsActivity extends PreferenceActivity {
Settings.putString(R.string.pref_webDeviceName, Settings.getWebDeviceName());
}
- public void setAuthTitle(int prefKeyId) {
+ public void setAuthTitle(final int prefKeyId) {
switch (prefKeyId) {
case R.string.pref_fakekey_ocde_authorization:
case R.string.pref_fakekey_ocpl_authorization:
case R.string.pref_fakekey_ocnl_authorization:
case R.string.pref_fakekey_ocus_authorization:
case R.string.pref_fakekey_ocro_authorization:
+ case R.string.pref_fakekey_ocuk_authorization:
setOCAuthTitle(OCPreferenceKeys.getByAuthId(prefKeyId));
break;
case R.string.pref_fakekey_twitter_authorization:
@@ -490,7 +483,7 @@ public class SettingsActivity extends PreferenceActivity {
return;
}
- for (DirChooserType dct : DirChooserType.values()) {
+ for (final DirChooserType dct : DirChooserType.values()) {
if (requestCode == dct.requestCode) {
setChosenDirectory(dct, data);
return;
@@ -501,7 +494,7 @@ public class SettingsActivity extends PreferenceActivity {
case R.string.pref_mapDirectory:
if (data.hasExtra(Intents.EXTRA_MAP_FILE)) {
final String mapFile = data.getStringExtra(Intents.EXTRA_MAP_FILE);
- File file = new File(mapFile);
+ final File file = new File(mapFile);
if (!file.isDirectory()) {
Settings.setMapFile(mapFile);
if (!Settings.isValidMapFile(Settings.getMapFile())) {
@@ -509,8 +502,8 @@ public class SettingsActivity extends PreferenceActivity {
} else {
// Ensure map source preference is updated accordingly.
// TODO: There should be a better way to find and select the map source for a map file
- Integer mapSourceId = mapFile.hashCode();
- ListPreference mapSource = (ListPreference) getPreference(R.string.pref_mapsource);
+ final Integer mapSourceId = mapFile.hashCode();
+ final ListPreference mapSource = (ListPreference) getPreference(R.string.pref_mapsource);
mapSource.setValue(mapSourceId.toString());
VALUE_CHANGE_LISTENER.onPreferenceChange(mapSource, mapSourceId);
}
@@ -526,7 +519,8 @@ public class SettingsActivity extends PreferenceActivity {
case R.string.pref_fakekey_ocnl_authorization:
case R.string.pref_fakekey_ocus_authorization:
case R.string.pref_fakekey_ocro_authorization:
- OCPreferenceKeys key = OCPreferenceKeys.getByAuthId(requestCode);
+ case R.string.pref_fakekey_ocuk_authorization:
+ final OCPreferenceKeys key = OCPreferenceKeys.getByAuthId(requestCode);
if (key != null) {
setOCAuthTitle(key);
redrawScreen(key.prefScreenId);
@@ -546,9 +540,13 @@ public class SettingsActivity extends PreferenceActivity {
* to reflect its new value.
*/
private static final Preference.OnPreferenceChangeListener VALUE_CHANGE_LISTENER = new Preference.OnPreferenceChangeListener() {
+
+ private PreferenceManager preferenceManager;
+
@Override
public boolean onPreferenceChange(final Preference preference, final Object value) {
- String stringValue = value.toString();
+ preferenceManager = preference.getPreferenceManager();
+ final String stringValue = value.toString();
if (isPreference(preference, R.string.pref_mapsource)) {
// reset the cached map source
@@ -578,14 +576,15 @@ public class SettingsActivity extends PreferenceActivity {
|| isPreference(preference, R.string.pref_connectorOCNLActive)
|| isPreference(preference, R.string.pref_connectorOCUSActive)
|| isPreference(preference, R.string.pref_connectorOCROActive)
+ || isPreference(preference, R.string.pref_connectorOCUKActive)
|| isPreference(preference, R.string.pref_connectorGCActive)
|| isPreference(preference, R.string.pref_connectorOXActive)
|| isPreference(preference, R.string.pref_connectorECActive)) {
// update summary
- boolean boolVal = ((Boolean) value).booleanValue();
- String summary = getServiceSummary(boolVal);
+ final boolean boolVal = (Boolean) value;
+ final String summary = getServiceSummary(boolVal);
if (OCPreferenceKeys.isOCPreference(preference.getKey())) {
- OCPreferenceKeys prefKey = OCPreferenceKeys.getByKey(preference.getKey());
+ final OCPreferenceKeys prefKey = OCPreferenceKeys.getByKey(preference.getKey());
preference.getPreferenceManager().findPreference(getKey(prefKey.prefScreenId)).setSummary(summary);
} else if (isPreference(preference, R.string.pref_connectorGCActive)) {
preference.getPreferenceManager().findPreference(getKey(R.string.preference_screen_gc)).setSummary(summary);
@@ -600,8 +599,8 @@ public class SettingsActivity extends PreferenceActivity {
} else if (preference instanceof ListPreference) {
// For list preferences, look up the correct display value in
// the preference's 'entries' list.
- ListPreference listPreference = (ListPreference) preference;
- int index = listPreference.findIndexOfValue(stringValue);
+ final ListPreference listPreference = (ListPreference) preference;
+ final int index = listPreference.findIndexOfValue(stringValue);
// Set the summary to reflect the new value.
preference.setSummary(
@@ -617,6 +616,9 @@ public class SettingsActivity extends PreferenceActivity {
text = preference.getContext().getString(R.string.init_backup_last_no);
}
preference.setSummary(text);
+ } else if (isPreference(preference, R.string.pref_ratingwanted)) {
+ findPreference(R.string.preference_screen_gcvote).setSummary(getServiceSummary((Boolean) value));
+ redrawScreen(findPreference(R.string.preference_screen_services));
} else {
// For all other preferences, set the summary to the value's
// simple string representation.
@@ -625,13 +627,15 @@ public class SettingsActivity extends PreferenceActivity {
// TODO: do not special case geocaching.com here
if ((isPreference(preference, R.string.pref_username) && !stringValue.equals(Settings.getUsername())) || (isPreference(preference, R.string.pref_password) && !stringValue.equals(Settings.getGcCredentials().getRight()))) {
// reset log-in if gc user or password is changed
- if (GCLogin.getInstance().isActualLoginStatus()) {
- GCLogin.getInstance().logout();
- }
CgeoApplication.getInstance().forceRelog();
}
return true;
}
+
+ private Preference findPreference(final int preferenceKeyResourceId) {
+ return preferenceManager.findPreference(getKey(preferenceKeyResourceId));
+ }
+
};
/**
@@ -662,12 +666,12 @@ public class SettingsActivity extends PreferenceActivity {
*/
private void bindSummaryToStringValue(final int key) {
- Preference pref = getPreference(key);
+ final Preference pref = getPreference(key);
if (pref == null) {
return;
}
- String value = PreferenceManager
+ final String value = PreferenceManager
.getDefaultSharedPreferences(pref.getContext())
.getString(pref.getKey(), "");
@@ -686,7 +690,7 @@ public class SettingsActivity extends PreferenceActivity {
@SuppressWarnings("deprecation")
@Override
- public void setPreferenceScreen(PreferenceScreen preferenceScreen) {
+ public void setPreferenceScreen(final PreferenceScreen preferenceScreen) {
// TODO replace with fragment based code
super.setPreferenceScreen(preferenceScreen);
}
@@ -698,7 +702,7 @@ public class SettingsActivity extends PreferenceActivity {
return super.getPreferenceManager();
}
- private static boolean isPreference(final Preference preference, int preferenceKeyId) {
+ private static boolean isPreference(final Preference preference, final int preferenceKeyId) {
return getKey(preferenceKeyId).equals(preference.getKey());
}
}
diff --git a/main/src/cgeo/geocaching/settings/TemplateTextPreference.java b/main/src/cgeo/geocaching/settings/TemplateTextPreference.java
index 667b02b..a33f09d 100644
--- a/main/src/cgeo/geocaching/settings/TemplateTextPreference.java
+++ b/main/src/cgeo/geocaching/settings/TemplateTextPreference.java
@@ -1,5 +1,7 @@
package cgeo.geocaching.settings;
+import butterknife.ButterKnife;
+
import cgeo.geocaching.R;
import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.ui.dialog.Dialogs;
@@ -30,12 +32,12 @@ public class TemplateTextPreference extends DialogPreference {
private EditText editText;
private String initialValue;
- public TemplateTextPreference(Context context, AttributeSet attrs) {
+ public TemplateTextPreference(final Context context, final AttributeSet attrs) {
super(context, attrs);
init();
}
- public TemplateTextPreference(Context context, AttributeSet attrs, int defStyle) {
+ public TemplateTextPreference(final Context context, final AttributeSet attrs, final int defStyle) {
super(context, attrs, defStyle);
init();
}
@@ -45,28 +47,28 @@ public class TemplateTextPreference extends DialogPreference {
}
@Override
- protected void onBindDialogView(View view) {
+ protected void onBindDialogView(final View view) {
settingsActivity = (SettingsActivity) this.getContext();
- editText = (EditText) view.findViewById(R.id.signature_dialog_text);
+ editText = ButterKnife.findById(view, R.id.signature_dialog_text);
editText.setText(getPersistedString(initialValue != null ? initialValue : StringUtils.EMPTY));
Dialogs.moveCursorToEnd(editText);
- Button button = (Button) view.findViewById(R.id.signature_templates);
+ final Button button = ButterKnife.findById(view, R.id.signature_templates);
button.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View button) {
- AlertDialog.Builder alert = new AlertDialog.Builder(TemplateTextPreference.this.getContext());
+ public void onClick(final View button) {
+ final AlertDialog.Builder alert = new AlertDialog.Builder(TemplateTextPreference.this.getContext());
alert.setTitle(R.string.init_signature_template_button);
- final ArrayList<LogTemplate> templates = LogTemplateProvider.getTemplates();
- String[] items = new String[templates.size()];
+ final ArrayList<LogTemplate> templates = LogTemplateProvider.getTemplatesWithoutSignature();
+ final String[] items = new String[templates.size()];
for (int i = 0; i < templates.size(); i++) {
items[i] = settingsActivity.getResources().getString(templates.get(i).getResourceId());
}
alert.setItems(items, new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int position) {
+ public void onClick(final DialogInterface dialog, final int position) {
dialog.dismiss();
final LogTemplate template = templates.get(position);
insertSignatureTemplate(template);
@@ -80,14 +82,14 @@ public class TemplateTextPreference extends DialogPreference {
}
private void insertSignatureTemplate(final LogTemplate template) {
- String insertText = "[" + template.getTemplateString() + "]";
+ final String insertText = "[" + template.getTemplateString() + "]";
ActivityMixin.insertAtPosition(editText, insertText, true);
}
@Override
- protected void onDialogClosed(boolean positiveResult) {
+ protected void onDialogClosed(final boolean positiveResult) {
if (positiveResult) {
- String text = editText.getText().toString();
+ final String text = editText.getText().toString();
persistString(text);
callChangeListener(text);
}
@@ -95,7 +97,7 @@ public class TemplateTextPreference extends DialogPreference {
}
@Override
- protected void onSetInitialValue(boolean restorePersistedValue, Object defaultValue) {
+ protected void onSetInitialValue(final boolean restorePersistedValue, final Object defaultValue) {
if (restorePersistedValue) {
// Restore existing state
initialValue = this.getPersistedString(DEFAULT_VALUE);
@@ -107,7 +109,7 @@ public class TemplateTextPreference extends DialogPreference {
}
@Override
- protected Object onGetDefaultValue(TypedArray array, int index) {
+ protected Object onGetDefaultValue(final TypedArray array, final int index) {
return array.getString(index);
}
}
diff --git a/main/src/cgeo/geocaching/settings/TextPreference.java b/main/src/cgeo/geocaching/settings/TextPreference.java
index eecf4cc..b3de59a 100644
--- a/main/src/cgeo/geocaching/settings/TextPreference.java
+++ b/main/src/cgeo/geocaching/settings/TextPreference.java
@@ -1,5 +1,7 @@
package cgeo.geocaching.settings;
+import butterknife.ButterKnife;
+
import cgeo.geocaching.R;
import android.content.Context;
@@ -29,15 +31,15 @@ public class TextPreference extends AbstractAttributeBasedPrefence {
private TextView summaryView;
private CharSequence summaryText;
- public TextPreference(Context context) {
+ public TextPreference(final Context context) {
super(context);
}
- public TextPreference(Context context, AttributeSet attrs) {
+ public TextPreference(final Context context, final AttributeSet attrs) {
super(context, attrs);
}
- public TextPreference(Context context, AttributeSet attrs, int defStyle) {
+ public TextPreference(final Context context, final AttributeSet attrs, final int defStyle) {
super(context, attrs, defStyle);
}
@@ -47,27 +49,27 @@ public class TextPreference extends AbstractAttributeBasedPrefence {
}
@Override
- protected void processAttributeValues(TypedArray values) {
+ protected void processAttributeValues(final TypedArray values) {
this.text = values.getString(0);
}
@Override
- protected View onCreateView(ViewGroup parent) {
+ protected View onCreateView(final ViewGroup parent) {
this.setSelectable(false);
- View v = super.onCreateView(parent);
+ final View v = super.onCreateView(parent);
- TextView text = (TextView) v.findViewById(R.id.textPreferenceText);
+ final TextView text = ButterKnife.findById(v, R.id.textPreferenceText);
text.setText(this.text);
- summaryView = (TextView) v.findViewById(R.id.textPreferenceSummary);
+ summaryView = ButterKnife.findById(v, R.id.textPreferenceSummary);
setSummary(null); // show saved summary text
return v;
}
@Override
- public void setSummary(CharSequence summaryText) {
+ public void setSummary(final CharSequence summaryText) {
// the layout hasn't been inflated yet, save the summaryText for later use
if (summaryView == null) {
this.summaryText = summaryText;
diff --git a/main/src/cgeo/geocaching/settings/WpThresholdPreference.java b/main/src/cgeo/geocaching/settings/WpThresholdPreference.java
index 4c43acf..37edafa 100644
--- a/main/src/cgeo/geocaching/settings/WpThresholdPreference.java
+++ b/main/src/cgeo/geocaching/settings/WpThresholdPreference.java
@@ -1,5 +1,7 @@
package cgeo.geocaching.settings;
+import butterknife.ButterKnife;
+
import cgeo.geocaching.R;
import android.content.Context;
@@ -15,17 +17,17 @@ public class WpThresholdPreference extends Preference {
private TextView valueView;
- public WpThresholdPreference(Context context) {
+ public WpThresholdPreference(final Context context) {
super(context);
init();
}
- public WpThresholdPreference(Context context, AttributeSet attrs) {
+ public WpThresholdPreference(final Context context, final AttributeSet attrs) {
super(context, attrs);
init();
}
- public WpThresholdPreference(Context context, AttributeSet attrs, int defStyle) {
+ public WpThresholdPreference(final Context context, final AttributeSet attrs, final int defStyle) {
super(context, attrs, defStyle);
init();
}
@@ -35,33 +37,33 @@ public class WpThresholdPreference extends Preference {
}
@Override
- protected View onCreateView(ViewGroup parent) {
- View v = super.onCreateView(parent);
+ protected View onCreateView(final ViewGroup parent) {
+ final View v = super.onCreateView(parent);
// get views
- SeekBar seekBar = (SeekBar) v.findViewById(R.id.wp_threshold_seekbar);
- valueView = (TextView) v.findViewById(R.id.wp_threshold_value_view);
+ final SeekBar seekBar = ButterKnife.findById(v, R.id.wp_threshold_seekbar);
+ valueView = ButterKnife.findById(v, R.id.wp_threshold_value_view);
// init seekbar
seekBar.setMax(Settings.SHOW_WP_THRESHOLD_MAX);
// set initial value
- int threshold = Settings.getWayPointsThreshold();
+ final int threshold = Settings.getWayPointsThreshold();
valueView.setText(String.valueOf(threshold));
seekBar.setProgress(threshold);
seekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
@Override
- public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
+ public void onProgressChanged(final SeekBar seekBar, final int progress, final boolean fromUser) {
if (fromUser) {
valueView.setText(String.valueOf(progress));
}
}
@Override
- public void onStartTrackingTouch(SeekBar seekBar) {
+ public void onStartTrackingTouch(final SeekBar seekBar) {
}
@Override
- public void onStopTrackingTouch(SeekBar seekBar) {
+ public void onStopTrackingTouch(final SeekBar seekBar) {
Settings.setShowWaypointsThreshold(seekBar.getProgress());
}
});
diff --git a/main/src/cgeo/geocaching/sorting/ComparatorUserInterface.java b/main/src/cgeo/geocaching/sorting/ComparatorUserInterface.java
deleted file mode 100644
index 7f10353..0000000
--- a/main/src/cgeo/geocaching/sorting/ComparatorUserInterface.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package cgeo.geocaching.sorting;
-
-import cgeo.geocaching.R;
-import cgeo.geocaching.utils.Log;
-
-import rx.functions.Action1;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.content.DialogInterface;
-import android.content.res.Resources;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-
-public class ComparatorUserInterface {
- private final Activity activity;
- private final ArrayList<ComparatorEntry> registry;
- private final Resources res;
-
- private static final class ComparatorEntry {
- private final String name;
- private final Class<? extends CacheComparator> cacheComparator;
-
- public ComparatorEntry(final String name, final Class<? extends CacheComparator> cacheComparator) {
- this.name = name;
- this.cacheComparator = cacheComparator;
- }
-
- @Override
- public String toString() {
- return name;
- }
- }
-
- public ComparatorUserInterface(final Activity activity) {
- this.activity = activity;
- res = activity.getResources();
-
- registry = new ArrayList<ComparatorUserInterface.ComparatorEntry>(20);
-
- register(R.string.caches_sort_distance, null);
- register(R.string.caches_sort_date_hidden, DateComparator.class);
- register(R.string.caches_sort_difficulty, DifficultyComparator.class);
- register(R.string.caches_sort_finds, FindsComparator.class);
- register(R.string.caches_sort_geocode, GeocodeComparator.class);
- register(R.string.caches_sort_inventory, InventoryComparator.class);
- register(R.string.caches_sort_name, NameComparator.class);
- register(R.string.caches_sort_favorites, PopularityComparator.class);
- register(R.string.caches_sort_favorites_ratio, PopularityRatioComparator.class);
- register(R.string.caches_sort_rating, RatingComparator.class);
- register(R.string.caches_sort_size, SizeComparator.class);
- register(R.string.caches_sort_state, StateComparator.class);
- register(R.string.caches_sort_storage, StorageTimeComparator.class);
- register(R.string.caches_sort_terrain, TerrainComparator.class);
- register(R.string.caches_sort_date_logged, VisitComparator.class);
- register(R.string.caches_sort_vote, VoteComparator.class);
-
- // sort the menu labels alphabetically for easier reading
- Collections.sort(registry, new Comparator<ComparatorEntry>() {
-
- @Override
- public int compare(ComparatorEntry lhs, ComparatorEntry rhs) {
- return lhs.name.compareToIgnoreCase(rhs.name);
- }
- });
- }
-
- private void register(final int resourceId, Class<? extends CacheComparator> comparatorClass) {
- registry.add(new ComparatorEntry(res.getString(resourceId), comparatorClass));
- }
-
- public void selectComparator(final CacheComparator current, final Action1<CacheComparator> runAfterwards) {
- final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
- builder.setTitle(R.string.caches_sort_title);
-
- // adapter doesn't work correctly here, therefore using the string array based method
- final String[] items = new String[registry.size()];
- for (int i = 0; i < items.length; i++) {
- items[i] = registry.get(i).name;
- }
- builder.setSingleChoiceItems(items, getCurrentIndex(current), new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int itemIndex) {
- ComparatorEntry entry = registry.get(itemIndex);
- try {
- if (entry.cacheComparator == null) {
- runAfterwards.call(null);
- }
- else {
- CacheComparator comparator = entry.cacheComparator.newInstance();
- runAfterwards.call(comparator);
- }
- } catch (InstantiationException e) {
- Log.e("selectComparator", e);
- } catch (IllegalAccessException e) {
- Log.e("selectComparator", e);
- }
- dialog.dismiss();
- }
- });
-
- builder.create().show();
- }
-
- private int getCurrentIndex(final CacheComparator current) {
- for (int index = 0; index < registry.size(); index++) {
- final ComparatorEntry entry = registry.get(index);
- if (current == null) {
- if (entry.cacheComparator == null) {
- return index;
- }
- }
- else if (current.getClass().equals(entry.cacheComparator)) {
- return index;
- }
- }
- return -1;
- }
-
-}
diff --git a/main/src/cgeo/geocaching/sorting/DateComparator.java b/main/src/cgeo/geocaching/sorting/DateComparator.java
index 9df70f9..7913941 100644
--- a/main/src/cgeo/geocaching/sorting/DateComparator.java
+++ b/main/src/cgeo/geocaching/sorting/DateComparator.java
@@ -19,7 +19,7 @@ public class DateComparator extends AbstractCacheComparator {
final int dateDifference = date1.compareTo(date2);
// for equal dates, sort by distance
if (dateDifference == 0) {
- final ArrayList<Geocache> list = new ArrayList<Geocache>();
+ final ArrayList<Geocache> list = new ArrayList<>();
list.add(cache1);
list.add(cache2);
final DistanceComparator distanceComparator = new DistanceComparator(CgeoApplication.getInstance().currentGeo().getCoords(), list);
diff --git a/main/src/cgeo/geocaching/sorting/PopularityRatioComparator.java b/main/src/cgeo/geocaching/sorting/PopularityRatioComparator.java
index 1ed8e68..57a69ee 100644
--- a/main/src/cgeo/geocaching/sorting/PopularityRatioComparator.java
+++ b/main/src/cgeo/geocaching/sorting/PopularityRatioComparator.java
@@ -12,16 +12,14 @@ public class PopularityRatioComparator extends AbstractCacheComparator {
@Override
protected int compareCaches(final Geocache cache1, final Geocache cache2) {
-
- float ratio1 = 0.0f;
- float ratio2 = 0.0f;
-
int finds1 = cache1.getFindsCount();
int finds2 = cache2.getFindsCount();
+ float ratio1 = 0.0f;
if (finds1 != 0) {
ratio1 = (((float) cache1.getFavoritePoints()) / ((float) finds1));
}
+ float ratio2 = 0.0f;
if (finds2 != 0) {
ratio2 = (((float) cache2.getFavoritePoints()) / ((float) finds2));
}
diff --git a/main/src/cgeo/geocaching/sorting/SortActionProvider.java b/main/src/cgeo/geocaching/sorting/SortActionProvider.java
new file mode 100644
index 0000000..e9e65a0
--- /dev/null
+++ b/main/src/cgeo/geocaching/sorting/SortActionProvider.java
@@ -0,0 +1,153 @@
+package cgeo.geocaching.sorting;
+
+import cgeo.geocaching.R;
+import cgeo.geocaching.utils.Log;
+
+import org.eclipse.jdt.annotation.NonNull;
+
+import rx.functions.Action1;
+
+import android.content.Context;
+import android.support.v4.view.ActionProvider;
+import android.view.MenuItem;
+import android.view.MenuItem.OnMenuItemClickListener;
+import android.view.SubMenu;
+import android.view.View;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+
+/**
+ * Provides a sub menu for sorting caches. Register your listener in the onCreateOptionsMenu of the containing activity.
+ *
+ */
+public class SortActionProvider extends ActionProvider implements OnMenuItemClickListener {
+
+ private static final int MENU_GROUP = 1;
+ private final Context mContext;
+ private final ArrayList<ComparatorEntry> registry = new ArrayList<>(20);
+ /**
+ * Callback triggered on selecting a new sort order.
+ */
+ private Action1<CacheComparator> onClickListener;
+ /**
+ * Currently selected filter. Used for radio button indication.
+ */
+ private CacheComparator selection;
+
+ private static final class ComparatorEntry {
+ private final String name;
+ private final Class<? extends CacheComparator> cacheComparator;
+
+ public ComparatorEntry(final String name, final Class<? extends CacheComparator> cacheComparator) {
+ this.name = name;
+ this.cacheComparator = cacheComparator;
+ }
+
+ @Override
+ public String toString() {
+ return name;
+ }
+ }
+
+ public SortActionProvider(final Context context) {
+ super(context);
+ mContext = context;
+ registerComparators();
+ }
+
+ private void register(final int resourceId, final Class<? extends CacheComparator> comparatorClass) {
+ registry.add(new ComparatorEntry(mContext.getString(resourceId), comparatorClass));
+ }
+
+ private void registerComparators() {
+ register(R.string.caches_sort_distance, null);
+ register(R.string.caches_sort_date_hidden, DateComparator.class);
+ register(R.string.caches_sort_difficulty, DifficultyComparator.class);
+ register(R.string.caches_sort_finds, FindsComparator.class);
+ register(R.string.caches_sort_geocode, GeocodeComparator.class);
+ register(R.string.caches_sort_inventory, InventoryComparator.class);
+ register(R.string.caches_sort_name, NameComparator.class);
+ register(R.string.caches_sort_favorites, PopularityComparator.class);
+ register(R.string.caches_sort_favorites_ratio, PopularityRatioComparator.class);
+ register(R.string.caches_sort_rating, RatingComparator.class);
+ register(R.string.caches_sort_size, SizeComparator.class);
+ register(R.string.caches_sort_state, StateComparator.class);
+ register(R.string.caches_sort_storage, StorageTimeComparator.class);
+ register(R.string.caches_sort_terrain, TerrainComparator.class);
+ register(R.string.caches_sort_date_logged, VisitComparator.class);
+ register(R.string.caches_sort_vote, VoteComparator.class);
+
+ // sort the menu labels alphabetically for easier reading
+ Collections.sort(registry, new Comparator<ComparatorEntry>() {
+
+ @Override
+ public int compare(final ComparatorEntry lhs, final ComparatorEntry rhs) {
+ return lhs.name.compareToIgnoreCase(rhs.name);
+ }
+ });
+ }
+
+ @Override
+ public View onCreateActionView(){
+ // must return null, otherwise onPrepareSubMenu is not called
+ return null;
+ }
+
+ @Override
+ public boolean hasSubMenu(){
+ return true;
+ }
+
+ @Override
+ public void onPrepareSubMenu(final SubMenu subMenu){
+ subMenu.clear();
+ for (int i = 0; i < registry.size(); i++) {
+ final ComparatorEntry comparatorEntry = registry.get(i);
+ final MenuItem menuItem = subMenu.add(MENU_GROUP, i, i, comparatorEntry.name);
+ menuItem.setOnMenuItemClickListener(this).setCheckable(true);
+ if (selection == null) {
+ if (comparatorEntry.cacheComparator == null) {
+ menuItem.setChecked(true);
+ }
+ }
+ else {
+ if (selection.getClass().equals(comparatorEntry.cacheComparator)) {
+ menuItem.setChecked(true);
+ }
+ }
+ }
+ subMenu.setGroupCheckable(MENU_GROUP, true, true);
+ }
+
+ @Override
+ public boolean onMenuItemClick(final MenuItem item){
+ callListener(registry.get(item.getItemId()).cacheComparator);
+ return true;
+ }
+
+ private void callListener(final Class<? extends CacheComparator> cacheComparator) {
+ try {
+ if (cacheComparator == null) {
+ onClickListener.call(null);
+ }
+ else {
+ final CacheComparator comparator = cacheComparator.newInstance();
+ onClickListener.call(comparator);
+ }
+ } catch (final InstantiationException e) {
+ Log.e("selectComparator", e);
+ } catch (final IllegalAccessException e) {
+ Log.e("selectComparator", e);
+ }
+ }
+
+ public void setClickListener(final @NonNull Action1<CacheComparator> onClickListener) {
+ this.onClickListener = onClickListener;
+ }
+
+ public void setSelection(final CacheComparator selection) {
+ this.selection = selection;
+ }
+} \ No newline at end of file
diff --git a/main/src/cgeo/geocaching/ui/AbstractCachingListViewPageViewCreator.java b/main/src/cgeo/geocaching/ui/AbstractCachingListViewPageViewCreator.java
index 799b695..06fa1fa 100644
--- a/main/src/cgeo/geocaching/ui/AbstractCachingListViewPageViewCreator.java
+++ b/main/src/cgeo/geocaching/ui/AbstractCachingListViewPageViewCreator.java
@@ -51,7 +51,6 @@ public abstract class AbstractCachingListViewPageViewCreator extends AbstractCac
int logViewPosition = state.getInt(STATE_POSITION);
int logViewPositionFromTop = state.getInt(STATE_POSITION_FROM_TOP);
view.setSelectionFromTop(logViewPosition, logViewPositionFromTop);
- return;
}
}
diff --git a/main/src/cgeo/geocaching/ui/AbstractCachingPageViewCreator.java b/main/src/cgeo/geocaching/ui/AbstractCachingPageViewCreator.java
index 0c67384..306c686 100644
--- a/main/src/cgeo/geocaching/ui/AbstractCachingPageViewCreator.java
+++ b/main/src/cgeo/geocaching/ui/AbstractCachingPageViewCreator.java
@@ -3,11 +3,13 @@ package cgeo.geocaching.ui;
import cgeo.geocaching.activity.AbstractViewPagerActivity.PageViewCreator;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import android.os.Bundle;
import android.view.View;
+import android.view.ViewGroup;
/**
* View creator which destroys the created view on every {@link #notifyDataSetChanged()}.
@@ -24,9 +26,9 @@ public abstract class AbstractCachingPageViewCreator<ViewClass extends View> imp
}
@Override
- public final View getView() {
+ public final View getView(final ViewGroup parentView) {
if (view == null) {
- view = getDispatchedView();
+ view = getDispatchedView(parentView);
}
return view;
@@ -34,7 +36,7 @@ public abstract class AbstractCachingPageViewCreator<ViewClass extends View> imp
@Override
@SuppressFBWarnings("USM_USELESS_ABSTRACT_METHOD")
- public abstract ViewClass getDispatchedView();
+ public abstract ViewClass getDispatchedView(final ViewGroup parentView);
/**
* Gets the state of the view but returns an empty state if not overridden
@@ -51,7 +53,6 @@ public abstract class AbstractCachingPageViewCreator<ViewClass extends View> imp
* Restores the state of the view but just returns if not overridden.
*/
@Override
- public void setViewState(@NonNull Bundle state) {
- return;
+ public void setViewState(@NonNull final Bundle state) {
}
}
diff --git a/main/src/cgeo/geocaching/ui/AbstractUserClickListener.java b/main/src/cgeo/geocaching/ui/AbstractUserClickListener.java
index 2a78f07..f26cb53 100644
--- a/main/src/cgeo/geocaching/ui/AbstractUserClickListener.java
+++ b/main/src/cgeo/geocaching/ui/AbstractUserClickListener.java
@@ -45,7 +45,7 @@ abstract class AbstractUserClickListener implements View.OnClickListener {
final AbstractActivity activity = (AbstractActivity) view.getContext();
final Resources res = activity.getResources();
- ArrayList<String> labels = new ArrayList<String>(userActions.size());
+ ArrayList<String> labels = new ArrayList<>(userActions.size());
for (UserAction action : userActions) {
labels.add(res.getString(action.displayResourceId));
}
diff --git a/main/src/cgeo/geocaching/ui/AddressListAdapter.java b/main/src/cgeo/geocaching/ui/AddressListAdapter.java
index 8134235..81b6c23 100644
--- a/main/src/cgeo/geocaching/ui/AddressListAdapter.java
+++ b/main/src/cgeo/geocaching/ui/AddressListAdapter.java
@@ -29,7 +29,7 @@ public class AddressListAdapter extends ArrayAdapter<Address> {
@InjectView(R.id.label) protected TextView label;
@InjectView(R.id.distance) protected TextView distance;
- public ViewHolder(View view) {
+ public ViewHolder(final View view) {
super(view);
}
}
@@ -49,7 +49,7 @@ public class AddressListAdapter extends ArrayAdapter<Address> {
// holder pattern implementation
final ViewHolder holder;
if (view == null) {
- view = inflater.inflate(R.layout.addresslist_item, null);
+ view = inflater.inflate(R.layout.addresslist_item, parent, false);
holder = new ViewHolder(view);
} else {
holder = (ViewHolder) view.getTag();
@@ -81,7 +81,7 @@ public class AddressListAdapter extends ArrayAdapter<Address> {
private static CharSequence getAddressText(final Address address) {
final int maxIndex = address.getMaxAddressLineIndex();
- final ArrayList<String> lines = new ArrayList<String>();
+ final ArrayList<String> lines = new ArrayList<>();
for (int i = 0; i <= maxIndex; i++) {
final String line = address.getAddressLine(i);
if (StringUtils.isNotBlank(line)) {
diff --git a/main/src/cgeo/geocaching/ui/CacheDetailsCreator.java b/main/src/cgeo/geocaching/ui/CacheDetailsCreator.java
index 5d8ebef..78e1dec 100644
--- a/main/src/cgeo/geocaching/ui/CacheDetailsCreator.java
+++ b/main/src/cgeo/geocaching/ui/CacheDetailsCreator.java
@@ -1,5 +1,7 @@
package cgeo.geocaching.ui;
+import butterknife.ButterKnife;
+
import cgeo.geocaching.CgeoApplication;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.R;
@@ -7,10 +9,12 @@ import cgeo.geocaching.Waypoint;
import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.Units;
+import cgeo.geocaching.utils.Formatter;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jdt.annotation.NonNull;
+import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.res.Resources;
import android.text.format.DateUtils;
@@ -26,6 +30,9 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
+// TODO The suppression of this lint finding is bad. But to fix it, someone needs to rework the layout of the cache
+// details also, not just only change the code here.
+@SuppressLint("InflateParams")
public final class CacheDetailsCreator {
private final Activity activity;
private final ViewGroup parentView;
@@ -45,10 +52,10 @@ public final class CacheDetailsCreator {
* @return the view containing the displayed string (i.e. the right side one from the pair of "label": "value")
*/
public TextView add(final int nameId, final CharSequence value) {
- final RelativeLayout layout = (RelativeLayout) activity.getLayoutInflater().inflate(R.layout.cache_information_item, null);
- final TextView nameView = (TextView) layout.findViewById(R.id.name);
+ final RelativeLayout layout = (RelativeLayout) activity.getLayoutInflater().inflate(R.layout.cache_information_item, null, false);
+ final TextView nameView = ButterKnife.findById(layout, R.id.name);
nameView.setText(res.getString(nameId));
- lastValueView = (TextView) layout.findViewById(R.id.value);
+ lastValueView = ButterKnife.findById(layout, R.id.value);
lastValueView.setText(value);
parentView.addView(layout);
return lastValueView;
@@ -63,10 +70,10 @@ public final class CacheDetailsCreator {
}
public RelativeLayout addStars(final int nameId, final float value, final int max) {
- final RelativeLayout layout = (RelativeLayout) activity.getLayoutInflater().inflate(R.layout.cache_information_item, null);
- final TextView nameView = (TextView) layout.findViewById(R.id.name);
- lastValueView = (TextView) layout.findViewById(R.id.value);
- final LinearLayout layoutStars = (LinearLayout) layout.findViewById(R.id.stars);
+ final RelativeLayout layout = (RelativeLayout) activity.getLayoutInflater().inflate(R.layout.cache_information_item, null, false);
+ final TextView nameView = ButterKnife.findById(layout, R.id.name);
+ lastValueView = ButterKnife.findById(layout, R.id.value);
+ final LinearLayout layoutStars = ButterKnife.findById(layout, R.id.stars);
nameView.setText(activity.getResources().getString(nameId));
lastValueView.setText(String.format("%.1f", value) + ' ' + activity.getResources().getString(R.string.cache_rating_of) + " " + String.format("%d", max));
@@ -81,7 +88,7 @@ public final class CacheDetailsCreator {
final LayoutInflater inflater = LayoutInflater.from(activity);
for (int i = 0; i < max; i++) {
- ImageView star = (ImageView) inflater.inflate(R.layout.star_image, null);
+ final ImageView star = (ImageView) inflater.inflate(R.layout.star_image, starsContainer, false);
if (value - i >= 0.75) {
star.setImageResource(R.drawable.star_on);
} else if (value - i >= 0.25) {
@@ -93,9 +100,9 @@ public final class CacheDetailsCreator {
}
}
- public void addCacheState(Geocache cache) {
+ public void addCacheState(final Geocache cache) {
if (cache.isLogOffline() || cache.isArchived() || cache.isDisabled() || cache.isPremiumMembersOnly() || cache.isFound()) {
- final List<String> states = new ArrayList<String>(5);
+ final List<String> states = new ArrayList<>(5);
if (cache.isLogOffline()) {
states.add(res.getString(R.string.cache_status_offline_log));
}
@@ -115,30 +122,30 @@ public final class CacheDetailsCreator {
}
}
- public void addRating(Geocache cache) {
+ public void addRating(final Geocache cache) {
if (cache.getRating() > 0) {
final RelativeLayout itemLayout = addStars(R.string.cache_rating, cache.getRating());
if (cache.getVotes() > 0) {
- final TextView itemAddition = (TextView) itemLayout.findViewById(R.id.addition);
+ final TextView itemAddition = ButterKnife.findById(itemLayout, R.id.addition);
itemAddition.setText("(" + cache.getVotes() + ")");
itemAddition.setVisibility(View.VISIBLE);
}
}
}
- public void addSize(Geocache cache) {
+ public void addSize(final Geocache cache) {
if (null != cache.getSize() && cache.showSize()) {
add(R.string.cache_size, cache.getSize().getL10n());
}
}
- public void addDifficulty(Geocache cache) {
+ public void addDifficulty(final Geocache cache) {
if (cache.getDifficulty() > 0) {
addStars(R.string.cache_difficulty, cache.getDifficulty());
}
}
- public void addTerrain(Geocache cache) {
+ public void addTerrain(final Geocache cache) {
if (cache.getTerrain() > 0) {
addStars(R.string.cache_terrain, cache.getTerrain(), ConnectorFactory.getConnector(cache).getMaxTerrain());
}
@@ -189,7 +196,7 @@ public final class CacheDetailsCreator {
add(R.string.cache_distance, text);
}
- public void addEventDate(@NonNull Geocache cache) {
+ public void addEventDate(@NonNull final Geocache cache) {
if (!cache.isEventCache()) {
return;
}
diff --git a/main/src/cgeo/geocaching/ui/CacheListAdapter.java b/main/src/cgeo/geocaching/ui/CacheListAdapter.java
index 0d90d9f..b879e54 100644
--- a/main/src/cgeo/geocaching/ui/CacheListAdapter.java
+++ b/main/src/cgeo/geocaching/ui/CacheListAdapter.java
@@ -19,6 +19,7 @@ import cgeo.geocaching.sorting.InverseComparator;
import cgeo.geocaching.sorting.VisitComparator;
import cgeo.geocaching.utils.AngleUtils;
import cgeo.geocaching.utils.DateUtils;
+import cgeo.geocaching.utils.Formatter;
import cgeo.geocaching.utils.Log;
import org.apache.commons.collections4.CollectionUtils;
@@ -26,6 +27,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.eclipse.jdt.annotation.NonNull;
+import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
@@ -45,6 +47,7 @@ import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.TextView;
+import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@@ -62,10 +65,10 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
private boolean selectMode = false;
private IFilter currentFilter = null;
private List<Geocache> originalList = null;
- private boolean isLiveList = Settings.isLiveList();
+ private final boolean isLiveList = Settings.isLiveList();
- final private Set<CompassMiniView> compasses = new LinkedHashSet<CompassMiniView>();
- final private Set<DistanceView> distances = new LinkedHashSet<DistanceView>();
+ final private Set<CompassMiniView> compasses = new LinkedHashSet<>();
+ final private Set<DistanceView> distances = new LinkedHashSet<>();
final private CacheListType cacheListType;
final private Resources res;
/** Resulting list of caches */
@@ -75,7 +78,7 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
private static final int SWIPE_MIN_DISTANCE = 60;
private static final int SWIPE_MAX_OFF_PATH = 100;
- private static final SparseArray<Drawable> gcIconDrawables = new SparseArray<Drawable>();
+ private static final SparseArray<Drawable> gcIconDrawables = new SparseArray<>();
/**
* time in milliseconds after which the list may be resorted due to position updates
*/
@@ -109,12 +112,12 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
@InjectView(R.id.direction) protected CompassMiniView direction;
@InjectView(R.id.dirimg) protected ImageView dirImg;
- public ViewHolder(View view) {
+ public ViewHolder(final View view) {
super(view);
}
}
- public CacheListAdapter(final Activity activity, final List<Geocache> list, CacheListType cacheListType) {
+ public CacheListAdapter(final Activity activity, final List<Geocache> list, final CacheListType cacheListType) {
super(activity, 0, list);
final IGeoData currentGeo = CgeoApplication.getInstance().currentGeo();
if (currentGeo != null) {
@@ -132,10 +135,10 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
gcIconDrawables.put(hashCode, activity.getResources().getDrawable(cacheType.markerId));
// icon with flag for user modified coordinates
hashCode = getIconHashCode(cacheType, true);
- Drawable[] layers = new Drawable[2];
+ final Drawable[] layers = new Drawable[2];
layers[0] = activity.getResources().getDrawable(cacheType.markerId);
layers[1] = modifiedCoordinatesMarker;
- LayerDrawable ld = new LayerDrawable(layers);
+ final LayerDrawable ld = new LayerDrawable(layers);
ld.setLayerInset(1,
layers[0].getIntrinsicWidth() - layers[1].getIntrinsicWidth(),
layers[0].getIntrinsicHeight() - layers[1].getIntrinsicHeight(),
@@ -183,7 +186,7 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
return cacheListType == CacheListType.HISTORY;
}
- public Geocache findCacheByGeocode(String geocode) {
+ public Geocache findCacheByGeocode(final String geocode) {
for (int i = 0; i < getCount(); i++) {
if (getItem(i).getGeocode().equalsIgnoreCase(geocode)) {
return getItem(i);
@@ -198,7 +201,7 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
public void reFilter() {
if (currentFilter != null) {
// Back up the list again
- originalList = new ArrayList<Geocache>(list);
+ originalList = new ArrayList<>(list);
currentFilter.filter(list);
}
@@ -210,7 +213,7 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
public void setFilter(final IFilter filter) {
// Backup current caches list if it isn't backed up yet
if (originalList == null) {
- originalList = new ArrayList<Geocache>(list);
+ originalList = new ArrayList<>(list);
}
// If there is already a filter in place, this is a request to change or clear the filter, so we have to
@@ -239,7 +242,7 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
public int getCheckedCount() {
int checked = 0;
- for (Geocache cache : list) {
+ for (final Geocache cache : list) {
if (cache.isStatusChecked()) {
checked++;
}
@@ -267,7 +270,7 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
}
public void invertSelection() {
- for (Geocache cache : list) {
+ for (final Geocache cache : list) {
cache.setStatusChecked(!cache.isStatusChecked());
}
notifyDataSetChanged();
@@ -317,7 +320,7 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
if (coords == null) {
return;
}
- final ArrayList<Geocache> oldList = new ArrayList<Geocache>(list);
+ final ArrayList<Geocache> oldList = new ArrayList<>(list);
Collections.sort(list, getPotentialInversion(new DistanceComparator(coords, list)));
// avoid an update if the list has not changed due to location update
@@ -368,7 +371,7 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
final ViewHolder holder;
if (v == null) {
- v = inflater.inflate(R.layout.cacheslist_item, null);
+ v = inflater.inflate(R.layout.cacheslist_item, parent, false);
holder = new ViewHolder(v);
} else {
@@ -377,7 +380,7 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
final boolean lightSkin = Settings.isLightSkin();
- final TouchListener touchListener = new TouchListener(cache);
+ final TouchListener touchListener = new TouchListener(cache, this);
v.setOnClickListener(touchListener);
v.setOnLongClickListener(touchListener);
v.setOnTouchListener(touchListener);
@@ -471,24 +474,13 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
} else {
favoriteBack = R.drawable.favorite_background_dark;
}
- final float myVote = cache.getMyVote();
- if (myVote > 0) { // use my own rating for display, if I have voted
- if (myVote >= 4) {
- favoriteBack = RATING_BACKGROUND[2];
- } else if (myVote >= 3) {
- favoriteBack = RATING_BACKGROUND[1];
- } else if (myVote > 0) {
- favoriteBack = RATING_BACKGROUND[0];
- }
- } else {
- final float rating = cache.getRating();
- if (rating >= 3.5) {
- favoriteBack = RATING_BACKGROUND[2];
- } else if (rating >= 2.1) {
- favoriteBack = RATING_BACKGROUND[1];
- } else if (rating > 0.0) {
- favoriteBack = RATING_BACKGROUND[0];
- }
+ final float rating = cache.getRating();
+ if (rating >= 3.5) {
+ favoriteBack = RATING_BACKGROUND[2];
+ } else if (rating >= 2.1) {
+ favoriteBack = RATING_BACKGROUND[1];
+ } else if (rating > 0.0) {
+ favoriteBack = RATING_BACKGROUND[0];
}
holder.favorite.setBackgroundResource(favoriteBack);
@@ -501,7 +493,7 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
return v;
}
- private static Drawable getCacheIcon(Geocache cache) {
+ private static Drawable getCacheIcon(final Geocache cache) {
int hashCode = getIconHashCode(cache.getType(), cache.hasUserModifiedCoords() || cache.hasFinalDefined());
final Drawable drawable = gcIconDrawables.get(hashCode);
if (drawable != null) {
@@ -524,36 +516,42 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
private final Geocache cache;
- public SelectionCheckBoxListener(Geocache cache) {
+ public SelectionCheckBoxListener(final Geocache cache) {
this.cache = cache;
}
@Override
- public void onClick(View view) {
+ public void onClick(final View view) {
assert view instanceof CheckBox;
final boolean checkNow = ((CheckBox) view).isChecked();
cache.setStatusChecked(checkNow);
}
}
- private class TouchListener implements View.OnClickListener, View.OnLongClickListener, View.OnTouchListener {
+ private static class TouchListener implements View.OnClickListener, View.OnLongClickListener, View.OnTouchListener {
private final Geocache cache;
private final GestureDetector gestureDetector;
+ private final @NonNull WeakReference<CacheListAdapter> adapterRef;
- public TouchListener(final Geocache cache) {
+ public TouchListener(final Geocache cache, final @NonNull CacheListAdapter adapter) {
this.cache = cache;
- gestureDetector = new GestureDetector(getContext(), new FlingGesture(cache));
+ gestureDetector = new GestureDetector(adapter.getContext(), new FlingGesture(cache, adapter));
+ adapterRef = new WeakReference<>(adapter);
}
// Tap on item
@Override
public void onClick(final View view) {
- if (isSelectMode()) {
+ final CacheListAdapter adapter = adapterRef.get();
+ if (adapter == null) {
+ return;
+ }
+ if (adapter.isSelectMode()) {
cache.setStatusChecked(!cache.isStatusChecked());
- notifyDataSetChanged();
+ adapter.notifyDataSetChanged();
} else {
- CacheDetailActivity.startActivity(getContext(), cache.getGeocode(), cache.getName());
+ CacheDetailActivity.startActivity(adapter.getContext(), cache.getGeocode(), cache.getName());
}
}
@@ -565,6 +563,7 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
}
// Swipe on item
+ @SuppressLint("ClickableViewAccessibility")
@Override
public boolean onTouch(final View view, final MotionEvent event) {
return gestureDetector.onTouchEvent(event);
@@ -572,25 +571,31 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
}
}
- private class FlingGesture extends GestureDetector.SimpleOnGestureListener {
+ private static class FlingGesture extends GestureDetector.SimpleOnGestureListener {
private final Geocache cache;
+ private final @NonNull WeakReference<CacheListAdapter> adapterRef;
- public FlingGesture(final Geocache cache) {
+ public FlingGesture(final Geocache cache, final @NonNull CacheListAdapter adapter) {
this.cache = cache;
+ adapterRef = new WeakReference<>(adapter);
}
@Override
- public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
+ public boolean onFling(final MotionEvent e1, final MotionEvent e2, final float velocityX, final float velocityY) {
try {
if (Math.abs(e1.getY() - e2.getY()) > SWIPE_MAX_OFF_PATH) {
return false;
}
+ final CacheListAdapter adapter = adapterRef.get();
+ if (adapter == null) {
+ return false;
+ }
// left to right swipe
if ((e2.getX() - e1.getX()) > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > Math.abs(velocityY)) {
- if (!selectMode) {
- switchSelectMode();
+ if (!adapter.selectMode) {
+ adapter.switchSelectMode();
cache.setStatusChecked(true);
}
return true;
@@ -598,12 +603,12 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
// right to left swipe
if ((e1.getX() - e2.getX()) > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > Math.abs(velocityY)) {
- if (selectMode) {
- switchSelectMode();
+ if (adapter.selectMode) {
+ adapter.switchSelectMode();
}
return true;
}
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.w("CacheListAdapter.FlingGesture.onFling", e);
}
@@ -616,8 +621,8 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
}
public List<Geocache> getCheckedCaches() {
- final ArrayList<Geocache> result = new ArrayList<Geocache>();
- for (Geocache cache : list) {
+ final ArrayList<Geocache> result = new ArrayList<>();
+ for (final Geocache cache : list) {
if (cache.isStatusChecked()) {
result.add(cache);
}
@@ -630,7 +635,7 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> {
if (!result.isEmpty()) {
return result;
}
- return new ArrayList<Geocache>(list);
+ return new ArrayList<>(list);
}
public int getCheckedOrAllCount() {
diff --git a/main/src/cgeo/geocaching/ui/CompassView.java b/main/src/cgeo/geocaching/ui/CompassView.java
index f7111f7..240afcf 100644
--- a/main/src/cgeo/geocaching/ui/CompassView.java
+++ b/main/src/cgeo/geocaching/ui/CompassView.java
@@ -3,10 +3,10 @@ package cgeo.geocaching.ui;
import cgeo.geocaching.R;
import cgeo.geocaching.utils.AngleUtils;
-import rx.Scheduler;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
-import rx.functions.Action1;
+import rx.functions.Action0;
+import rx.subscriptions.Subscriptions;
import android.content.Context;
import android.content.res.Resources;
@@ -18,6 +18,7 @@ import android.graphics.PaintFlagsDrawFilter;
import android.util.AttributeSet;
import android.view.View;
+import java.lang.ref.WeakReference;
import java.util.concurrent.TimeUnit;
public class CompassView extends View {
@@ -54,14 +55,43 @@ public class CompassView extends View {
private int compassOverlayWidth = 0;
private int compassOverlayHeight = 0;
private boolean initialDisplay;
- private Subscription periodicUpdate;
+ private Subscription periodicUpdate = Subscriptions.empty();
- public CompassView(Context contextIn) {
+ private static final class UpdateAction implements Action0 {
+
+ private final WeakReference<CompassView> compassViewRef;
+
+ private UpdateAction(final CompassView view) {
+ this.compassViewRef = new WeakReference<>(view);
+ }
+
+ @Override
+ public void call() {
+ final CompassView compassView = compassViewRef.get();
+ if (compassView == null) {
+ return;
+ }
+ compassView.updateGraphics();
+ }
+ }
+
+ public CompassView(final Context contextIn) {
super(contextIn);
context = contextIn;
}
- public CompassView(Context contextIn, AttributeSet attrs) {
+ public void updateGraphics() {
+ final float newAzimuthShown = smoothUpdate(northMeasured, azimuthShown);
+ final float newCacheHeadingShown = smoothUpdate(cacheHeadingMeasured, cacheHeadingShown);
+ if (Math.abs(AngleUtils.difference(azimuthShown, newAzimuthShown)) >= 2 ||
+ Math.abs(AngleUtils.difference(cacheHeadingShown, newCacheHeadingShown)) >= 2) {
+ azimuthShown = newAzimuthShown;
+ cacheHeadingShown = newCacheHeadingShown;
+ invalidate();
+ }
+ }
+
+ public CompassView(final Context contextIn, final AttributeSet attrs) {
super(contextIn, attrs);
context = contextIn;
}
@@ -88,24 +118,13 @@ public class CompassView extends View {
initialDisplay = true;
- periodicUpdate = AndroidSchedulers.mainThread().schedulePeriodically(new Action1<Scheduler.Inner>() {
- @Override
- public void call(final Scheduler.Inner inner) {
- final float newAzimuthShown = smoothUpdate(northMeasured, azimuthShown);
- final float newCacheHeadingShown = smoothUpdate(cacheHeadingMeasured, cacheHeadingShown);
- if (Math.abs(AngleUtils.difference(azimuthShown, newAzimuthShown)) >= 2 ||
- Math.abs(AngleUtils.difference(cacheHeadingShown, newCacheHeadingShown)) >= 2) {
- azimuthShown = newAzimuthShown;
- cacheHeadingShown = newCacheHeadingShown;
- invalidate();
- }
- }
- }, 0, 40, TimeUnit.MILLISECONDS);
+ periodicUpdate = AndroidSchedulers.mainThread().createWorker().schedulePeriodically(new UpdateAction(this), 0, 40, TimeUnit.MILLISECONDS);
}
@Override
public void onDetachedFromWindow() {
periodicUpdate.unsubscribe();
+
super.onDetachedFromWindow();
if (compassUnderlay != null) {
@@ -156,7 +175,7 @@ public class CompassView extends View {
* the actual value
* @return the new value
*/
- static protected float smoothUpdate(float goal, float actual) {
+ static protected float smoothUpdate(final float goal, final float actual) {
final double diff = AngleUtils.difference(actual, goal);
double offset = 0;
@@ -173,7 +192,7 @@ public class CompassView extends View {
}
@Override
- protected void onDraw(Canvas canvas) {
+ protected void onDraw(final Canvas canvas) {
final float azimuthTemp = azimuthShown;
final float azimuthRelative = AngleUtils.normalize(azimuthTemp - cacheHeadingShown);
@@ -218,11 +237,11 @@ public class CompassView extends View {
}
@Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ protected void onMeasure(final int widthMeasureSpec, final int heightMeasureSpec) {
setMeasuredDimension(measureWidth(widthMeasureSpec), measureHeight(heightMeasureSpec));
}
- private int measureWidth(int measureSpec) {
+ private int measureWidth(final int measureSpec) {
final int specMode = MeasureSpec.getMode(measureSpec);
final int specSize = MeasureSpec.getSize(measureSpec);
@@ -238,7 +257,7 @@ public class CompassView extends View {
return desired;
}
- private int measureHeight(int measureSpec) {
+ private int measureHeight(final int measureSpec) {
// The duplicated code in measureHeight and measureWidth cannot be avoided.
// Those methods must be efficient, therefore we cannot extract the code differences and unify the remainder.
final int specMode = MeasureSpec.getMode(measureSpec);
diff --git a/main/src/cgeo/geocaching/ui/EditNoteDialog.java b/main/src/cgeo/geocaching/ui/EditNoteDialog.java
index 63f06fc..013fdff 100644
--- a/main/src/cgeo/geocaching/ui/EditNoteDialog.java
+++ b/main/src/cgeo/geocaching/ui/EditNoteDialog.java
@@ -1,14 +1,20 @@
package cgeo.geocaching.ui;
+import butterknife.ButterKnife;
+
import cgeo.geocaching.R;
import cgeo.geocaching.activity.Keyboard;
+import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.ui.dialog.Dialogs;
import org.eclipse.jdt.annotation.NonNull;
import android.app.AlertDialog;
import android.app.Dialog;
+import android.content.Context;
import android.content.DialogInterface;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.FragmentActivity;
@@ -27,10 +33,10 @@ public class EditNoteDialog extends DialogFragment {
private EditText mEditText;
private EditNoteDialogListener listener;
- public static EditNoteDialog newInstance(final String initialNote, EditNoteDialogListener listener) {
- EditNoteDialog dialog = new EditNoteDialog();
+ public static EditNoteDialog newInstance(final String initialNote, final EditNoteDialogListener listener) {
+ final EditNoteDialog dialog = new EditNoteDialog();
- Bundle arguments = new Bundle();
+ final Bundle arguments = new Bundle();
arguments.putString(EditNoteDialog.ARGUMENT_INITIAL_NOTE, initialNote);
dialog.setArguments(arguments);
dialog.listener = listener;
@@ -39,24 +45,31 @@ public class EditNoteDialog extends DialogFragment {
}
@Override
- public Dialog onCreateDialog(Bundle savedInstanceState) {
+ public Dialog onCreateDialog(final Bundle savedInstanceState) {
final @NonNull FragmentActivity activity = getActivity();
- View view = View.inflate(new ContextThemeWrapper(activity, R.style.dark), R.layout.fragment_edit_note, null);
- mEditText = (EditText) view.findViewById(R.id.note);
- String initialNote = getArguments().getString(ARGUMENT_INITIAL_NOTE);
+
+ final Context themedContext;
+ if (Settings.isLightSkin() && VERSION.SDK_INT < VERSION_CODES.HONEYCOMB)
+ themedContext = new ContextThemeWrapper(activity, R.style.dark);
+ else
+ themedContext = activity;
+
+ final View view = View.inflate(themedContext, R.layout.fragment_edit_note, null);
+ mEditText = ButterKnife.findById(view, R.id.note);
+ final String initialNote = getArguments().getString(ARGUMENT_INITIAL_NOTE);
if (initialNote != null) {
mEditText.setText(initialNote);
Dialogs.moveCursorToEnd(mEditText);
getArguments().remove(ARGUMENT_INITIAL_NOTE);
}
- AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+ final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(R.string.cache_personal_note);
builder.setView(view);
builder.setPositiveButton(android.R.string.ok,
new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int whichButton) {
+ public void onClick(final DialogInterface dialog, final int whichButton) {
listener.onFinishEditNoteDialog(mEditText.getText().toString());
dialog.dismiss();
}
@@ -64,7 +77,7 @@ public class EditNoteDialog extends DialogFragment {
builder.setNegativeButton(android.R.string.cancel,
new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int whichButton) {
+ public void onClick(final DialogInterface dialog, final int whichButton) {
dialog.dismiss();
}
});
diff --git a/main/src/cgeo/geocaching/ui/FileSelectionListAdapter.java b/main/src/cgeo/geocaching/ui/FileSelectionListAdapter.java
index c325f50..e07bbc3 100644
--- a/main/src/cgeo/geocaching/ui/FileSelectionListAdapter.java
+++ b/main/src/cgeo/geocaching/ui/FileSelectionListAdapter.java
@@ -22,7 +22,7 @@ public class FileSelectionListAdapter extends ArrayAdapter<File> {
private final IFileSelectionView parentView;
private final LayoutInflater inflater;
- public FileSelectionListAdapter(IFileSelectionView parentIn, List<File> listIn) {
+ public FileSelectionListAdapter(final IFileSelectionView parentIn, final List<File> listIn) {
super(parentIn.getContext(), 0, listIn);
parentView = parentIn;
@@ -36,19 +36,19 @@ public class FileSelectionListAdapter extends ArrayAdapter<File> {
return null;
}
- File file = getItem(position);
+ final File file = getItem(position);
View v = rowView;
ViewHolder holder;
if (v == null) {
- v = inflater.inflate(R.layout.mapfile_item, null);
+ v = inflater.inflate(R.layout.mapfile_item, parent, false);
holder = new ViewHolder(v);
} else {
holder = (ViewHolder) v.getTag();
}
- String currentFile = parentView.getCurrentFile();
+ final String currentFile = parentView.getCurrentFile();
if (currentFile != null && file.equals(new File(currentFile))) {
holder.filename.setTypeface(holder.filename.getTypeface(), Typeface.BOLD);
} else {
@@ -67,13 +67,13 @@ public class FileSelectionListAdapter extends ArrayAdapter<File> {
private class TouchListener implements View.OnClickListener {
private File file = null;
- public TouchListener(File fileIn) {
+ public TouchListener(final File fileIn) {
file = fileIn;
}
// tap on item
@Override
- public void onClick(View view) {
+ public void onClick(final View view) {
parentView.setCurrentFile(file.toString());
parentView.close();
}
@@ -83,7 +83,7 @@ public class FileSelectionListAdapter extends ArrayAdapter<File> {
@InjectView(R.id.mapfilepath) protected TextView filepath;
@InjectView(R.id.mapfilename) protected TextView filename;
- public ViewHolder(View view) {
+ public ViewHolder(final View view) {
super(view);
}
}
diff --git a/main/src/cgeo/geocaching/ui/GPXListAdapter.java b/main/src/cgeo/geocaching/ui/GPXListAdapter.java
index ae18ab4..5db103b 100644
--- a/main/src/cgeo/geocaching/ui/GPXListAdapter.java
+++ b/main/src/cgeo/geocaching/ui/GPXListAdapter.java
@@ -28,12 +28,12 @@ public class GPXListAdapter extends ArrayAdapter<File> {
@InjectView(R.id.filepath) protected TextView filepath;
@InjectView(R.id.filename) protected TextView filename;
- public ViewHolder(View view) {
+ public ViewHolder(final View view) {
super(view);
}
}
- public GPXListAdapter(GpxFileListActivity parentIn, List<File> listIn) {
+ public GPXListAdapter(final GpxFileListActivity parentIn, final List<File> listIn) {
super(parentIn, 0, listIn);
activity = parentIn;
@@ -53,7 +53,7 @@ public class GPXListAdapter extends ArrayAdapter<File> {
final ViewHolder holder;
if (view == null) {
- view = inflater.inflate(R.layout.gpx_item, null);
+ view = inflater.inflate(R.layout.gpx_item, parent, false);
holder = new ViewHolder(view);
} else {
holder = (ViewHolder) view.getTag();
@@ -62,7 +62,7 @@ public class GPXListAdapter extends ArrayAdapter<File> {
view.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View v) {
+ public void onClick(final View v) {
(new GPXImporter(activity, activity.getListId(), null)).importGPX(file);
}
});
@@ -73,10 +73,10 @@ public class GPXListAdapter extends ArrayAdapter<File> {
view.setOnLongClickListener(new View.OnLongClickListener() {
@Override
- public boolean onLongClick(View v) {
+ public boolean onLongClick(final View v) {
Dialogs.confirmYesNo(activity, R.string.gpx_import_delete_title, activity.getString(R.string.gpx_import_delete_message, file.getName()), new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int id) {
+ public void onClick(final DialogInterface dialog, final int id) {
FileUtils.deleteIgnoringFailure(file);
GPXListAdapter.this.remove(file);
}
diff --git a/main/src/cgeo/geocaching/ui/HtmlImageCounter.java b/main/src/cgeo/geocaching/ui/HtmlImageCounter.java
deleted file mode 100644
index 24b70ea..0000000
--- a/main/src/cgeo/geocaching/ui/HtmlImageCounter.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package cgeo.geocaching.ui;
-
-import android.graphics.drawable.Drawable;
-import android.text.Html;
-
-public class HtmlImageCounter implements Html.ImageGetter {
-
- private int imageCount = 0;
-
- @Override
- public Drawable getDrawable(String url) {
- imageCount++;
- return null;
- }
-
- public int getImageCount() {
- return imageCount;
- }
-} \ No newline at end of file
diff --git a/main/src/cgeo/geocaching/ui/ImagesList.java b/main/src/cgeo/geocaching/ui/ImagesList.java
index 5727971..8bd4ac2 100644
--- a/main/src/cgeo/geocaching/ui/ImagesList.java
+++ b/main/src/cgeo/geocaching/ui/ImagesList.java
@@ -1,5 +1,7 @@
package cgeo.geocaching.ui;
+import butterknife.ButterKnife;
+
import cgeo.geocaching.Image;
import cgeo.geocaching.R;
import cgeo.geocaching.files.LocalStorage;
@@ -9,6 +11,7 @@ import cgeo.geocaching.utils.Log;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
+
import rx.Subscription;
import rx.android.observables.AndroidObservable;
import rx.functions.Action0;
@@ -65,11 +68,11 @@ public class ImagesList {
private LayoutInflater inflater = null;
private final Activity activity;
// We could use a Set here, but we will insert no duplicates, so there is no need to check for uniqueness.
- private final Collection<Bitmap> bitmaps = new LinkedList<Bitmap>();
+ private final Collection<Bitmap> bitmaps = new LinkedList<>();
/**
* map image view id to image
*/
- private final SparseArray<Image> images = new SparseArray<Image>();
+ private final SparseArray<Image> images = new SparseArray<>();
private final String geocode;
private LinearLayout imagesView;
@@ -97,26 +100,27 @@ public class ImagesList {
}
}));
- imagesView = (LinearLayout) parentView.findViewById(R.id.spoiler_list);
+ imagesView = ButterKnife.findById(parentView, R.id.spoiler_list);
final HtmlImage imgGetter = new HtmlImage(geocode, true, offline ? StoredList.STANDARD_LIST_ID : StoredList.TEMPORARY_LIST_ID, false);
for (final Image img : images) {
- final LinearLayout rowView = (LinearLayout) inflater.inflate(R.layout.cache_image_item, null);
+ final LinearLayout rowView = (LinearLayout) inflater.inflate(R.layout.cache_image_item, imagesView, false);
assert(rowView != null);
if (StringUtils.isNotBlank(img.getTitle())) {
- ((TextView) rowView.findViewById(R.id.title)).setText(Html.fromHtml(img.getTitle()));
+ final TextView titleView = ButterKnife.findById(rowView, R.id.title);
+ titleView.setText(Html.fromHtml(img.getTitle()));
rowView.findViewById(R.id.titleLayout).setVisibility(View.VISIBLE);
}
if (StringUtils.isNotBlank(img.getDescription())) {
- final TextView descView = (TextView) rowView.findViewById(R.id.description);
+ final TextView descView = ButterKnife.findById(rowView, R.id.description);
descView.setText(Html.fromHtml(img.getDescription()), TextView.BufferType.SPANNABLE);
descView.setVisibility(View.VISIBLE);
}
- final ImageView imageView = (ImageView) inflater.inflate(R.layout.image_item, null);
+ final ImageView imageView = (ImageView) inflater.inflate(R.layout.image_item, rowView, false);
assert(imageView != null);
subscriptions.add(AndroidObservable.bindActivity(activity, imgGetter.fetchDrawable(img.getUrl())).subscribe(new Action1<BitmapDrawable>() {
@Override
@@ -141,7 +145,7 @@ public class ImagesList {
imageView.setClickable(true);
imageView.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View arg0) {
+ public void onClick(final View arg0) {
viewImageInStandardApp(img, image);
}
});
@@ -169,7 +173,7 @@ public class ImagesList {
imagesView.removeAllViews();
}
- public void onCreateContextMenu(ContextMenu menu, View v) {
+ public void onCreateContextMenu(final ContextMenu menu, final View v) {
assert v instanceof ImageView;
activity.getMenuInflater().inflate(R.menu.images_list_context, menu);
final Resources res = activity.getResources();
@@ -179,7 +183,7 @@ public class ImagesList {
currentImage = images.get(view.getId());
}
- public boolean onContextItemSelected(MenuItem item) {
+ public boolean onContextItemSelected(final MenuItem item) {
switch (item.getItemId()) {
case R.id.image_open_file:
viewImageInStandardApp(currentImage, currentDrawable);
@@ -221,7 +225,7 @@ public class ImagesList {
intent.setDataAndType(Uri.fromFile(saveToTemporaryJPGFile(image)), "image/jpeg");
}
activity.startActivity(intent);
- } catch (Exception e) {
+ } catch (final Exception e) {
Log.e("ImagesList.viewImageInStandardApp", e);
}
}
diff --git a/main/src/cgeo/geocaching/ui/LoggingUI.java b/main/src/cgeo/geocaching/ui/LoggingUI.java
index d5c5fae..8454474 100644
--- a/main/src/cgeo/geocaching/ui/LoggingUI.java
+++ b/main/src/cgeo/geocaching/ui/LoggingUI.java
@@ -78,7 +78,7 @@ public class LoggingUI extends AbstractUIFactory {
final LogType currentLogType = currentLog == null ? null : currentLog.type;
final List<LogType> logTypes = cache.getPossibleLogTypes();
- final ArrayList<LogTypeEntry> list = new ArrayList<LogTypeEntry>();
+ final ArrayList<LogTypeEntry> list = new ArrayList<>();
for (LogType logType : logTypes) {
list.add(new LogTypeEntry(logType, null, logType == currentLogType));
}
@@ -90,7 +90,7 @@ public class LoggingUI extends AbstractUIFactory {
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(R.string.cache_menu_visit_offline);
- final ArrayAdapter<LogTypeEntry> adapter = new ArrayAdapter<LogTypeEntry>(activity, android.R.layout.select_dialog_item, list);
+ final ArrayAdapter<LogTypeEntry> adapter = new ArrayAdapter<>(activity, android.R.layout.select_dialog_item, list);
builder.setAdapter(adapter, new DialogInterface.OnClickListener() {
@Override
diff --git a/main/src/cgeo/geocaching/ui/WeakReferenceHandler.java b/main/src/cgeo/geocaching/ui/WeakReferenceHandler.java
index 4724466..d51e697 100644
--- a/main/src/cgeo/geocaching/ui/WeakReferenceHandler.java
+++ b/main/src/cgeo/geocaching/ui/WeakReferenceHandler.java
@@ -18,7 +18,7 @@ public abstract class WeakReferenceHandler<ActivityType extends Activity> extend
private final WeakReference<ActivityType> activityRef;
protected WeakReferenceHandler(final ActivityType activity) {
- this.activityRef = new WeakReference<ActivityType>(activity);
+ this.activityRef = new WeakReference<>(activity);
}
protected ActivityType getActivity() {
diff --git a/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java b/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java
index b2ce11a..ca3e3a4 100644
--- a/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java
+++ b/main/src/cgeo/geocaching/ui/dialog/CoordinatesInputDialog.java
@@ -1,22 +1,28 @@
package cgeo.geocaching.ui.dialog;
+import butterknife.ButterKnife;
+
import cgeo.geocaching.Geocache;
-import cgeo.geocaching.sensors.IGeoData;
import cgeo.geocaching.R;
import cgeo.geocaching.activity.AbstractActivity;
-import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.geopoint.GeopointFormatter;
+import cgeo.geocaching.sensors.IGeoData;
import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.settings.Settings.CoordInputFormatEnum;
import cgeo.geocaching.utils.EditUtils;
import org.apache.commons.lang3.StringUtils;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
import android.os.Bundle;
+import android.support.v4.app.DialogFragment;
import android.text.Editable;
import android.text.TextWatcher;
+import android.view.LayoutInflater;
import android.view.View;
+import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
@@ -25,12 +31,11 @@ import android.widget.EditText;
import android.widget.Spinner;
import android.widget.TextView;
-public class CoordinatesInputDialog extends NoTitleDialog {
+public class CoordinatesInputDialog extends DialogFragment {
- final private AbstractActivity context;
- final private IGeoData geo;
- final private Geocache cache;
private Geopoint gp;
+ private Geopoint gpinitial;
+ private Geopoint cacheCoords;
private EditText eLat, eLon;
private Button bLat, bLon;
@@ -39,34 +44,70 @@ public class CoordinatesInputDialog extends NoTitleDialog {
private TextView tLatSep1, tLatSep2, tLatSep3;
private TextView tLonSep1, tLonSep2, tLonSep3;
- private CoordinateUpdate cuListener;
-
private CoordInputFormatEnum currentFormat = null;
- public CoordinatesInputDialog(final AbstractActivity context, final Geocache cache, final Geopoint gp, final IGeoData geo) {
- super(context, ActivityMixin.getDialogTheme());
- this.context = context;
- this.geo = geo;
- this.cache = cache;
+
+ private static final String GEOPOINT_ARG = "GEOPOINT";
+ private static final String GEOPOINT_INTIAL_ARG = "GEOPOINT_INITIAL";
+ private static final String CACHECOORDS_ARG = "CACHECOORDS";
+
+
+ public static CoordinatesInputDialog getInstance(final Geocache cache, final Geopoint gp, final IGeoData geo) {
+
+ final Bundle args = new Bundle();
if (gp != null) {
- this.gp = gp;
+ args.putParcelable(GEOPOINT_ARG, gp);
} else if (geo != null && geo.getCoords() != null) {
- this.gp = geo.getCoords();
+ args.putParcelable(GEOPOINT_ARG, geo.getCoords());
} else {
- this.gp = Geopoint.ZERO;
+ args.putParcelable(GEOPOINT_ARG, Geopoint.ZERO);
}
+
+ if (geo !=null) {
+ args.putParcelable(GEOPOINT_INTIAL_ARG, geo.getCoords());
+ }
+
+ if (cache != null) {
+ args.putParcelable(CACHECOORDS_ARG, cache.getCoords());
+ }
+
+ final CoordinatesInputDialog cid = new CoordinatesInputDialog();
+ cid.setArguments(args);
+ return cid;
}
@Override
- public void onCreate(Bundle savedInstanceState) {
+ public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ gp = getArguments().getParcelable(GEOPOINT_ARG);
+ gpinitial = getArguments().getParcelable(GEOPOINT_INTIAL_ARG);
+ cacheCoords = getArguments().getParcelable(CACHECOORDS_ARG);
+
+ if (savedInstanceState != null && savedInstanceState.getParcelable(GEOPOINT_ARG)!=null) {
+ gp = savedInstanceState.getParcelable(GEOPOINT_ARG);
+ }
- setContentView(R.layout.coordinatesinput_dialog);
+ if (VERSION.SDK_INT < VERSION_CODES.HONEYCOMB && Settings.isLightSkin()) {
+ setStyle(STYLE_NORMAL, R.style.DialogFixGingerbread);
+ }
+ }
+
+ @Override
+ public void onSaveInstanceState(final Bundle outState) {
+ super.onSaveInstanceState(outState);
+ // TODO: if current input is not commited in gp, read the current input into gp
+ outState.putParcelable(GEOPOINT_ARG, gp);
+ }
+
+ @Override
+ public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {
+ getDialog().setTitle(R.string.cache_coordinates);
- final Spinner spinner = (Spinner) findViewById(R.id.spinnerCoordinateFormats);
+ final View v = inflater.inflate(R.layout.coordinatesinput_dialog, container, false);
+ final Spinner spinner = ButterKnife.findById(v, R.id.spinnerCoordinateFormats);
final ArrayAdapter<CharSequence> adapter =
- ArrayAdapter.createFromResource(context,
+ ArrayAdapter.createFromResource(getActivity(),
R.array.waypoint_coordinate_formats,
android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
@@ -74,25 +115,25 @@ public class CoordinatesInputDialog extends NoTitleDialog {
spinner.setSelection(Settings.getCoordInputFormat().ordinal());
spinner.setOnItemSelectedListener(new CoordinateFormatListener());
- bLat = (Button) findViewById(R.id.ButtonLat);
- eLat = (EditText) findViewById(R.id.latitude);
- eLatDeg = (EditText) findViewById(R.id.EditTextLatDeg);
- eLatMin = (EditText) findViewById(R.id.EditTextLatMin);
- eLatSec = (EditText) findViewById(R.id.EditTextLatSec);
- eLatSub = (EditText) findViewById(R.id.EditTextLatSecFrac);
- tLatSep1 = (TextView) findViewById(R.id.LatSeparator1);
- tLatSep2 = (TextView) findViewById(R.id.LatSeparator2);
- tLatSep3 = (TextView) findViewById(R.id.LatSeparator3);
-
- bLon = (Button) findViewById(R.id.ButtonLon);
- eLon = (EditText) findViewById(R.id.longitude);
- eLonDeg = (EditText) findViewById(R.id.EditTextLonDeg);
- eLonMin = (EditText) findViewById(R.id.EditTextLonMin);
- eLonSec = (EditText) findViewById(R.id.EditTextLonSec);
- eLonSub = (EditText) findViewById(R.id.EditTextLonSecFrac);
- tLonSep1 = (TextView) findViewById(R.id.LonSeparator1);
- tLonSep2 = (TextView) findViewById(R.id.LonSeparator2);
- tLonSep3 = (TextView) findViewById(R.id.LonSeparator3);
+ bLat = ButterKnife.findById(v, R.id.ButtonLat);
+ eLat = ButterKnife.findById(v, R.id.latitude);
+ eLatDeg = ButterKnife.findById(v, R.id.EditTextLatDeg);
+ eLatMin = ButterKnife.findById(v, R.id.EditTextLatMin);
+ eLatSec = ButterKnife.findById(v, R.id.EditTextLatSec);
+ eLatSub = ButterKnife.findById(v, R.id.EditTextLatSecFrac);
+ tLatSep1 = ButterKnife.findById(v, R.id.LatSeparator1);
+ tLatSep2 = ButterKnife.findById(v, R.id.LatSeparator2);
+ tLatSep3 = ButterKnife.findById(v, R.id.LatSeparator3);
+
+ bLon = ButterKnife.findById(v, R.id.ButtonLon);
+ eLon = ButterKnife.findById(v, R.id.longitude);
+ eLonDeg = ButterKnife.findById(v, R.id.EditTextLonDeg);
+ eLonMin = ButterKnife.findById(v, R.id.EditTextLonMin);
+ eLonSec = ButterKnife.findById(v, R.id.EditTextLonSec);
+ eLonSub = ButterKnife.findById(v, R.id.EditTextLonSecFrac);
+ tLonSep1 = ButterKnife.findById(v, R.id.LonSeparator1);
+ tLonSep2 = ButterKnife.findById(v, R.id.LonSeparator2);
+ tLonSep3 = ButterKnife.findById(v, R.id.LonSeparator3);
eLatDeg.addTextChangedListener(new TextChanged(eLatDeg));
eLatMin.addTextChangedListener(new TextChanged(eLatMin));
@@ -115,18 +156,24 @@ public class CoordinatesInputDialog extends NoTitleDialog {
bLat.setOnClickListener(new ButtonClickListener());
bLon.setOnClickListener(new ButtonClickListener());
- final Button buttonCurrent = (Button) findViewById(R.id.current);
+ final Button buttonCurrent = ButterKnife.findById(v, R.id.current);
buttonCurrent.setOnClickListener(new CurrentListener());
- final Button buttonCache = (Button) findViewById(R.id.cache);
- if (cache != null) {
+ final Button buttonCache = ButterKnife.findById(v, R.id.cache);
+
+ if (cacheCoords != null) {
buttonCache.setOnClickListener(new CacheListener());
} else {
buttonCache.setVisibility(View.GONE);
}
- final Button buttonDone = (Button) findViewById(R.id.done);
+
+ final Button buttonDone = ButterKnife.findById(v, R.id.done);
buttonDone.setOnClickListener(new InputDoneListener());
+
+ return v;
}
+
+
private void updateGUI() {
if (gp == null) {
return;
@@ -137,14 +184,14 @@ public class CoordinatesInputDialog extends NoTitleDialog {
switch (currentFormat) {
case Plain:
- findViewById(R.id.coordTable).setVisibility(View.GONE);
+ getView().findViewById(R.id.coordTable).setVisibility(View.GONE);
eLat.setVisibility(View.VISIBLE);
eLon.setVisibility(View.VISIBLE);
eLat.setText(gp.format(GeopointFormatter.Format.LAT_DECMINUTE));
eLon.setText(gp.format(GeopointFormatter.Format.LON_DECMINUTE));
break;
case Deg: // DDD.DDDDD°
- findViewById(R.id.coordTable).setVisibility(View.VISIBLE);
+ getView().findViewById(R.id.coordTable).setVisibility(View.VISIBLE);
eLat.setVisibility(View.GONE);
eLon.setVisibility(View.GONE);
eLatSec.setVisibility(View.GONE);
@@ -165,7 +212,7 @@ public class CoordinatesInputDialog extends NoTitleDialog {
eLonMin.setText(addZeros(gp.getLonDegFrac(), 5));
break;
case Min: // DDD° MM.MMM
- findViewById(R.id.coordTable).setVisibility(View.VISIBLE);
+ getView().findViewById(R.id.coordTable).setVisibility(View.VISIBLE);
eLat.setVisibility(View.GONE);
eLon.setVisibility(View.GONE);
eLatSec.setVisibility(View.VISIBLE);
@@ -190,7 +237,7 @@ public class CoordinatesInputDialog extends NoTitleDialog {
eLonSec.setText(addZeros(gp.getLonMinFrac(), 3));
break;
case Sec: // DDD° MM SS.SSS
- findViewById(R.id.coordTable).setVisibility(View.VISIBLE);
+ getView().findViewById(R.id.coordTable).setVisibility(View.VISIBLE);
eLat.setVisibility(View.GONE);
eLon.setVisibility(View.GONE);
eLatSec.setVisibility(View.VISIBLE);
@@ -226,7 +273,7 @@ public class CoordinatesInputDialog extends NoTitleDialog {
private class ButtonClickListener implements View.OnClickListener {
@Override
- public void onClick(View view) {
+ public void onClick(final View view) {
assert view instanceof Button;
final Button button = (Button) view;
final CharSequence text = button.getText();
@@ -259,12 +306,12 @@ public class CoordinatesInputDialog extends NoTitleDialog {
private final EditText editText;
- public TextChanged(EditText editText) {
+ public TextChanged(final EditText editText) {
this.editText = editText;
}
@Override
- public void afterTextChanged(Editable s) {
+ public void afterTextChanged(final Editable s) {
/*
* Max lengths, depending on currentFormat
*
@@ -318,11 +365,11 @@ public class CoordinatesInputDialog extends NoTitleDialog {
}
@Override
- public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+ public void beforeTextChanged(final CharSequence s, final int start, final int count, final int after) {
}
@Override
- public void onTextChanged(CharSequence s, int start, int before, int count) {
+ public void onTextChanged(final CharSequence s, final int start, final int before, final int count) {
}
}
@@ -371,7 +418,8 @@ public class CoordinatesInputDialog extends NoTitleDialog {
// Signaled and returned below
}
if (signalError) {
- context.showToast(context.getResources().getString(R.string.err_parse_lat_lon));
+ final AbstractActivity activity = (AbstractActivity) getActivity();
+ activity.showToast(activity.getResources().getString(R.string.err_parse_lat_lon));
}
return false;
}
@@ -392,15 +440,15 @@ public class CoordinatesInputDialog extends NoTitleDialog {
private class CoordinateFormatListener implements OnItemSelectedListener {
@Override
- public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
+ public void onItemSelected(final AdapterView<?> parent, final View view, final int pos, final long id) {
// Ignore first call, which comes from onCreate()
if (currentFormat != null) {
// Start new format with an acceptable value: either the current one
// entered by the user, else our current coordinates, else (0,0).
if (!areCurrentCoordinatesValid(false)) {
- if (geo != null && geo.getCoords() != null) {
- gp = geo.getCoords();
+ if (gpinitial != null) {
+ gp = gpinitial;
} else {
gp = Geopoint.ZERO;
}
@@ -413,7 +461,7 @@ public class CoordinatesInputDialog extends NoTitleDialog {
}
@Override
- public void onNothingSelected(AdapterView<?> arg0) {
+ public void onNothingSelected(final AdapterView<?> arg0) {
}
}
@@ -421,13 +469,14 @@ public class CoordinatesInputDialog extends NoTitleDialog {
private class CurrentListener implements View.OnClickListener {
@Override
- public void onClick(View v) {
- if (geo == null || geo.getCoords() == null) {
- context.showToast(context.getResources().getString(R.string.err_point_unknown_position));
+ public void onClick(final View v) {
+ if (gpinitial == null) {
+ final AbstractActivity activity = (AbstractActivity) getActivity();
+ activity.showToast(activity.getResources().getString(R.string.err_point_unknown_position));
return;
}
- gp = geo.getCoords();
+ gp = gpinitial;
updateGUI();
}
}
@@ -435,37 +484,35 @@ public class CoordinatesInputDialog extends NoTitleDialog {
private class CacheListener implements View.OnClickListener {
@Override
- public void onClick(View v) {
- if (cache == null || cache.getCoords() == null) {
- context.showToast(context.getResources().getString(R.string.err_location_unknown));
+ public void onClick(final View v) {
+ if (cacheCoords == null) {
+ final AbstractActivity activity = (AbstractActivity) getActivity();
+ activity.showToast(activity.getResources().getString(R.string.err_location_unknown));
return;
}
- gp = cache.getCoords();
+ gp = cacheCoords;
updateGUI();
}
}
+
private class InputDoneListener implements View.OnClickListener {
@Override
- public void onClick(View v) {
+ public void onClick(final View v) {
if (!areCurrentCoordinatesValid(true)) {
return;
}
if (gp != null) {
- cuListener.update(gp);
+ ((CoordinateUpdate) getActivity()).updateCoordinates(gp);
}
dismiss();
}
}
- public void setOnCoordinateUpdate(CoordinateUpdate cu) {
- cuListener = cu;
- }
-
public interface CoordinateUpdate {
- public void update(final Geopoint gp);
+ public void updateCoordinates(final Geopoint gp);
}
}
diff --git a/main/src/cgeo/geocaching/ui/dialog/CustomProgressDialog.java b/main/src/cgeo/geocaching/ui/dialog/CustomProgressDialog.java
index 97c5c29..db21f70 100644
--- a/main/src/cgeo/geocaching/ui/dialog/CustomProgressDialog.java
+++ b/main/src/cgeo/geocaching/ui/dialog/CustomProgressDialog.java
@@ -7,44 +7,29 @@ import android.app.ProgressDialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
-import android.widget.TextView;
import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
/**
- * Modified progress dialog class which allows hiding the absolute numbers
+ * Modified progress dialog class which allows hiding the absolute numbers.
*
*/
public class CustomProgressDialog extends ProgressDialog {
- public CustomProgressDialog(Context context) {
+ public CustomProgressDialog(final Context context) {
super(context, ActivityMixin.getDialogTheme());
}
@Override
- protected void onCreate(Bundle savedInstanceState) {
+ protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
-
try {
- Method method = TextView.class.getMethod("setVisibility", Integer.TYPE);
-
- Field[] fields = this.getClass().getSuperclass().getDeclaredFields();
-
- for (Field field : fields) {
- if (field.getName().equalsIgnoreCase("mProgressNumber")) {
- field.setAccessible(true);
- TextView textView = (TextView) field.get(this);
- method.invoke(textView, View.GONE);
- }
- }
- } catch (NoSuchMethodException e) {
- Log.e("Failed to invoke the progressDialog method 'setVisibility' and set 'mProgressNumber' to GONE.", e);
- } catch (IllegalAccessException e) {
- Log.e("Failed to invoke the progressDialog method 'setVisibility' and set 'mProgressNumber' to GONE.", e);
- } catch (InvocationTargetException e) {
- Log.e("Failed to invoke the progressDialog method 'setVisibility' and set 'mProgressNumber' to GONE.", e);
+ // Field is private, make it accessible through reflection before hiding it.
+ final Field field = getClass().getSuperclass().getDeclaredField("mProgressNumber");
+ field.setAccessible(true);
+ ((View) field.get(this)).setVisibility(View.GONE);
+ } catch (NoSuchFieldException | IllegalAccessException e) {
+ Log.e("Failed to find the progressDialog field 'mProgressNumber'", e);
}
}
} \ No newline at end of file
diff --git a/main/src/cgeo/geocaching/ui/dialog/DateDialog.java b/main/src/cgeo/geocaching/ui/dialog/DateDialog.java
index 18f8e2e..1046f81 100644
--- a/main/src/cgeo/geocaching/ui/dialog/DateDialog.java
+++ b/main/src/cgeo/geocaching/ui/dialog/DateDialog.java
@@ -1,49 +1,59 @@
package cgeo.geocaching.ui.dialog;
+import butterknife.ButterKnife;
+
import cgeo.geocaching.R;
-import android.app.Activity;
import android.os.Bundle;
+import android.support.v4.app.DialogFragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
import android.widget.DatePicker;
import java.util.Calendar;
-public class DateDialog extends NoTitleDialog {
+public class DateDialog extends DialogFragment {
public interface DateDialogParent {
abstract public void setDate(final Calendar date);
}
- private final DateDialogParent parent;
- private final Calendar date;
-
- public DateDialog(Activity contextIn, DateDialogParent parentIn, Calendar dateIn) {
- super(contextIn);
+ private Calendar date;
- // init
- this.date = dateIn;
- this.parent = parentIn;
+ public static DateDialog getInstance(final Calendar date) {
+ final DateDialog dd = new DateDialog();
+ final Bundle args = new Bundle();
+ args.putSerializable("date", date);
+ dd.setArguments(args);
+ return dd;
}
@Override
- public void onCreate(Bundle savedInstanceState) {
+ public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ setStyle(DialogFragment.STYLE_NO_TITLE, 0);
+ final Bundle args = getArguments();
+ date = (Calendar) args.getSerializable("date");
+ }
- setContentView(R.layout.date);
+ @Override
+ public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {
+ final View v = inflater.inflate(R.layout.date, container, false);
- final DatePicker picker = (DatePicker) findViewById(R.id.picker);
+ final DatePicker picker = ButterKnife.findById(v, R.id.picker);
picker.init(date.get(Calendar.YEAR), date.get(Calendar.MONTH), date.get(Calendar.DATE), new DatePickerListener());
+ return v;
}
private class DatePickerListener implements DatePicker.OnDateChangedListener {
@Override
- public void onDateChanged(DatePicker picker, int year, int month, int day) {
- if (parent != null) {
- date.set(year, month, day);
+ public void onDateChanged(final DatePicker picker, final int year, final int month, final int day) {
+ date.set(year, month, day);
+
+ ((DateDialogParent) getActivity()).setDate(date);
- parent.setDate(date);
- }
}
}
} \ No newline at end of file
diff --git a/main/src/cgeo/geocaching/ui/dialog/Dialogs.java b/main/src/cgeo/geocaching/ui/dialog/Dialogs.java
index cb8926a..21e1a82 100644
--- a/main/src/cgeo/geocaching/ui/dialog/Dialogs.java
+++ b/main/src/cgeo/geocaching/ui/dialog/Dialogs.java
@@ -2,10 +2,14 @@ package cgeo.geocaching.ui.dialog;
import cgeo.geocaching.CgeoApplication;
import cgeo.geocaching.R;
+import cgeo.geocaching.settings.Settings;
+import cgeo.geocaching.utils.ImageUtils;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jdt.annotation.Nullable;
+import rx.Observable;
+import rx.android.schedulers.AndroidSchedulers;
import rx.functions.Action1;
import android.app.Activity;
@@ -15,6 +19,8 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.graphics.drawable.Drawable;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
import android.text.Editable;
import android.text.InputType;
import android.text.TextWatcher;
@@ -24,7 +30,7 @@ import android.widget.EditText;
/**
* Wrapper for {@link AlertDialog}. If you want to show a simple text, use one of the
- * {@link #message(Activity, String, String, Drawable)} variants. If you want the user to confirm using Okay/Cancel or
+ * {@link #message(Activity, String, String)} variants. If you want the user to confirm using Okay/Cancel or
* Yes/No, select one of the {@link #confirm(Activity, String, String, String, OnClickListener)} or
* {@link #confirmYesNo(Activity, String, String, OnClickListener)} variants.
*
@@ -49,8 +55,8 @@ public final class Dialogs {
* listener of the positive button
*/
public static AlertDialog.Builder confirm(final Activity context, final String title, final String msg, final String positiveButton, final OnClickListener okayListener) {
- AlertDialog.Builder builder = new AlertDialog.Builder(context);
- AlertDialog dialog = builder.setTitle(title)
+ final AlertDialog.Builder builder = new AlertDialog.Builder(context);
+ final AlertDialog dialog = builder.setTitle(title)
.setCancelable(true)
.setMessage(msg)
.setPositiveButton(positiveButton, okayListener)
@@ -92,8 +98,8 @@ public final class Dialogs {
* listener of the positive button
*/
public static AlertDialog.Builder confirmYesNo(final Activity context, final String title, final String msg, final OnClickListener yesListener) {
- AlertDialog.Builder builder = new AlertDialog.Builder(context);
- AlertDialog dialog = builder.setTitle(title)
+ final AlertDialog.Builder builder = new AlertDialog.Builder(context);
+ final AlertDialog dialog = builder.setTitle(title)
.setCancelable(true)
.setMessage(msg)
.setPositiveButton(android.R.string.yes, yesListener)
@@ -200,7 +206,7 @@ public final class Dialogs {
return confirm(context, getString(title), getString(msg), okayListener);
}
- private static String getString(int resourceId) {
+ private static String getString(final int resourceId) {
return CgeoApplication.getInstance().getString(resourceId);
}
@@ -221,6 +227,18 @@ public final class Dialogs {
*
* @param context
* activity owning the dialog
+ * @param message
+ * message dialog content
+ */
+ public static void message(final Activity context, final int message) {
+ message(context, null, getString(message));
+ }
+
+ /**
+ * Show a message dialog with a single "OK" button.
+ *
+ * @param context
+ * activity owning the dialog
* @param title
* message dialog title
* @param message
@@ -231,7 +249,7 @@ public final class Dialogs {
}
/**
- * Show a message dialog with a single "OK" button and an icon.
+ * Show a message dialog with a single "OK" button and an eventual icon.
*
* @param context
* activity owning the dialog
@@ -239,21 +257,29 @@ public final class Dialogs {
* message dialog title
* @param message
* message dialog content
- * @param icon
- * message dialog title icon
+ * @param iconObservable
+ * observable (may be <tt>null</tt>) containing the icon(s) to set
*/
- public static void message(final Activity context, final @Nullable String title, final String message, final @Nullable Drawable icon) {
- Builder builder = new AlertDialog.Builder(context)
+ public static void message(final Activity context, final @Nullable String title, final String message, final @Nullable Observable<Drawable> iconObservable) {
+ final Builder builder = new AlertDialog.Builder(context)
.setMessage(message)
.setCancelable(true)
.setPositiveButton(getString(android.R.string.ok), null);
if (title != null) {
builder.setTitle(title);
}
- if (icon != null) {
- builder.setIcon(icon);
+ builder.setIcon(ImageUtils.getTransparent1x1Drawable(context.getResources()));
+
+ final AlertDialog dialog = builder.create();
+ if (iconObservable != null) {
+ iconObservable.observeOn(AndroidSchedulers.mainThread()).subscribe(new Action1<Drawable>() {
+ @Override
+ public void call(final Drawable drawable) {
+ dialog.setIcon(drawable);
+ }
+ });
}
- builder.create().show();
+ dialog.show();
}
/**
@@ -293,11 +319,11 @@ public final class Dialogs {
* message dialog title
* @param message
* message dialog content
- * @param icon
+ * @param iconObservable
* message dialog title icon
*/
- public static void message(final Activity context, final int title, final int message, final @Nullable Drawable icon) {
- message(context, getString(title), getString(message), icon);
+ public static void message(final Activity context, final int title, final int message, final Observable<Drawable> iconObservable) {
+ message(context, getString(title), getString(message), iconObservable);
}
/**
@@ -315,7 +341,14 @@ public final class Dialogs {
* listener to be run on okay
*/
public static void input(final Activity context, final int title, final String defaultValue, final int buttonTitle, final Action1<String> okayListener) {
- final Context themedContext = new ContextThemeWrapper(context, R.style.dark);
+ final Context themedContext;
+
+ if (Settings.isLightSkin() && VERSION.SDK_INT < VERSION_CODES.HONEYCOMB) {
+ themedContext = new ContextThemeWrapper(context, R.style.dark);
+ } else {
+ themedContext = context;
+ }
+
final EditText input = new EditText(themedContext);
input.setInputType(InputType.TYPE_TEXT_FLAG_CAP_SENTENCES | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS | InputType.TYPE_CLASS_TEXT);
input.setText(defaultValue);
@@ -326,13 +359,13 @@ public final class Dialogs {
builder.setPositiveButton(buttonTitle, new OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int which) {
+ public void onClick(final DialogInterface dialog, final int which) {
okayListener.call(input.getText().toString());
}
});
builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
@Override
- public void onClick(DialogInterface dialog, int whichButton) {
+ public void onClick(final DialogInterface dialog, final int whichButton) {
dialog.dismiss();
}
});
@@ -341,17 +374,17 @@ public final class Dialogs {
input.addTextChangedListener(new TextWatcher() {
@Override
- public void onTextChanged(CharSequence s, int start, int before, int count) {
+ public void onTextChanged(final CharSequence s, final int start, final int before, final int count) {
// empty
}
@Override
- public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+ public void beforeTextChanged(final CharSequence s, final int start, final int count, final int after) {
// empty
}
@Override
- public void afterTextChanged(Editable editable) {
+ public void afterTextChanged(final Editable editable) {
enableDialogButtonIfNotEmpty(dialog, editable.toString());
}
});
diff --git a/main/src/cgeo/geocaching/ui/dialog/LiveMapInfoDialogBuilder.java b/main/src/cgeo/geocaching/ui/dialog/LiveMapInfoDialogBuilder.java
index c29f549..9858c28 100644
--- a/main/src/cgeo/geocaching/ui/dialog/LiveMapInfoDialogBuilder.java
+++ b/main/src/cgeo/geocaching/ui/dialog/LiveMapInfoDialogBuilder.java
@@ -6,7 +6,10 @@ import cgeo.geocaching.settings.Settings;
import android.app.Activity;
import android.app.AlertDialog;
+import android.content.Context;
import android.content.DialogInterface;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
import android.view.ContextThemeWrapper;
import android.view.View;
@@ -15,8 +18,12 @@ public class LiveMapInfoDialogBuilder {
public static AlertDialog create(Activity activity) {
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
- // AlertDialog has always dark style, so we have to apply it as well always
- final View layout = View.inflate(new ContextThemeWrapper(activity, R.style.dark), R.layout.livemapinfo, null);
+ final Context themedContext;
+ if (Settings.isLightSkin() && VERSION.SDK_INT < VERSION_CODES.HONEYCOMB)
+ themedContext = new ContextThemeWrapper(activity, R.style.dark);
+ else
+ themedContext = activity;
+ final View layout = View.inflate(themedContext, R.layout.livemapinfo, null);
builder.setView(layout);
final int showCount = Settings.getLiveMapHintShowCount();
diff --git a/main/src/cgeo/geocaching/ui/dialog/NoTitleDialog.java b/main/src/cgeo/geocaching/ui/dialog/NoTitleDialog.java
deleted file mode 100644
index 8660a7b..0000000
--- a/main/src/cgeo/geocaching/ui/dialog/NoTitleDialog.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package cgeo.geocaching.ui.dialog;
-
-import cgeo.geocaching.utils.Log;
-
-import android.app.Dialog;
-import android.content.Context;
-import android.os.Bundle;
-import android.view.ViewGroup.LayoutParams;
-import android.view.Window;
-
-public abstract class NoTitleDialog extends Dialog {
-
- public NoTitleDialog(Context context) {
- super(context);
- }
-
- public NoTitleDialog(Context context, int theme) {
- super(context, theme);
- }
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- try {
- requestWindowFeature(Window.FEATURE_NO_TITLE);
- getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
- } catch (final Exception e) {
- Log.e("NoTitleDialog.onCreate", e);
- }
- }
-}
diff --git a/main/src/cgeo/geocaching/ui/logs/CacheLogsViewCreator.java b/main/src/cgeo/geocaching/ui/logs/CacheLogsViewCreator.java
index 6311476..38a219e 100644
--- a/main/src/cgeo/geocaching/ui/logs/CacheLogsViewCreator.java
+++ b/main/src/cgeo/geocaching/ui/logs/CacheLogsViewCreator.java
@@ -53,7 +53,7 @@ public class CacheLogsViewCreator extends LogsViewCreator {
// adds the log counts
final Map<LogType, Integer> logCounts = getCache().getLogCounts();
if (logCounts != null) {
- final List<Entry<LogType, Integer>> sortedLogCounts = new ArrayList<Entry<LogType, Integer>>(logCounts.size());
+ final List<Entry<LogType, Integer>> sortedLogCounts = new ArrayList<>(logCounts.size());
for (final Entry<LogType, Integer> entry : logCounts.entrySet()) {
// it may happen that the label is unknown -> then avoid any output for this type
if (entry.getKey() != LogType.PUBLISH_LISTING && entry.getKey().getL10n() != null) {
@@ -71,7 +71,7 @@ public class CacheLogsViewCreator extends LogsViewCreator {
}
});
- final ArrayList<String> labels = new ArrayList<String>(sortedLogCounts.size());
+ final ArrayList<String> labels = new ArrayList<>(sortedLogCounts.size());
for (final Entry<LogType, Integer> pair : sortedLogCounts) {
labels.add(pair.getValue() + "× " + pair.getKey().getL10n());
}
diff --git a/main/src/cgeo/geocaching/ui/logs/LogsViewCreator.java b/main/src/cgeo/geocaching/ui/logs/LogsViewCreator.java
index 6590d22..9532946 100644
--- a/main/src/cgeo/geocaching/ui/logs/LogsViewCreator.java
+++ b/main/src/cgeo/geocaching/ui/logs/LogsViewCreator.java
@@ -1,28 +1,24 @@
package cgeo.geocaching.ui.logs;
-import cgeo.geocaching.Image;
import cgeo.geocaching.ImagesActivity;
import cgeo.geocaching.LogEntry;
import cgeo.geocaching.R;
import cgeo.geocaching.activity.AbstractActivity;
-import cgeo.geocaching.activity.Progress;
import cgeo.geocaching.list.StoredList;
import cgeo.geocaching.network.HtmlImage;
import cgeo.geocaching.ui.AbstractCachingListViewPageViewCreator;
import cgeo.geocaching.ui.AnchorAwareLinkMovementMethod;
import cgeo.geocaching.ui.DecryptTextClickListener;
-import cgeo.geocaching.ui.Formatter;
-import cgeo.geocaching.ui.HtmlImageCounter;
import cgeo.geocaching.ui.UserActionsClickListener;
+import cgeo.geocaching.utils.Formatter;
import cgeo.geocaching.utils.TextUtils;
import cgeo.geocaching.utils.UnknownTagsHandler;
import org.apache.commons.lang3.StringEscapeUtils;
-import android.os.AsyncTask;
import android.text.Html;
-import android.text.Spanned;
import android.view.View;
+import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
@@ -34,19 +30,19 @@ public abstract class LogsViewCreator extends AbstractCachingListViewPageViewCre
protected final AbstractActivity activity;
- public LogsViewCreator(AbstractActivity activity) {
+ public LogsViewCreator(final AbstractActivity activity) {
this.activity = activity;
}
@Override
- public ListView getDispatchedView() {
+ public ListView getDispatchedView(final ViewGroup parentView) {
if (!isValid()) {
return null;
}
final List<LogEntry> logs = getLogs();
- view = (ListView) activity.getLayoutInflater().inflate(R.layout.logs_page, null);
+ view = (ListView) activity.getLayoutInflater().inflate(R.layout.logs_page, parentView, false);
addHeaderView();
view.setAdapter(new ArrayAdapter<LogEntry>(activity, R.layout.logs_item, logs) {
@@ -54,7 +50,7 @@ public abstract class LogsViewCreator extends AbstractCachingListViewPageViewCre
public View getView(final int position, final View convertView, final android.view.ViewGroup parent) {
View rowView = convertView;
if (null == rowView) {
- rowView = activity.getLayoutInflater().inflate(R.layout.logs_item, null);
+ rowView = activity.getLayoutInflater().inflate(R.layout.logs_item, parent, false);
}
LogViewHolder holder = (LogViewHolder) rowView.getTag();
if (null == holder) {
@@ -71,7 +67,7 @@ public abstract class LogsViewCreator extends AbstractCachingListViewPageViewCre
return view;
}
- protected void fillViewHolder(final View convertView, LogViewHolder holder, final LogEntry log) {
+ protected void fillViewHolder(final View convertView, final LogViewHolder holder, final LogEntry log) {
if (log.date > 0) {
holder.date.setText(Formatter.formatShortDateVerbally(log.date));
holder.date.setVisibility(View.VISIBLE);
@@ -88,17 +84,10 @@ public abstract class LogsViewCreator extends AbstractCachingListViewPageViewCre
String logText = log.log;
if (TextUtils.containsHtml(logText)) {
logText = log.getDisplayText();
- // Fast preview: parse only HTML without loading any images
- final HtmlImageCounter imageCounter = new HtmlImageCounter();
final UnknownTagsHandler unknownTagsHandler = new UnknownTagsHandler();
- holder.text.setText(Html.fromHtml(logText, imageCounter, unknownTagsHandler), TextView.BufferType.SPANNABLE);
- if (imageCounter.getImageCount() > 0) {
- // Complete view: parse again with loading images - if necessary ! If there are any images causing problems the user can see at least the preview
- final LogImageLoader loader = new LogImageLoader(holder);
- loader.execute(logText);
- }
- }
- else {
+ holder.text.setText(Html.fromHtml(logText, new HtmlImage(getGeocode(), false, StoredList.STANDARD_LIST_ID, false, holder.text),
+ unknownTagsHandler), TextView.BufferType.SPANNABLE);
+ } else {
holder.text.setText(logText, TextView.BufferType.SPANNABLE);
}
@@ -108,8 +97,8 @@ public abstract class LogsViewCreator extends AbstractCachingListViewPageViewCre
holder.images.setVisibility(View.VISIBLE);
holder.images.setOnClickListener(new View.OnClickListener() {
@Override
- public void onClick(View v) {
- ImagesActivity.startActivityLogImages(activity, getGeocode(), new ArrayList<Image>(log.getLogImages()));
+ public void onClick(final View v) {
+ ImagesActivity.startActivityLogImages(activity, getGeocode(), new ArrayList<>(log.getLogImages()));
}
});
} else {
@@ -146,30 +135,4 @@ public abstract class LogsViewCreator extends AbstractCachingListViewPageViewCre
abstract protected boolean isValid();
- /** Loads the Log Images outside the UI thread. */
-
- private class LogImageLoader extends AsyncTask<String, Progress, Spanned> {
- final private LogViewHolder holder;
- final private int position;
-
- public LogImageLoader(LogViewHolder holder) {
- this.holder = holder;
- this.position = holder.getPosition();
- }
-
- @Override
- protected Spanned doInBackground(String... logtext) {
- return Html.fromHtml(logtext[0], new HtmlImage(getGeocode(), false, StoredList.STANDARD_LIST_ID, false), null); //, TextView.BufferType.SPANNABLE)
- }
-
- @Override
- protected void onPostExecute(Spanned result) {
- // Ensure that this holder and its view still references the right item before updating the text.
- if (position == holder.getPosition()) {
- holder.text.setText(result);
- }
- }
-
- }
-
}
diff --git a/main/src/cgeo/geocaching/utils/AsyncTaskWithProgress.java b/main/src/cgeo/geocaching/utils/AsyncTaskWithProgress.java
index 7526d92..3d2b2b1 100644
--- a/main/src/cgeo/geocaching/utils/AsyncTaskWithProgress.java
+++ b/main/src/cgeo/geocaching/utils/AsyncTaskWithProgress.java
@@ -13,7 +13,7 @@ import android.os.AsyncTask;
* If no style is given, the progress dialog uses "determinate" style with known maximum. The progress maximum is
* automatically derived from the number of {@code Params} given to the task in {@link #execute(Object...)}.
* </p>
- *
+ *
* @param <Params>
* @param <Result>
*/
@@ -53,7 +53,7 @@ public abstract class AsyncTaskWithProgress<Params, Result> extends AsyncTask<Pa
* @param progressTitle
* @param progressMessage
*/
- public AsyncTaskWithProgress(final Activity activity, final String progressTitle, final String progressMessage, boolean indeterminate) {
+ public AsyncTaskWithProgress(final Activity activity, final String progressTitle, final String progressMessage, final boolean indeterminate) {
this.activity = activity;
this.progressTitle = progressTitle;
this.progressMessage = progressMessage;
@@ -66,7 +66,7 @@ public abstract class AsyncTaskWithProgress<Params, Result> extends AsyncTask<Pa
* @param activity
* @param progressTitle
*/
- public AsyncTaskWithProgress(final Activity activity, final String progressTitle, boolean indeterminate) {
+ public AsyncTaskWithProgress(final Activity activity, final String progressTitle, final boolean indeterminate) {
this(activity, progressTitle, null, indeterminate);
}
@@ -91,7 +91,7 @@ public abstract class AsyncTaskWithProgress<Params, Result> extends AsyncTask<Pa
}
@Override
- protected final void onPostExecute(Result result) {
+ protected final void onPostExecute(final Result result) {
onPostExecuteInternal(result);
if (null != activity) {
progress.dismiss();
@@ -103,12 +103,12 @@ public abstract class AsyncTaskWithProgress<Params, Result> extends AsyncTask<Pa
*
* @param result
*/
- protected void onPostExecuteInternal(Result result) {
+ protected void onPostExecuteInternal(final Result result) {
// empty by default
}
@Override
- protected final void onProgressUpdate(Integer... status) {
+ protected final void onProgressUpdate(final Integer... status) {
final int progressValue = status[0];
if (null != activity && progressValue >= 0) {
progress.setProgress(progressValue);
@@ -119,7 +119,7 @@ public abstract class AsyncTaskWithProgress<Params, Result> extends AsyncTask<Pa
/**
* This method should by overridden by sub classes instead of {@link #onProgressUpdate(Integer...)}.
*/
- protected void onProgressUpdateInternal(@SuppressWarnings("unused") int progress) {
+ protected void onProgressUpdateInternal(@SuppressWarnings("unused") final int progress) {
// empty by default
}
@@ -127,8 +127,9 @@ public abstract class AsyncTaskWithProgress<Params, Result> extends AsyncTask<Pa
progress.setMessage(message);
}
+ @SuppressWarnings("unchecked")
@Override
- protected final Result doInBackground(Params... params) {
+ protected final Result doInBackground(final Params... params) {
if (params != null) {
progress.setMaxProgressAndReset(params.length);
}
diff --git a/main/src/cgeo/geocaching/utils/DatabaseBackupUtils.java b/main/src/cgeo/geocaching/utils/DatabaseBackupUtils.java
index 4ce2e0c..d8aff74 100644
--- a/main/src/cgeo/geocaching/utils/DatabaseBackupUtils.java
+++ b/main/src/cgeo/geocaching/utils/DatabaseBackupUtils.java
@@ -3,14 +3,12 @@ package cgeo.geocaching.utils;
import cgeo.geocaching.DataStore;
import cgeo.geocaching.MainActivity;
import cgeo.geocaching.R;
-import cgeo.geocaching.ui.Formatter;
import cgeo.geocaching.ui.dialog.Dialogs;
import org.apache.commons.lang3.StringUtils;
import android.app.Activity;
import android.app.ProgressDialog;
-import android.content.Context;
import android.content.res.Resources;
import java.io.File;
@@ -53,7 +51,6 @@ public class DatabaseBackupUtils {
}
public static boolean createBackup(final Activity activity, final Runnable runAfterwards) {
- final Context context = activity;
// avoid overwriting an existing backup with an empty database
// (can happen directly after reinstalling the app)
if (DataStore.getAllCachesCount() == 0) {
@@ -61,9 +58,9 @@ public class DatabaseBackupUtils {
return false;
}
- final ProgressDialog dialog = ProgressDialog.show(context,
- context.getString(R.string.init_backup),
- context.getString(R.string.init_backup_running), true, false);
+ final ProgressDialog dialog = ProgressDialog.show(activity,
+ activity.getString(R.string.init_backup),
+ activity.getString(R.string.init_backup_running), true, false);
new Thread() {
@Override
public void run() {
@@ -75,9 +72,9 @@ public class DatabaseBackupUtils {
Dialogs.message(activity,
R.string.init_backup_backup,
backupFileName != null
- ? context.getString(R.string.init_backup_success)
+ ? activity.getString(R.string.init_backup_success)
+ "\n" + backupFileName
- : context.getString(R.string.init_backup_failed));
+ : activity.getString(R.string.init_backup_failed));
if (runAfterwards != null) {
runAfterwards.run();
}
diff --git a/main/src/cgeo/geocaching/utils/DebugUtils.java b/main/src/cgeo/geocaching/utils/DebugUtils.java
new file mode 100644
index 0000000..07aac64
--- /dev/null
+++ b/main/src/cgeo/geocaching/utils/DebugUtils.java
@@ -0,0 +1,37 @@
+package cgeo.geocaching.utils;
+
+import cgeo.geocaching.R;
+
+import org.eclipse.jdt.annotation.NonNull;
+
+import android.content.Context;
+import android.os.Environment;
+import android.widget.Toast;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Locale;
+
+public class DebugUtils {
+
+ private DebugUtils() {
+ // utility class
+ }
+
+ public static void createMemoryDump(final @NonNull Context context) {
+ try {
+ final Date now = new Date();
+ final SimpleDateFormat fileNameDateFormat = new SimpleDateFormat("yyyy-MM-dd_hh-mm", Locale.US);
+ File file = FileUtils.getUniqueNamedFile(Environment.getExternalStorageDirectory().getPath()
+ + File.separatorChar + "cgeo_dump_" + fileNameDateFormat.format(now) + ".hprof");
+ android.os.Debug.dumpHprofData(file.getPath());
+ Toast.makeText(context, context.getString(R.string.init_memory_dumped, file.getAbsolutePath()),
+ Toast.LENGTH_LONG).show();
+ ShareUtils.share(context, file, R.string.init_memory_dump);
+ } catch (IOException e) {
+ Log.e("createMemoryDump", e);
+ }
+ }
+}
diff --git a/main/src/cgeo/geocaching/ui/Formatter.java b/main/src/cgeo/geocaching/utils/Formatter.java
index 9242b9a..3068cd4 100644
--- a/main/src/cgeo/geocaching/ui/Formatter.java
+++ b/main/src/cgeo/geocaching/utils/Formatter.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.ui;
+package cgeo.geocaching.utils;
import cgeo.geocaching.CgeoApplication;
import cgeo.geocaching.Geocache;
@@ -121,7 +121,7 @@ public abstract class Formatter {
}
public static String formatCacheInfoLong(Geocache cache, CacheListType cacheListType) {
- final ArrayList<String> infos = new ArrayList<String>();
+ final ArrayList<String> infos = new ArrayList<>();
if (StringUtils.isNotBlank(cache.getGeocode())) {
infos.add(cache.getGeocode());
}
@@ -138,7 +138,7 @@ public abstract class Formatter {
}
public static String formatCacheInfoShort(Geocache cache) {
- final ArrayList<String> infos = new ArrayList<String>();
+ final ArrayList<String> infos = new ArrayList<>();
addShortInfos(cache, infos);
return StringUtils.join(infos, Formatter.SEPARATOR);
}
@@ -163,7 +163,7 @@ public abstract class Formatter {
}
public static String formatCacheInfoHistory(Geocache cache) {
- final ArrayList<String> infos = new ArrayList<String>(3);
+ final ArrayList<String> infos = new ArrayList<>(3);
infos.add(StringUtils.upperCase(cache.getGeocode()));
infos.add(Formatter.formatDate(cache.getVisitedDate()));
infos.add(Formatter.formatTime(cache.getVisitedDate()));
@@ -171,7 +171,7 @@ public abstract class Formatter {
}
public static String formatWaypointInfo(Waypoint waypoint) {
- final List<String> infos = new ArrayList<String>(3);
+ final List<String> infos = new ArrayList<>(3);
WaypointType waypointType = waypoint.getWaypointType();
if (waypointType != WaypointType.OWN && waypointType != null) {
infos.add(waypointType.getL10n());
diff --git a/main/src/cgeo/geocaching/utils/HtmlUtils.java b/main/src/cgeo/geocaching/utils/HtmlUtils.java
index 37e20ec..51c4d6e 100644
--- a/main/src/cgeo/geocaching/utils/HtmlUtils.java
+++ b/main/src/cgeo/geocaching/utils/HtmlUtils.java
@@ -34,7 +34,7 @@ public final class HtmlUtils {
if (html instanceof Spanned) {
Spanned text = (Spanned) html;
Object[] styles = text.getSpans(0, text.length(), Object.class);
- ArrayList<Pair<Integer, Integer>> removals = new ArrayList<Pair<Integer, Integer>>();
+ ArrayList<Pair<Integer, Integer>> removals = new ArrayList<>();
for (Object style : styles) {
if (style instanceof ImageSpan) {
int start = text.getSpanStart(style);
diff --git a/main/src/cgeo/geocaching/utils/ImageUtils.java b/main/src/cgeo/geocaching/utils/ImageUtils.java
index ffb7bf3..739ecc4 100644
--- a/main/src/cgeo/geocaching/utils/ImageUtils.java
+++ b/main/src/cgeo/geocaching/utils/ImageUtils.java
@@ -1,6 +1,7 @@
package cgeo.geocaching.utils;
import cgeo.geocaching.CgeoApplication;
+import cgeo.geocaching.R;
import cgeo.geocaching.compatibility.Compatibility;
import org.apache.commons.io.IOUtils;
@@ -8,17 +9,25 @@ import org.apache.commons.lang3.StringUtils;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
+import rx.Observable;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.functions.Action1;
+
+import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
+import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
import android.media.ExifInterface;
import android.net.Uri;
import android.os.Environment;
import android.util.Base64;
import android.util.Base64InputStream;
+import android.widget.TextView;
import java.io.BufferedOutputStream;
import java.io.ByteArrayInputStream;
@@ -288,4 +297,48 @@ public final class ImageUtils {
IOUtils.closeQuietly(in);
}
}
+
+ public static BitmapDrawable getTransparent1x1Drawable(final Resources res) {
+ return new BitmapDrawable(res, BitmapFactory.decodeResource(res, R.drawable.image_no_placement));
+ }
+
+ /**
+ * Container which can hold a drawable (initially an empty one) and get a newer version when it
+ * becomes available. It also invalidates the view the container belongs to, so that it is
+ * redrawn properly.
+ */
+ @SuppressWarnings("deprecation")
+ public final static class ContainerDrawable extends BitmapDrawable implements Action1<Drawable> {
+ private Drawable drawable;
+ final private TextView view;
+
+ public ContainerDrawable(@NonNull final TextView view) {
+ this.view = view;
+ drawable = null;
+ setBounds(0, 0, 0, 0);
+ }
+
+ public ContainerDrawable(@NonNull final TextView view, final Observable<? extends Drawable> drawableObservable) {
+ this(view);
+ updateFrom(drawableObservable);
+ }
+
+ @Override
+ public void draw(final Canvas canvas) {
+ if (drawable != null) {
+ drawable.draw(canvas);
+ }
+ }
+
+ @Override
+ public void call(final Drawable newDrawable) {
+ setBounds(0, 0, newDrawable.getIntrinsicWidth(), newDrawable.getIntrinsicHeight());
+ drawable = newDrawable;
+ view.setText(view.getText());
+ }
+
+ public void updateFrom(final Observable<? extends Drawable> drawableObservable) {
+ drawableObservable.observeOn(AndroidSchedulers.mainThread()).subscribe(this);
+ }
+ }
}
diff --git a/main/src/cgeo/geocaching/utils/LazyInitializedList.java b/main/src/cgeo/geocaching/utils/LazyInitializedList.java
index dedc96e..b0e2e46 100644
--- a/main/src/cgeo/geocaching/utils/LazyInitializedList.java
+++ b/main/src/cgeo/geocaching/utils/LazyInitializedList.java
@@ -65,7 +65,7 @@ public abstract class LazyInitializedList<ElementType> extends AbstractList<Elem
@Override
public void clear() {
- list = new ArrayList<ElementType>();
+ list = new ArrayList<>();
}
}
diff --git a/main/src/cgeo/geocaching/utils/LeastRecentlyUsedSet.java b/main/src/cgeo/geocaching/utils/LeastRecentlyUsedSet.java
index 259e94a..a69f427 100644
--- a/main/src/cgeo/geocaching/utils/LeastRecentlyUsedSet.java
+++ b/main/src/cgeo/geocaching/utils/LeastRecentlyUsedSet.java
@@ -31,11 +31,11 @@ public class LeastRecentlyUsedSet<E> extends AbstractSet<E>
public LeastRecentlyUsedSet(int maxEntries, int initialCapacity, float loadFactor) {
// because we don't use any Map.get() methods from the Set, BOUNDED and LRU_CACHE have the exact same Behaviour
// So we use LRU_CACHE mode because it should perform a bit better (as it doesn't re-add explicitly)
- map = new LeastRecentlyUsedMap.LruCache<E, Object>(maxEntries, initialCapacity, loadFactor);
+ map = new LeastRecentlyUsedMap.LruCache<>(maxEntries, initialCapacity, loadFactor);
}
public LeastRecentlyUsedSet(int maxEntries) {
- map = new LeastRecentlyUsedMap.LruCache<E, Object>(maxEntries);
+ map = new LeastRecentlyUsedMap.LruCache<>(maxEntries);
}
/**
@@ -157,7 +157,7 @@ public class LeastRecentlyUsedSet<E> extends AbstractSet<E>
* @return List based clone of the set
*/
public synchronized List<E> getAsList() {
- return new ArrayList<E>(this);
+ return new ArrayList<>(this);
}
/**
@@ -200,7 +200,7 @@ public class LeastRecentlyUsedSet<E> extends AbstractSet<E>
final float loadFactor = s.readFloat();
final int maxEntries = s.readInt();
- map = new LeastRecentlyUsedMap.LruCache<E, Object>(maxEntries, capacity, loadFactor);
+ map = new LeastRecentlyUsedMap.LruCache<>(maxEntries, capacity, loadFactor);
// Read in size
final int size = s.readInt();
diff --git a/main/src/cgeo/geocaching/utils/Log.java b/main/src/cgeo/geocaching/utils/Log.java
index 8f96f10..f338a8e 100644
--- a/main/src/cgeo/geocaching/utils/Log.java
+++ b/main/src/cgeo/geocaching/utils/Log.java
@@ -16,6 +16,10 @@ public final class Log {
private static final String TAG = "cgeo";
+ private static final class StackTraceDebug extends RuntimeException {
+ final static private long serialVersionUID = 27058374L;
+ }
+
/**
* The debug flag is cached here so that we don't need to access the settings every time we have to evaluate it.
*/
@@ -119,4 +123,17 @@ public final class Log {
IOUtils.closeQuietly(writer);
}
}
+
+ /**
+ * Log a debug message with the actual stack trace.
+ *
+ * @param msg the debug message
+ */
+ public static void logStackTrace(final String msg) {
+ try {
+ throw new StackTraceDebug();
+ } catch (final StackTraceDebug dbg) {
+ Log.d(msg, dbg);
+ }
+ }
}
diff --git a/main/src/cgeo/geocaching/utils/LogTemplateProvider.java b/main/src/cgeo/geocaching/utils/LogTemplateProvider.java
index 5fa0982..ff4013c 100644
--- a/main/src/cgeo/geocaching/utils/LogTemplateProvider.java
+++ b/main/src/cgeo/geocaching/utils/LogTemplateProvider.java
@@ -8,7 +8,6 @@ import cgeo.geocaching.connector.ConnectorFactory;
import cgeo.geocaching.connector.IConnector;
import cgeo.geocaching.connector.capability.ILogin;
import cgeo.geocaching.settings.Settings;
-import cgeo.geocaching.ui.Formatter;
import org.apache.commons.lang3.StringUtils;
@@ -36,9 +35,9 @@ public final class LogTemplateProvider {
private Geocache cache;
private Trackable trackable;
private boolean offline = false;
- private LogEntry logEntry;
+ private final LogEntry logEntry;
- public LogContext(final Geocache cache, LogEntry logEntry) {
+ public LogContext(final Geocache cache, final LogEntry logEntry) {
this(cache, logEntry, false);
}
@@ -47,7 +46,7 @@ public final class LogTemplateProvider {
this.logEntry = logEntry;
}
- public LogContext(final Geocache cache, LogEntry logEntry, final boolean offline) {
+ public LogContext(final Geocache cache, final LogEntry logEntry, final boolean offline) {
this.cache = cache;
this.offline = offline;
this.logEntry = logEntry;
@@ -104,8 +103,11 @@ public final class LogTemplateProvider {
}
}
- public static ArrayList<LogTemplate> getTemplates() {
- ArrayList<LogTemplate> templates = new ArrayList<LogTemplateProvider.LogTemplate>();
+ /**
+ * @return all templates, but not the signature template itself
+ */
+ public static ArrayList<LogTemplate> getTemplatesWithoutSignature() {
+ final ArrayList<LogTemplate> templates = new ArrayList<>();
templates.add(new LogTemplate("DATE", R.string.init_signature_template_date) {
@Override
@@ -132,6 +134,13 @@ public final class LogTemplateProvider {
@Override
public String getValue(final LogContext context) {
+ final Geocache cache = context.getCache();
+ if (cache != null) {
+ final IConnector connector = ConnectorFactory.getConnector(cache);
+ if (connector instanceof ILogin) {
+ return ((ILogin) connector).getUserName();
+ }
+ }
return Settings.getUsername();
}
});
@@ -171,11 +180,11 @@ public final class LogTemplateProvider {
@Override
public String getValue(final LogContext context) {
- Trackable trackable = context.getTrackable();
+ final Trackable trackable = context.getTrackable();
if (trackable != null) {
return trackable.getOwner();
}
- Geocache cache = context.getCache();
+ final Geocache cache = context.getCache();
if (cache != null) {
return cache.getOwnerDisplayName();
}
@@ -184,12 +193,12 @@ public final class LogTemplateProvider {
});
templates.add(new LogTemplate("NAME", R.string.init_signature_template_name) {
@Override
- public String getValue(LogContext context) {
- Trackable trackable = context.getTrackable();
+ public String getValue(final LogContext context) {
+ final Trackable trackable = context.getTrackable();
if (trackable != null) {
return trackable.getName();
}
- Geocache cache = context.getCache();
+ final Geocache cache = context.getCache();
if (cache != null) {
return cache.getName();
}
@@ -199,12 +208,12 @@ public final class LogTemplateProvider {
templates.add(new LogTemplate("URL", R.string.init_signature_template_url) {
@Override
- public String getValue(LogContext context) {
- Trackable trackable = context.getTrackable();
+ public String getValue(final LogContext context) {
+ final Trackable trackable = context.getTrackable();
if (trackable != null) {
return trackable.getUrl();
}
- Geocache cache = context.getCache();
+ final Geocache cache = context.getCache();
if (cache != null) {
return cache.getUrl();
}
@@ -213,8 +222,8 @@ public final class LogTemplateProvider {
});
templates.add(new LogTemplate("LOG", R.string.init_signature_template_log) {
@Override
- public String getValue(LogContext context) {
- LogEntry logEntry = context.getLogEntry();
+ public String getValue(final LogContext context) {
+ final LogEntry logEntry = context.getLogEntry();
if (logEntry != null) {
return logEntry.getDisplayText();
}
@@ -224,8 +233,26 @@ public final class LogTemplateProvider {
return templates;
}
+ /**
+ * @return all templates, including the signature template
+ */
+ public static ArrayList<LogTemplate> getTemplatesWithSignature() {
+ final ArrayList<LogTemplate> templates = getTemplatesWithoutSignature();
+ templates.add(new LogTemplate("SIGNATURE", R.string.init_signature) {
+ @Override
+ public String getValue(final LogContext context) {
+ final String nestedTemplate = StringUtils.defaultString(Settings.getSignature());
+ if (StringUtils.contains(nestedTemplate, "SIGNATURE")) {
+ return "invalid signature template";
+ }
+ return LogTemplateProvider.applyTemplates(nestedTemplate, context);
+ }
+ });
+ return templates;
+ }
+
public static LogTemplate getTemplate(final int itemId) {
- for (LogTemplate template : getTemplates()) {
+ for (final LogTemplate template : getTemplatesWithSignature()) {
if (template.getItemId() == itemId) {
return template;
}
@@ -238,7 +265,7 @@ public final class LogTemplateProvider {
return StringUtils.EMPTY;
}
String result = signature;
- for (LogTemplate template : getTemplates()) {
+ for (final LogTemplate template : getTemplatesWithSignature()) {
result = template.apply(result, context);
}
return result;
diff --git a/main/src/cgeo/geocaching/utils/MapUtils.java b/main/src/cgeo/geocaching/utils/MapUtils.java
new file mode 100644
index 0000000..948df77
--- /dev/null
+++ b/main/src/cgeo/geocaching/utils/MapUtils.java
@@ -0,0 +1,126 @@
+package cgeo.geocaching.utils;
+
+import cgeo.geocaching.Geocache;
+import cgeo.geocaching.R;
+
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+
+import android.content.res.Resources;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.LayerDrawable;
+import android.util.SparseArray;
+
+import java.util.ArrayList;
+
+public final class MapUtils {
+
+ // data for overlays
+ private static final int[][] INSET_RELIABLE = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } }; // center, 33x40 / 45x51 / 60x68
+ private static final int[][] INSET_TYPE = { { 5, 8, 6, 10 }, { 4, 4, 5, 11 }, { 4, 4, 5, 11 } }; // center, 22x22 / 36x36
+ private static final int[][] INSET_OWN = { { 21, 0, 0, 26 }, { 25, 0, 0, 35 }, { 40, 0, 0, 48 } }; // top right, 12x12 / 16x16 / 20x20
+ private static final int[][] INSET_FOUND = { { 0, 0, 21, 28 }, { 0, 0, 25, 35 }, { 0, 0, 40, 48 } }; // top left, 12x12 / 16x16 / 20x20
+ private static final int[][] INSET_USERMODIFIEDCOORDS = { { 21, 28, 0, 0 }, { 19, 25, 0, 0 }, { 25, 33, 0, 0 } }; // bottom right, 12x12 / 26x26 / 35x35
+ private static final int[][] INSET_PERSONALNOTE = { { 0, 28, 21, 0 }, { 0, 25, 19, 0 }, { 0, 33, 25, 0 } }; // bottom left, 12x12 / 26x26 / 35x35
+
+ private static final SparseArray<LayerDrawable> overlaysCache = new SparseArray<>();
+
+ private MapUtils() {
+ // Do not instantiate
+ }
+
+ /**
+ * Build the drawable for a given cache.
+ *
+ * @param res the resources to use
+ * @param cache the cache to build the drawable for
+ * @return a drawable representing the current cache status
+ */
+ public static LayerDrawable getCacheItem(final Resources res, final Geocache cache) {
+ final int hashcode = new HashCodeBuilder()
+ .append(cache.isReliableLatLon())
+ .append(cache.getType().id)
+ .append(cache.isDisabled() || cache.isArchived())
+ .append(cache.getMapMarkerId())
+ .append(cache.isOwner())
+ .append(cache.isFound())
+ .append(cache.hasUserModifiedCoords())
+ .append(cache.getPersonalNote())
+ .append(cache.isLogOffline())
+ .append(cache.getListId() > 0)
+ .toHashCode();
+
+ synchronized (overlaysCache) {
+ LayerDrawable drawable = overlaysCache.get(hashcode);
+ if (drawable == null) {
+ drawable = MapUtils.createCacheItem(res, cache);
+ overlaysCache.put(hashcode, drawable);
+ }
+ return drawable;
+ }
+ }
+
+ /**
+ * Clear the cache of drawable items.
+ */
+ public static void clearCachedItems() {
+ synchronized (overlaysCache) {
+ overlaysCache.clear();
+ }
+ }
+
+ private static LayerDrawable createCacheItem(final Resources res, final Geocache cache) {
+ // Set initial capacities to the maximum of layers and insets to avoid dynamic reallocation
+ final ArrayList<Drawable> layers = new ArrayList<>(9);
+ final ArrayList<int[]> insets = new ArrayList<>(8);
+
+ // background: disabled or not
+ final Drawable marker = res.getDrawable(cache.getMapMarkerId());
+ layers.add(marker);
+ final int resolution = marker.getIntrinsicWidth() > 40 ? (marker.getIntrinsicWidth() > 50 ? 2 : 1) : 0;
+ // reliable or not
+ if (!cache.isReliableLatLon()) {
+ insets.add(INSET_RELIABLE[resolution]);
+ layers.add(res.getDrawable(R.drawable.marker_notreliable));
+ }
+ // cache type
+ layers.add(res.getDrawable(cache.getType().markerId));
+ insets.add(INSET_TYPE[resolution]);
+ // own
+ if (cache.isOwner()) {
+ layers.add(res.getDrawable(R.drawable.marker_own));
+ insets.add(INSET_OWN[resolution]);
+ // if not, checked if stored
+ } else if (cache.getListId() > 0) {
+ layers.add(res.getDrawable(R.drawable.marker_stored));
+ insets.add(INSET_OWN[resolution]);
+ }
+ // found
+ if (cache.isFound()) {
+ layers.add(res.getDrawable(R.drawable.marker_found));
+ insets.add(INSET_FOUND[resolution]);
+ // if not, perhaps logged offline
+ } else if (cache.isLogOffline()) {
+ layers.add(res.getDrawable(R.drawable.marker_found_offline));
+ insets.add(INSET_FOUND[resolution]);
+ }
+ // user modified coords
+ if (cache.hasUserModifiedCoords()) {
+ layers.add(res.getDrawable(R.drawable.marker_usermodifiedcoords));
+ insets.add(INSET_USERMODIFIEDCOORDS[resolution]);
+ }
+ // personal note
+ if (cache.getPersonalNote() != null) {
+ layers.add(res.getDrawable(R.drawable.marker_personalnote));
+ insets.add(INSET_PERSONALNOTE[resolution]);
+ }
+
+ final LayerDrawable ld = new LayerDrawable(layers.toArray(new Drawable[layers.size()]));
+
+ int index = 1;
+ for (final int[] inset : insets) {
+ ld.setLayerInset(index++, inset[0], inset[1], inset[2], inset[3]);
+ }
+
+ return ld;
+ }
+}
diff --git a/main/src/cgeo/geocaching/utils/OOMDumpingUncaughtExceptionHandler.java b/main/src/cgeo/geocaching/utils/OOMDumpingUncaughtExceptionHandler.java
new file mode 100644
index 0000000..1401542
--- /dev/null
+++ b/main/src/cgeo/geocaching/utils/OOMDumpingUncaughtExceptionHandler.java
@@ -0,0 +1,79 @@
+package cgeo.geocaching.utils;
+
+import android.os.Environment;
+
+import java.io.IOException;
+import java.lang.Thread.UncaughtExceptionHandler;
+
+public class OOMDumpingUncaughtExceptionHandler implements UncaughtExceptionHandler {
+
+ private UncaughtExceptionHandler defaultHandler = null;
+ private boolean defaultReplaced = false;
+
+ public static boolean activateHandler() {
+
+ final OOMDumpingUncaughtExceptionHandler handler = new OOMDumpingUncaughtExceptionHandler();
+
+ return handler.activate();
+ }
+
+ private boolean activate() {
+
+ defaultHandler = Thread.getDefaultUncaughtExceptionHandler();
+
+ // replace default handler if that has not been done already
+ if (!(defaultHandler instanceof OOMDumpingUncaughtExceptionHandler)) {
+ Thread.setDefaultUncaughtExceptionHandler(this);
+ defaultReplaced = true;
+ } else {
+ defaultHandler = null;
+ defaultReplaced = false;
+ }
+
+ return defaultReplaced;
+ }
+
+ public static boolean resetToDefault() {
+
+ boolean defaultResetted = false;
+
+ final UncaughtExceptionHandler unspecificHandler = Thread.getDefaultUncaughtExceptionHandler();
+
+ if (unspecificHandler instanceof OOMDumpingUncaughtExceptionHandler) {
+ final OOMDumpingUncaughtExceptionHandler handler = (OOMDumpingUncaughtExceptionHandler) unspecificHandler;
+ defaultResetted = handler.reset();
+ }
+
+ return defaultResetted;
+ }
+
+ private boolean reset() {
+
+ final boolean resetted = defaultReplaced;
+
+ if (defaultReplaced) {
+ Thread.setDefaultUncaughtExceptionHandler(defaultHandler);
+ defaultReplaced = false;
+ }
+
+ return resetted;
+ }
+
+ @Override
+ public void uncaughtException(final Thread thread, final Throwable ex) {
+ Log.e("UncaughtException", ex);
+ Throwable exx = ex;
+ while (exx.getCause() != null) {
+ exx = exx.getCause();
+ }
+ if (exx.getClass().equals(OutOfMemoryError.class)) {
+ try {
+ Log.e("OutOfMemory");
+ android.os.Debug.dumpHprofData(Environment.getExternalStorageDirectory().getPath() + "/dump.hprof");
+ } catch (final IOException e) {
+ Log.e("Error writing dump", e);
+ }
+ }
+ defaultHandler.uncaughtException(thread, ex);
+ }
+}
diff --git a/main/src/cgeo/geocaching/utils/RxUtils.java b/main/src/cgeo/geocaching/utils/RxUtils.java
index 8e7864c..241ba78 100644
--- a/main/src/cgeo/geocaching/utils/RxUtils.java
+++ b/main/src/cgeo/geocaching/utils/RxUtils.java
@@ -1,6 +1,8 @@
package cgeo.geocaching.utils;
+import rx.Observable;
import rx.Scheduler;
+import rx.observables.BlockingObservable;
import rx.schedulers.Schedulers;
import java.util.concurrent.LinkedBlockingQueue;
@@ -12,7 +14,15 @@ public class RxUtils {
// Utility class, not to be instanciated
private RxUtils() {}
- final static private int cores = Runtime.getRuntime().availableProcessors();
- public final static Scheduler computationScheduler = Schedulers.executor(new ThreadPoolExecutor(1, cores, 5, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>()));
+ public final static Scheduler computationScheduler = Schedulers.computation();
+ public static final Scheduler networkScheduler = Schedulers.from(new ThreadPoolExecutor(10, 10, 5, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>()));
+
+ public static <T> void waitForCompletion(final BlockingObservable<T> observable) {
+ observable.lastOrDefault(null);
+ }
+
+ public static void waitForCompletion(final Observable<?>... observables) {
+ waitForCompletion(Observable.merge(observables).toBlocking());
+ }
}
diff --git a/main/src/cgeo/geocaching/utils/ShareUtils.java b/main/src/cgeo/geocaching/utils/ShareUtils.java
new file mode 100644
index 0000000..bfd6838
--- /dev/null
+++ b/main/src/cgeo/geocaching/utils/ShareUtils.java
@@ -0,0 +1,27 @@
+package cgeo.geocaching.utils;
+
+import org.eclipse.jdt.annotation.NonNull;
+
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+
+import java.io.File;
+
+public class ShareUtils {
+ private ShareUtils() {
+ // utility class
+ }
+
+ public static void share(final Context context, final @NonNull File file, final @NonNull String mimeType, final int titleResourceId) {
+ final Intent shareIntent = new Intent();
+ shareIntent.setAction(Intent.ACTION_SEND);
+ shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));
+ shareIntent.setType(mimeType);
+ context.startActivity(Intent.createChooser(shareIntent, context.getString(titleResourceId)));
+ }
+
+ public static void share(final Context context, final @NonNull File file, final int titleResourceId) {
+ share(context, file, "*/*", titleResourceId);
+ }
+}
diff --git a/main/src/cgeo/geocaching/utils/SimpleCancellableHandler.java b/main/src/cgeo/geocaching/utils/SimpleCancellableHandler.java
index 22cd4d7..eee71ba 100644
--- a/main/src/cgeo/geocaching/utils/SimpleCancellableHandler.java
+++ b/main/src/cgeo/geocaching/utils/SimpleCancellableHandler.java
@@ -15,8 +15,8 @@ public class SimpleCancellableHandler extends CancellableHandler {
protected final WeakReference<Progress> progressDialogRef;
public SimpleCancellableHandler(final AbstractActivity activity, final Progress progress) {
- this.activityRef = new WeakReference<AbstractActivity>(activity);
- this.progressDialogRef = new WeakReference<Progress>(progress);
+ this.activityRef = new WeakReference<>(activity);
+ this.progressDialogRef = new WeakReference<>(progress);
}
@Override
diff --git a/main/src/cgeo/geocaching/utils/SimpleHandler.java b/main/src/cgeo/geocaching/utils/SimpleHandler.java
index 8e0a479..7c5ac43 100644
--- a/main/src/cgeo/geocaching/utils/SimpleHandler.java
+++ b/main/src/cgeo/geocaching/utils/SimpleHandler.java
@@ -14,8 +14,8 @@ public abstract class SimpleHandler extends Handler {
protected final WeakReference<Progress> progressDialogRef;
public SimpleHandler(final AbstractActivity activity, final Progress progress) {
- activityRef = new WeakReference<AbstractActivity>(activity);
- progressDialogRef = new WeakReference<Progress>(progress);
+ activityRef = new WeakReference<>(activity);
+ progressDialogRef = new WeakReference<>(progress);
}
@Override
diff --git a/main/src/cgeo/geocaching/utils/TextUtils.java b/main/src/cgeo/geocaching/utils/TextUtils.java
index ef09f32..77aa167 100644
--- a/main/src/cgeo/geocaching/utils/TextUtils.java
+++ b/main/src/cgeo/geocaching/utils/TextUtils.java
@@ -4,11 +4,13 @@
package cgeo.geocaching.utils;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
import org.eclipse.jdt.annotation.Nullable;
import java.nio.charset.Charset;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import java.util.zip.CRC32;
/**
* Misc. utils. All methods don't use Android specific stuff to use these methods in plain JUnit tests.
@@ -52,7 +54,7 @@ public final class TextUtils {
result = matcher.group(group);
}
if (null != result) {
- Matcher remover = PATTERN_REMOVE_NONPRINTABLE.matcher(result);
+ final Matcher remover = PATTERN_REMOVE_NONPRINTABLE.matcher(result);
result = remover.replaceAll(" ");
return trim ? new String(result).trim() : new String(result);
@@ -134,7 +136,7 @@ public final class TextUtils {
data.getChars(0, length, chars, 0);
int resultSize = 0;
boolean lastWasWhitespace = true;
- for (char c : chars) {
+ for (final char c : chars) {
if (c == ' ' || c == '\n' || c == '\r' || c == '\t') {
if (!lastWasWhitespace) {
chars[resultSize++] = ' ';
@@ -167,8 +169,20 @@ public final class TextUtils {
* @return
*/
public static String removeControlCharacters(final String input) {
- Matcher remover = PATTERN_REMOVE_NONPRINTABLE.matcher(input);
+ final Matcher remover = PATTERN_REMOVE_NONPRINTABLE.matcher(input);
return remover.replaceAll(" ").trim();
}
+ /**
+ * Calculate a simple checksum for change-checking (not usable for security/cryptography!)
+ *
+ * @param input
+ * String to check
+ * @return resulting checksum
+ */
+ public static long checksum(final String input) {
+ final CRC32 checksum = new CRC32();
+ checksum.update(input.getBytes());
+ return checksum.getValue();
+ }
}
diff --git a/main/src/cgeo/geocaching/utils/TranslationUtils.java b/main/src/cgeo/geocaching/utils/TranslationUtils.java
index 619db08..ea3c395 100644
--- a/main/src/cgeo/geocaching/utils/TranslationUtils.java
+++ b/main/src/cgeo/geocaching/utils/TranslationUtils.java
@@ -1,10 +1,10 @@
package cgeo.geocaching.utils;
-import cgeo.geocaching.activity.AbstractActivity;
import cgeo.geocaching.network.Network;
import org.apache.commons.lang3.StringUtils;
+import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
@@ -51,7 +51,7 @@ public final class TranslationUtils {
* @param text
* The text to be translated
*/
- public static void startActivityTranslate(final AbstractActivity context, final String toLang, final String text) {
+ public static void startActivityTranslate(final Activity context, final String toLang, final String text) {
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(buildTranslationURI(toLang, text))));
}
}
diff --git a/main/templates/keys.xml b/main/templates/keys.xml
index 2c41a2a..d40c0e3 100644
--- a/main/templates/keys.xml
+++ b/main/templates/keys.xml
@@ -22,4 +22,8 @@
<!-- Opencaching.ro -->
<string name="oc_ro_okapi_consumer_key" translatable="false">@ocro.okapi.consumer.key@</string>
<string name="oc_ro_okapi_consumer_secret" translatable="false">@ocro.okapi.consumer.secret@</string>
+
+ <!-- Opencaching.og.uk -->
+ <string name="oc_uk_okapi_consumer_key" translatable="false">@ocuk.okapi.consumer.key@</string>
+ <string name="oc_uk_okapi_consumer_secret" translatable="false">@ocuk.okapi.consumer.secret@</string>
</resources>
diff --git a/main/thirdparty/android/support/v4/app/FragmentListActivity.java b/main/thirdparty/android/support/v4/app/FragmentListActivity.java
index fa425ab..a7f8880 100644
--- a/main/thirdparty/android/support/v4/app/FragmentListActivity.java
+++ b/main/thirdparty/android/support/v4/app/FragmentListActivity.java
@@ -18,6 +18,8 @@ package android.support.v4.app;
import org.eclipse.jdt.annotation.NonNull;
+import android.annotation.SuppressLint;
+import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
@@ -51,31 +53,31 @@ import android.widget.ListView;
* The following code demonstrates an (ugly) custom screen layout. It has a list
* with a green background, and an alternate red "no data" message.
* </p>
- *
+ *
* <pre>
* &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
* &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
* android:orientation=&quot;vertical&quot;
- * android:layout_width=&quot;fill_parent&quot;
+ * android:layout_width=&quot;fill_parent&quot;
* android:layout_height=&quot;fill_parent&quot;
* android:paddingLeft=&quot;8dp&quot;
* android:paddingRight=&quot;8dp&quot;&gt;
- *
+ *
* &lt;ListView android:id=&quot;@id/android:list&quot;
- * android:layout_width=&quot;fill_parent&quot;
+ * android:layout_width=&quot;fill_parent&quot;
* android:layout_height=&quot;fill_parent&quot;
* android:background=&quot;#00FF00&quot;
* android:layout_weight=&quot;1&quot;
* android:drawSelectorOnTop=&quot;false&quot;/&gt;
- *
+ *
* &lt;TextView android:id=&quot;@id/android:empty&quot;
- * android:layout_width=&quot;fill_parent&quot;
+ * android:layout_width=&quot;fill_parent&quot;
* android:layout_height=&quot;fill_parent&quot;
* android:background=&quot;#FF0000&quot;
* android:text=&quot;No data&quot;/&gt;
* &lt;/LinearLayout&gt;
* </pre>
- *
+ *
* <p>
* <strong>Row Layout</strong>
* </p>
@@ -96,27 +98,27 @@ import android.widget.ListView;
* source for the resource two_line_list_item, which displays two data
* fields,one above the other, for each list row.
* </p>
- *
+ *
* <pre>
* &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
* &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
* android:layout_width=&quot;fill_parent&quot;
* android:layout_height=&quot;wrap_content&quot;
* android:orientation=&quot;vertical&quot;&gt;
- *
+ *
* &lt;TextView android:id=&quot;@+id/text1&quot;
* android:textSize=&quot;16sp&quot;
* android:textStyle=&quot;bold&quot;
* android:layout_width=&quot;fill_parent&quot;
* android:layout_height=&quot;wrap_content&quot;/&gt;
- *
+ *
* &lt;TextView android:id=&quot;@+id/text2&quot;
* android:textSize=&quot;16sp&quot;
* android:layout_width=&quot;fill_parent&quot;
* android:layout_height=&quot;wrap_content&quot;/&gt;
* &lt;/LinearLayout&gt;
* </pre>
- *
+ *
* <p>
* You must identify the data bound to each TextView object in this layout. The
* syntax for this is discussed in the next section.
@@ -137,40 +139,40 @@ import android.widget.ListView;
* Contacts provider for all contacts, then binding the Name and Company fields
* to a two line row layout in the activity's ListView.
* </p>
- *
+ *
* <pre>
* public class MyListAdapter extends FragmentListActivity {
- *
+ *
* &#064;Override
* protected void onCreate(Bundle savedInstanceState){
* super.onCreate(savedInstanceState);
- *
+ *
* // We'll define a custom screen layout here (the one shown above), but
* // typically, you could just use the standard FragmentListActivity layout.
* setContentView(R.layout.custom_list_activity_view);
- *
+ *
* // Query for all people contacts using the {@link android.provider.Contacts.People} convenience class.
* // Put a managed wrapper around the retrieved cursor so we don't have to worry about
* // requerying or closing it as the activity changes state.
* mCursor = this.getContentResolver().query(People.CONTENT_URI, null, null, null, null);
* startManagingCursor(mCursor);
- *
- * // Now create a new list adapter bound to the cursor.
+ *
+ * // Now create a new list adapter bound to the cursor.
* // SimpleListAdapter is designed for binding to a Cursor.
* ListAdapter adapter = new SimpleCursorAdapter(
* this, // Context.
- * android.R.layout.two_line_list_item, // Specify the row template to use (here, two columns bound to the two retrieved cursor
+ * android.R.layout.two_line_list_item, // Specify the row template to use (here, two columns bound to the two retrieved cursor
* rows).
* mCursor, // Pass in the cursor to bind to.
* new String[] {People.NAME, People.COMPANY}, // Array of cursor columns to bind to.
* new int[] {android.R.id.text1, android.R.id.text2}); // Parallel array of which template objects to bind to those columns.
- *
+ *
* // Bind to our new adapter.
* setListAdapter(adapter);
* }
* }
* </pre>
- *
+ *
* @see #setListAdapter
* @see android.widget.ListView
*/
@@ -186,38 +188,38 @@ public class FragmentListActivity extends FragmentActivity {
*/
protected ListView mList;
- private Handler mHandler = new Handler();
+ private final Handler mHandler = new Handler();
private boolean mFinishedStart = false;
- private Runnable mRequestFocus = new Runnable() {
+ private final Runnable mRequestFocus = new Runnable() {
@Override
public void run() {
mList.focusableViewAvailable(mList);
}
};
-
+
/**
* This method will be called when an item in the list is selected.
* Subclasses should override. Subclasses can call
* getListView().getItemAtPosition(position) if they need to access the
* data associated with the selected item.
- *
+ *
* @param l The ListView where the click happened
* @param v The view that was clicked within the ListView
* @param position The position of the view in the list
* @param id The row id of the item that was clicked
*/
- protected void onListItemClick(ListView l, View v, int position, long id) {
+ protected void onListItemClick(final ListView l, final View v, final int position, final long id) {
}
-
+
/**
* Ensures the list view has been created before Activity restores all
* of the view states.
- *
+ *
*@see Activity#onRestoreInstanceState(Bundle)
*/
@Override
- protected void onRestoreInstanceState(@NonNull Bundle state) {
+ protected void onRestoreInstanceState(@NonNull final Bundle state) {
ensureList();
super.onRestoreInstanceState(state);
}
@@ -225,13 +227,13 @@ public class FragmentListActivity extends FragmentActivity {
/**
* Updates the screen state (current list and other views) when the
* content changes.
- *
+ *
* @see Activity#onContentChanged()
*/
@Override
public void onContentChanged() {
super.onContentChanged();
- View emptyView = findViewById(android.R.id.empty);
+ final View emptyView = findViewById(android.R.id.empty);
mList = (ListView)findViewById(android.R.id.list);
if (mList == null) {
throw new RuntimeException(
@@ -252,7 +254,7 @@ public class FragmentListActivity extends FragmentActivity {
/**
* Provide the cursor for the list view.
*/
- public void setListAdapter(ListAdapter adapter) {
+ public void setListAdapter(final ListAdapter adapter) {
synchronized (this) {
ensureList();
mAdapter = adapter;
@@ -263,10 +265,10 @@ public class FragmentListActivity extends FragmentActivity {
/**
* Set the currently selected list item to the specified
* position with the adapter's data
- *
+ *
* @param position
*/
- public void setSelection(int position) {
+ public void setSelection(final int position) {
mList.setSelection(position);
}
@@ -291,7 +293,7 @@ public class FragmentListActivity extends FragmentActivity {
ensureList();
return mList;
}
-
+
/**
* Get the ListAdapter associated with this activity's ListView.
*/
@@ -299,17 +301,18 @@ public class FragmentListActivity extends FragmentActivity {
return mAdapter;
}
+ @SuppressLint("InlinedApi")
private void ensureList() {
if (mList != null) {
return;
}
setContentView(android.R.layout.list_content);
-
+
}
- private AdapterView.OnItemClickListener mOnClickListener = new AdapterView.OnItemClickListener() {
+ private final AdapterView.OnItemClickListener mOnClickListener = new AdapterView.OnItemClickListener() {
@Override
- public void onItemClick(AdapterView<?> parent, View v, int position, long id)
+ public void onItemClick(final AdapterView<?> parent, final View v, final int position, final long id)
{
onListItemClick((ListView)parent, v, position, id);
}
diff --git a/main/thirdparty/com/viewpagerindicator/TitlePageIndicator.java b/main/thirdparty/com/viewpagerindicator/TitlePageIndicator.java
index 0f922c5..49181a2 100644
--- a/main/thirdparty/com/viewpagerindicator/TitlePageIndicator.java
+++ b/main/thirdparty/com/viewpagerindicator/TitlePageIndicator.java
@@ -21,6 +21,7 @@ import cgeo.geocaching.R;
import org.eclipse.jdt.annotation.NonNull;
+import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
@@ -67,12 +68,12 @@ public class TitlePageIndicator extends View implements PageIndicator {
public final int value;
- IndicatorStyle(int value) {
+ IndicatorStyle(final int value) {
this.value = value;
}
- public static IndicatorStyle fromValue(int value) {
- for (IndicatorStyle style : IndicatorStyle.values()) {
+ public static IndicatorStyle fromValue(final int value) {
+ for (final IndicatorStyle style : IndicatorStyle.values()) {
if (style.value == value) {
return style;
}
@@ -91,12 +92,12 @@ public class TitlePageIndicator extends View implements PageIndicator {
private boolean mBoldText;
private int mColorText;
private int mColorSelected;
- private Path mPath = new Path();
+ private final Path mPath = new Path();
private final Paint mPaintFooterLine;
private IndicatorStyle mFooterIndicatorStyle;
private final Paint mPaintFooterIndicator;
private float mFooterIndicatorHeight;
- private float mFooterIndicatorUnderlinePadding;
+ private final float mFooterIndicatorUnderlinePadding;
private float mFooterPadding;
private float mTitlePadding;
private float mTopPadding;
@@ -106,21 +107,21 @@ public class TitlePageIndicator extends View implements PageIndicator {
private static final int INVALID_POINTER = -1;
- private int mTouchSlop;
+ private final int mTouchSlop;
private float mLastMotionX = -1;
private int mActivePointerId = INVALID_POINTER;
private boolean mIsDragging;
- public TitlePageIndicator(Context context) {
+ public TitlePageIndicator(final Context context) {
this(context, null);
}
- public TitlePageIndicator(Context context, AttributeSet attrs) {
+ public TitlePageIndicator(final Context context, final AttributeSet attrs) {
this(context, attrs, R.attr.vpiTitlePageIndicatorStyle);
}
- public TitlePageIndicator(Context context, AttributeSet attrs, int defStyle) {
+ public TitlePageIndicator(final Context context, final AttributeSet attrs, final int defStyle) {
super(context, attrs, defStyle);
//Load defaults from resources
@@ -140,7 +141,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
final float defaultTopPadding = res.getDimension(R.dimen.default_title_indicator_top_padding);
//Retrieve styles attributes
- TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TitlePageIndicator, defStyle, R.style.Widget_TitlePageIndicator);
+ final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TitlePageIndicator, defStyle, R.style.Widget_TitlePageIndicator);
//Retrieve the colors to be used for this view and apply them.
mFooterLineHeight = a.getDimension(R.styleable.TitlePageIndicator_footerLineHeight, defaultFooterLineHeight);
@@ -179,7 +180,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
return mPaintFooterLine.getColor();
}
- public void setFooterColor(int footerColor) {
+ public void setFooterColor(final int footerColor) {
mPaintFooterLine.setColor(footerColor);
mPaintFooterIndicator.setColor(footerColor);
invalidate();
@@ -189,7 +190,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
return mFooterLineHeight;
}
- public void setFooterLineHeight(float footerLineHeight) {
+ public void setFooterLineHeight(final float footerLineHeight) {
mFooterLineHeight = footerLineHeight;
mPaintFooterLine.setStrokeWidth(mFooterLineHeight);
invalidate();
@@ -199,7 +200,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
return mFooterIndicatorHeight;
}
- public void setFooterIndicatorHeight(float footerTriangleHeight) {
+ public void setFooterIndicatorHeight(final float footerTriangleHeight) {
mFooterIndicatorHeight = footerTriangleHeight;
invalidate();
}
@@ -208,7 +209,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
return mFooterPadding;
}
- public void setFooterIndicatorPadding(float footerIndicatorPadding) {
+ public void setFooterIndicatorPadding(final float footerIndicatorPadding) {
mFooterPadding = footerIndicatorPadding;
invalidate();
}
@@ -217,7 +218,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
return mFooterIndicatorStyle;
}
- public void setFooterIndicatorStyle(IndicatorStyle indicatorStyle) {
+ public void setFooterIndicatorStyle(final IndicatorStyle indicatorStyle) {
mFooterIndicatorStyle = indicatorStyle;
invalidate();
}
@@ -226,7 +227,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
return mColorSelected;
}
- public void setSelectedColor(int selectedColor) {
+ public void setSelectedColor(final int selectedColor) {
mColorSelected = selectedColor;
invalidate();
}
@@ -235,7 +236,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
return mBoldText;
}
- public void setSelectedBold(boolean selectedBold) {
+ public void setSelectedBold(final boolean selectedBold) {
mBoldText = selectedBold;
invalidate();
}
@@ -244,7 +245,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
return mColorText;
}
- public void setTextColor(int textColor) {
+ public void setTextColor(final int textColor) {
mPaintText.setColor(textColor);
mColorText = textColor;
invalidate();
@@ -254,7 +255,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
return mPaintText.getTextSize();
}
- public void setTextSize(float textSize) {
+ public void setTextSize(final float textSize) {
mPaintText.setTextSize(textSize);
invalidate();
}
@@ -263,7 +264,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
return this.mTitlePadding;
}
- public void setTitlePadding(float titlePadding) {
+ public void setTitlePadding(final float titlePadding) {
mTitlePadding = titlePadding;
invalidate();
}
@@ -272,7 +273,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
return this.mTopPadding;
}
- public void setTopPadding(float topPadding) {
+ public void setTopPadding(final float topPadding) {
mTopPadding = topPadding;
invalidate();
}
@@ -281,7 +282,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
return this.mClipPadding;
}
- public void setClipPadding(float clipPadding) {
+ public void setClipPadding(final float clipPadding) {
mClipPadding = clipPadding;
invalidate();
}
@@ -292,7 +293,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
* @see android.view.View#onDraw(android.graphics.Canvas)
*/
@Override
- protected void onDraw(Canvas canvas) {
+ protected void onDraw(final Canvas canvas) {
super.onDraw(canvas);
if (mViewPager == null) {
@@ -304,7 +305,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
}
//Calculate views bounds
- ArrayList<RectF> bounds = calculateAllBounds(mPaintText);
+ final ArrayList<RectF> bounds = calculateAllBounds(mPaintText);
//Make sure we're on a page that still exists
if (mCurrentPage >= bounds.size()) {
@@ -333,8 +334,8 @@ public class TitlePageIndicator extends View implements PageIndicator {
final float selectedPercent = (SELECTION_FADE_PERCENTAGE - offsetPercent) / SELECTION_FADE_PERCENTAGE;
//Verify if the current view must be clipped to the screen
- RectF curPageBound = bounds.get(mCurrentPage);
- float curPageWidth = curPageBound.right - curPageBound.left;
+ final RectF curPageBound = bounds.get(mCurrentPage);
+ final float curPageWidth = curPageBound.right - curPageBound.left;
if (curPageBound.left < leftClip) {
//Try to clip to the screen (left side)
clipViewOnTheLeft(curPageBound, curPageWidth, left);
@@ -347,14 +348,14 @@ public class TitlePageIndicator extends View implements PageIndicator {
//Left views starting from the current position
if (mCurrentPage > 0) {
for (int i = mCurrentPage - 1; i >= 0; i--) {
- RectF bound = bounds.get(i);
+ final RectF bound = bounds.get(i);
//Is left side is outside the screen
if (bound.left < leftClip) {
- float w = bound.right - bound.left;
+ final float w = bound.right - bound.left;
//Try to clip to the screen (left side)
clipViewOnTheLeft(bound, w, left);
//Except if there's an intersection with the right view
- RectF rightBound = bounds.get(i + 1);
+ final RectF rightBound = bounds.get(i + 1);
//Intersection
if (bound.right + mTitlePadding > rightBound.left) {
bound.left = rightBound.left - w - mTitlePadding;
@@ -366,14 +367,14 @@ public class TitlePageIndicator extends View implements PageIndicator {
//Right views starting from the current position
if (mCurrentPage < countMinusOne) {
for (int i = mCurrentPage + 1 ; i < count; i++) {
- RectF bound = bounds.get(i);
+ final RectF bound = bounds.get(i);
//If right side is outside the screen
if (bound.right > rightClip) {
- float w = bound.right - bound.left;
+ final float w = bound.right - bound.left;
//Try to clip to the screen (right side)
clipViewOnTheRight(bound, w, right);
//Except if there's an intersection with the left view
- RectF leftBound = bounds.get(i - 1);
+ final RectF leftBound = bounds.get(i - 1);
//Intersection
if (bound.left - mTitlePadding < leftBound.right) {
bound.left = leftBound.right + mTitlePadding;
@@ -386,7 +387,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
//Now draw views
for (int i = 0; i < count; i++) {
//Get the title
- RectF bound = bounds.get(i);
+ final RectF bound = bounds.get(i);
//Only if one side is visible
if ((bound.left > left && bound.left < right) || (bound.right > left && bound.right < right)) {
final boolean currentPage = (i == page);
@@ -428,7 +429,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
break;
}
- RectF underlineBounds = bounds.get(page);
+ final RectF underlineBounds = bounds.get(page);
mPath.reset();
mPath.moveTo(underlineBounds.left - mFooterIndicatorUnderlinePadding, height - mFooterLineHeight);
mPath.lineTo(underlineBounds.right + mFooterIndicatorUnderlinePadding, height - mFooterLineHeight);
@@ -446,8 +447,9 @@ public class TitlePageIndicator extends View implements PageIndicator {
}
}
+ @SuppressLint("ClickableViewAccessibility")
@Override
- public boolean onTouchEvent(@NonNull android.view.MotionEvent ev) {
+ public boolean onTouchEvent(@NonNull final android.view.MotionEvent ev) {
if ((mViewPager == null) || (mViewPager.getAdapter().getCount() == 0)) {
return false;
}
@@ -537,7 +539,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
* @param curViewWidth
* width of the view.
*/
- private void clipViewOnTheRight(RectF curViewBound, float curViewWidth, int right) {
+ private void clipViewOnTheRight(final RectF curViewBound, final float curViewWidth, final int right) {
curViewBound.right = right - mClipPadding;
curViewBound.left = curViewBound.right - curViewWidth;
}
@@ -550,7 +552,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
* @param curViewWidth
* width of the view.
*/
- private void clipViewOnTheLeft(RectF curViewBound, float curViewWidth, int left) {
+ private void clipViewOnTheLeft(final RectF curViewBound, final float curViewWidth, final int left) {
curViewBound.left = left + mClipPadding;
curViewBound.right = mClipPadding + curViewWidth;
}
@@ -562,16 +564,16 @@ public class TitlePageIndicator extends View implements PageIndicator {
* @param currentIndex
* @return
*/
- private ArrayList<RectF> calculateAllBounds(Paint paint) {
- ArrayList<RectF> list = new ArrayList<RectF>();
+ private ArrayList<RectF> calculateAllBounds(final Paint paint) {
+ final ArrayList<RectF> list = new ArrayList<RectF>();
//For each views (If no values then add a fake one)
final int count = mViewPager.getAdapter().getCount();
final int width = getWidth();
final int halfWidth = width / 2;
for (int i = 0; i < count; i++) {
- RectF bounds = calcBounds(i, paint);
- float w = (bounds.right - bounds.left);
- float h = (bounds.bottom - bounds.top);
+ final RectF bounds = calcBounds(i, paint);
+ final float w = (bounds.right - bounds.left);
+ final float h = (bounds.bottom - bounds.top);
bounds.left = (halfWidth) - (w / 2) - mCurrentOffset + ((i - mCurrentPage) * width);
bounds.right = bounds.left + w;
bounds.top = 0;
@@ -589,16 +591,16 @@ public class TitlePageIndicator extends View implements PageIndicator {
* @param paint
* @return
*/
- private RectF calcBounds(int index, Paint paint) {
+ private RectF calcBounds(final int index, final Paint paint) {
//Calculate the text bounds
- RectF bounds = new RectF();
+ final RectF bounds = new RectF();
bounds.right = paint.measureText(mTitleProvider.getTitle(index));
bounds.bottom = paint.descent() - paint.ascent();
return bounds;
}
@Override
- public void setViewPager(ViewPager view) {
+ public void setViewPager(final ViewPager view) {
final PagerAdapter adapter = view.getAdapter();
if (adapter == null) {
throw new IllegalStateException("ViewPager does not have adapter instance.");
@@ -613,7 +615,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
}
@Override
- public void setViewPager(ViewPager view, int initialPosition) {
+ public void setViewPager(final ViewPager view, final int initialPosition) {
setViewPager(view);
setCurrentItem(initialPosition);
}
@@ -624,7 +626,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
}
@Override
- public void setCurrentItem(int item) {
+ public void setCurrentItem(final int item) {
if (mViewPager == null) {
throw new IllegalStateException("ViewPager has not been bound.");
}
@@ -634,7 +636,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
}
@Override
- public void onPageScrollStateChanged(int state) {
+ public void onPageScrollStateChanged(final int state) {
mScrollState = state;
if (mListener != null) {
@@ -643,7 +645,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
}
@Override
- public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
+ public void onPageScrolled(final int position, final float positionOffset, final int positionOffsetPixels) {
mCurrentPage = position;
mCurrentOffset = positionOffsetPixels;
invalidate();
@@ -654,7 +656,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
}
@Override
- public void onPageSelected(int position) {
+ public void onPageSelected(final int position) {
if (mScrollState == ViewPager.SCROLL_STATE_IDLE) {
mCurrentPage = position;
invalidate();
@@ -666,7 +668,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
}
@Override
- public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
+ public void setOnPageChangeListener(final ViewPager.OnPageChangeListener listener) {
mListener = listener;
}
@@ -676,7 +678,7 @@ public class TitlePageIndicator extends View implements PageIndicator {
* @see android.view.View#onMeasure(int, int)
*/
@Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ protected void onMeasure(final int widthMeasureSpec, final int heightMeasureSpec) {
setMeasuredDimension(measureWidth(widthMeasureSpec), measureHeight(heightMeasureSpec));
}
@@ -687,9 +689,9 @@ public class TitlePageIndicator extends View implements PageIndicator {
* A measureSpec packed into an int
* @return The width of the view, honoring constraints from measureSpec
*/
- private int measureWidth(int measureSpec) {
- int specMode = MeasureSpec.getMode(measureSpec);
- int specSize = MeasureSpec.getSize(measureSpec);
+ private int measureWidth(final int measureSpec) {
+ final int specMode = MeasureSpec.getMode(measureSpec);
+ final int specSize = MeasureSpec.getSize(measureSpec);
if (specMode != MeasureSpec.EXACTLY) {
throw new IllegalStateException(getClass().getSimpleName() + " can only be used in EXACTLY mode.");
@@ -704,17 +706,17 @@ public class TitlePageIndicator extends View implements PageIndicator {
* A measureSpec packed into an int
* @return The height of the view, honoring constraints from measureSpec
*/
- private int measureHeight(int measureSpec) {
+ private int measureHeight(final int measureSpec) {
float result;
- int specMode = MeasureSpec.getMode(measureSpec);
- int specSize = MeasureSpec.getSize(measureSpec);
+ final int specMode = MeasureSpec.getMode(measureSpec);
+ final int specSize = MeasureSpec.getSize(measureSpec);
if (specMode == MeasureSpec.EXACTLY) {
//We were told how big to be
result = specSize;
} else {
//Calculate the text bounds
- RectF bounds = new RectF();
+ final RectF bounds = new RectF();
bounds.bottom = mPaintText.descent()-mPaintText.ascent();
result = bounds.bottom - bounds.top + mFooterLineHeight + mFooterPadding + mTopPadding;
if (mFooterIndicatorStyle != IndicatorStyle.None) {
@@ -725,8 +727,8 @@ public class TitlePageIndicator extends View implements PageIndicator {
}
@Override
- public void onRestoreInstanceState(Parcelable state) {
- SavedState savedState = (SavedState)state;
+ public void onRestoreInstanceState(final Parcelable state) {
+ final SavedState savedState = (SavedState)state;
super.onRestoreInstanceState(savedState.getSuperState());
mCurrentPage = savedState.currentPage;
requestLayout();
@@ -734,8 +736,8 @@ public class TitlePageIndicator extends View implements PageIndicator {
@Override
public Parcelable onSaveInstanceState() {
- Parcelable superState = super.onSaveInstanceState();
- SavedState savedState = new SavedState(superState);
+ final Parcelable superState = super.onSaveInstanceState();
+ final SavedState savedState = new SavedState(superState);
savedState.currentPage = mCurrentPage;
return savedState;
}
@@ -743,29 +745,29 @@ public class TitlePageIndicator extends View implements PageIndicator {
static class SavedState extends BaseSavedState {
int currentPage;
- public SavedState(Parcelable superState) {
+ public SavedState(final Parcelable superState) {
super(superState);
}
- private SavedState(Parcel in) {
+ private SavedState(final Parcel in) {
super(in);
currentPage = in.readInt();
}
@Override
- public void writeToParcel(@NonNull Parcel dest, int flags) {
+ public void writeToParcel(@NonNull final Parcel dest, final int flags) {
super.writeToParcel(dest, flags);
dest.writeInt(currentPage);
}
public static final Parcelable.Creator<SavedState> CREATOR = new Parcelable.Creator<SavedState>() {
@Override
- public SavedState createFromParcel(Parcel in) {
+ public SavedState createFromParcel(final Parcel in) {
return new SavedState(in);
}
@Override
- public SavedState[] newArray(int size) {
+ public SavedState[] newArray(final int size) {
return new SavedState[size];
}
};
diff --git a/main/version.properties b/main/version.properties
new file mode 100644
index 0000000..67edd0d
--- /dev/null
+++ b/main/version.properties
@@ -0,0 +1,21 @@
+#
+# Copyright 2014 Google Inc.
+#
+# 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.
+#
+
+code = 1000
+name = 0.0.1
+
+# Latest beta number for this version. Only applies to beta builds.
+betaNumber = Beta 1
diff --git a/mapswithme-api/.settings/org.eclipse.jdt.core.prefs b/mapswithme-api/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..48ab4c6
--- /dev/null
+++ b/mapswithme-api/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/mapswithme-api/build.gradle b/mapswithme-api/build.gradle
index 12dac15..fec7ad7 100644
--- a/mapswithme-api/build.gradle
+++ b/mapswithme-api/build.gradle
@@ -6,7 +6,7 @@ dependencies {
android {
compileSdkVersion 19
- buildToolsVersion "19"
+ buildToolsVersion "19.1.0"
sourceSets {
main {
diff --git a/mapswithme-api/mapswithme-api.iml b/mapswithme-api/mapswithme-api.iml
index 488455c..4d01e37 100644
--- a/mapswithme-api/mapswithme-api.iml
+++ b/mapswithme-api/mapswithme-api.iml
@@ -17,7 +17,6 @@
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
- <output url="file://$MODULE_DIR$/bin/classes" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
diff --git a/send2cgeo/chrome-extension/manifest.json b/send2cgeo/chrome-extension/manifest.json
new file mode 100644
index 0000000..95ef37f
--- /dev/null
+++ b/send2cgeo/chrome-extension/manifest.json
@@ -0,0 +1,17 @@
+{
+"manifest_version": 2,
+ "content_scripts": [ {
+ "exclude_globs": [ ],
+ "exclude_matches": [ ],
+ "include_globs": [ "*" ],
+ "js": [ "send2cgeo.user.js" ],
+ "matches": [ "http://www.geocaching.com/seek/cache_details*", "https://www.geocaching.com/map/*", "http://www.geocaching.com/geocache/*", "http://www.geocaching.com/my/recentlyviewedcaches*", "http://www.geocaching.com/seek/nearest*"],
+ "run_at": "document_idle"
+ } ],
+ "converted_from_user_script": true,
+ "description": "Add button \"Send to c:geo\" to geocaching.com",
+ "key": "cJNjvsbX8OJfu/rUgwp/ZB7itpC5X0700m0HNcUDsLE=",
+ "name": "Send to c:geo",
+ "icons": { "64": "send2cgeo.64.png", "48": "send2cgeo.48.png" },
+ "version": "0.30"
+}
diff --git a/send2cgeo/chrome-extension/send2cgeo.48.png b/send2cgeo/chrome-extension/send2cgeo.48.png
new file mode 100644
index 0000000..585c6a5
--- /dev/null
+++ b/send2cgeo/chrome-extension/send2cgeo.48.png
Binary files differ
diff --git a/send2cgeo/chrome-extension/send2cgeo.64.png b/send2cgeo/chrome-extension/send2cgeo.64.png
new file mode 100644
index 0000000..646e5c6
--- /dev/null
+++ b/send2cgeo/chrome-extension/send2cgeo.64.png
Binary files differ
diff --git a/send2cgeo/chrome-extension/send2cgeo.user.js b/send2cgeo/chrome-extension/send2cgeo.user.js
new file mode 100644
index 0000000..bba0f3b
--- /dev/null
+++ b/send2cgeo/chrome-extension/send2cgeo.user.js
@@ -0,0 +1,107 @@
+// ==UserScript==
+// @name Send to c:geo
+// @namespace http://send2.cgeo.org/
+// @description Add button "Send to c:geo" to geocaching.com
+// @grant none
+// @include http://www.geocaching.com/seek/cache_details*
+// @include https://www.geocaching.com/map/*
+// @include http://www.geocaching.com/geocache/*
+// @include http://www.geocaching.com/my/recentlyviewedcaches*
+// @include http://www.geocaching.com/seek/nearest*
+// @icon http://send2.cgeo.org/content/images/logo.png
+// @downloadURL https://send2.cgeo.org/send2cgeo.user.js
+// @updateURL https://send2.cgeo.org/send2cgeo.user.js
+// @version 0.30
+// ==/UserScript==
+
+// Inserts javascript that will be called by the s2cgeo button. The closure
+// look strange, but avoids having to escape the code. Almost everything
+// is put into that script element so that geocaching.com's jQuery may be
+// accessed.
+
+var s = document.createElement('script');
+s.type = 'text/javascript';
+s.textContent = '(' + function() {
+ // function that handles the actual sending //////////////////////////////////
+
+ window.s2geo = function(code) {
+ // show the box and the "please wait" text
+ $('#send2cgeo, #send2cgeo div').fadeIn();
+ // hide iframe for now and wait for page to be loaded
+ $('#send2cgeo iframe')
+ .hide()
+ .unbind('load')
+ .attr('src', 'https://send2.cgeo.org/add.html?cache='+code)
+ .load(function() {
+ // hide "please wait text" and show iframe
+ $('#send2cgeo div').hide();
+ // hide box after 3 seconds
+ $(this).css('display', 'block').parent().delay(3000).fadeOut();
+ });
+ };
+
+
+ // Defines the elements to insert into the page //////////////////////////////
+ var boxWidth = 20,
+ boxHeight = 7;
+
+ var boxStyle = 'display:none; background:#1D1D1D; z-index:1000; left:50%;'
+ + 'box-shadow:0 0 0.5em #000; padding:0; border:0; '
+ + 'position:fixed; top:0.5em; text-align:center; '
+ + 'margin-left:-'+(boxWidth/2)+'em; line-height:'+boxHeight+'em;'
+ + 'width:'+boxWidth+'em; height:'+boxHeight+'em; color: #fff';
+ var waitStyle = 'width: '+boxWidth+'em; color: #fff';
+ var iframeStyle = 'border:0; width:'+boxWidth+'em; height: '+boxHeight+'em';
+
+ $('body').append('<div id="send2cgeo" style="'+boxStyle+'">'
+ + '<div style="'+waitStyle+'">Please wait&hellip;</div>'
+ + '<iframe style="'+iframeStyle+'"></iframe>'
+ + '</div>');
+
+
+ // Append to send2cgeo links/buttons /////////////////////////////////////////
+ var map = document.getElementById('cacheDetailsTemplate');
+
+ if(map !== null) {
+ // geocaching.com map view
+ var html = 'Log Visit</span></a>'
+ + '<a class="lnk ui-block-b" '
+ + 'href="https://send2.cgeo.org/add.html?cache={{=gc}}" '
+ + 'onclick="window.s2geo(\'{{=gc}}\'); return false;" '
+ + 'class="lnk">'
+ + '<img src="/images/sendtogps/sendtogps_icon.png" '
+ + 'align="absmiddle" border="0"> '
+ + '<span>Send to c:geo</span>';
+
+ map.innerHTML = map.innerHTML.replace('Log Visit</span>', html);
+ } else if(document.getElementById('ctl00_ContentBody_CoordInfoLinkControl1_uxCoordInfoCode') != null){
+ // geocaching.com cache detail page
+ var GCCode = $('#ctl00_ContentBody_CoordInfoLinkControl1_uxCoordInfoCode')
+ .html();
+
+ var html = '<input type="button" '
+ + 'value="Send to c:geo" '
+ + 'onclick="window.s2geo(\''+GCCode+'\'); '
+ + 'return false;" '
+ + '/>';
+
+ $('#Download p:last').append(html);
+ $('#Download dd:last').append(html);
+ } else {
+ // geocaching.com recentlyviewed
+ $('img[src="/images/icons/16/send_to_gps.png"]').each(function(){
+ $(this).attr('alt', "Send to c:geo").attr('title', "Send to c:geo");
+ });
+ $('a[title="Send to GPS"]').each(function(){
+ var text = $(this).parent().parent().find(".Merge").last().find(".small").first().text().split("|");
+ var GCCode = text[text.length - 2].trim();
+ this.href="javascript:window.s2geo('"+GCCode+"')";
+ this.title = "Send to c:geo";
+ });
+
+ }
+} + ')();';
+
+// Inject Script. Can't use jQuery yet, because the page is not
+// accessible from Tampermonkey
+document.getElementsByTagName("head")[0].appendChild(s); \ No newline at end of file
diff --git a/send2cgeo/send2cgeo.user.js b/send2cgeo/send2cgeo.user.js
index 3a7f6c7..a9f6664 100644
--- a/send2cgeo/send2cgeo.user.js
+++ b/send2cgeo/send2cgeo.user.js
@@ -2,14 +2,16 @@
// @name Send to c:geo
// @namespace http://send2.cgeo.org/
// @description Add button "Send to c:geo" to geocaching.com
+// @grant none
// @include http://www.geocaching.com/seek/cache_details*
-// @include http://www.geocaching.com/map/*
+// @include https://www.geocaching.com/map/*
// @include http://www.geocaching.com/geocache/*
// @include http://www.geocaching.com/my/recentlyviewedcaches*
// @include http://www.geocaching.com/seek/nearest*
// @icon http://send2.cgeo.org/content/images/logo.png
-// @updateURL http://send2.cgeo.org/send2cgeo.user.js
-// @version 0.29
+// @downloadURL https://send2.cgeo.org/send2cgeo.user.js
+// @updateURL https://send2.cgeo.org/send2cgeo.user.js
+// @version 0.30
// ==/UserScript==
// Inserts javascript that will be called by the s2cgeo button. The closure
@@ -29,7 +31,7 @@ s.textContent = '(' + function() {
$('#send2cgeo iframe')
.hide()
.unbind('load')
- .attr('src', 'http://send2.cgeo.org/add.html?cache='+code)
+ .attr('src', 'https://send2.cgeo.org/add.html?cache='+code)
.load(function() {
// hide "please wait text" and show iframe
$('#send2cgeo div').hide();
@@ -62,9 +64,9 @@ s.textContent = '(' + function() {
if(map !== null) {
// geocaching.com map view
- var html = 'Log Visit</span></a> <br /> '
+ var html = 'Log Visit</span></a>'
+ '<a class="lnk ui-block-b" '
- + 'href="http://send2.cgeo.org/add.html?cache={{=gc}}" '
+ + 'href="https://send2.cgeo.org/add.html?cache={{=gc}}" '
+ 'onclick="window.s2geo(\'{{=gc}}\'); return false;" '
+ 'class="lnk">'
+ '<img src="/images/sendtogps/sendtogps_icon.png" '
@@ -77,7 +79,7 @@ s.textContent = '(' + function() {
var GCCode = $('#ctl00_ContentBody_CoordInfoLinkControl1_uxCoordInfoCode')
.html();
- var html = ' | <input type="button" '
+ var html = '<input type="button" '
+ 'value="Send to c:geo" '
+ 'onclick="window.s2geo(\''+GCCode+'\'); '
+ 'return false;" '
@@ -100,6 +102,6 @@ s.textContent = '(' + function() {
}
} + ')();';
-// Inject Script. Can’t use jQuery yet, because the page is not
+// Inject Script. Can't use jQuery yet, because the page is not
// accessible from Tampermonkey
document.getElementsByTagName("head")[0].appendChild(s);
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..9108f7f
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,5 @@
+include ':mapswithme-api'
+include ':main'
+//include ':cgeo-calendar'
+//include ':cgeo-contacts'
+
diff --git a/tests/.settings/org.eclipse.jdt.core.prefs b/tests/.settings/org.eclipse.jdt.core.prefs
index fd37b9b..e9dd68c 100644
--- a/tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tests/.settings/org.eclipse.jdt.core.prefs
@@ -6,9 +6,10 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -96,7 +97,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/tests/lint.xml b/tests/lint.xml
new file mode 100644
index 0000000..88294aa
--- /dev/null
+++ b/tests/lint.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<lint>
+ <issue id="Assert" severity="ignore" />
+ <issue id="IconMissingDensityFolder" severity="ignore" />
+</lint> \ No newline at end of file
diff --git a/tests/proguard-project.txt b/tests/proguard-project.txt
index f0b04dc..20b2222 100644
--- a/tests/proguard-project.txt
+++ b/tests/proguard-project.txt
@@ -1,40 +1,20 @@
--optimizationpasses 5
--dontusemixedcaseclassnames
--dontskipnonpubliclibraryclasses
--dontpreverify
--verbose
--optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
+# 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
--keep public class * extends android.app.Activity
--keep public class * extends android.app.Application
--keep public class * extends android.app.Service
--keep public class * extends android.content.BroadcastReceiver
--keep public class * extends android.content.ContentProvider
--keep public class * extends android.app.backup.BackupAgentHelper
--keep public class * extends android.preference.Preference
--keep public class com.android.vending.licensing.ILicensingService
+# Add any project specific keep options here:
--keepclasseswithmembernames class * {
- native <methods>;
-}
-
--keepclasseswithmembers class * {
- public <init>(android.content.Context, android.util.AttributeSet);
-}
-
--keepclasseswithmembers class * {
- public <init>(android.content.Context, android.util.AttributeSet, int);
-}
-
--keepclassmembers class * extends android.app.Activity {
- public void *(android.view.View);
-}
-
--keepclassmembers enum * {
- public static **[] values();
- public static ** valueOf(java.lang.String);
-}
-
--keep class * implements android.os.Parcelable {
- public static final android.os.Parcelable$Creator *;
-}
+# 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 *;
+#} \ No newline at end of file
diff --git a/tests/project.properties b/tests/project.properties
index 90d918c..521e9f0 100644
--- a/tests/project.properties
+++ b/tests/project.properties
@@ -12,3 +12,5 @@ target=Google Inc.:Google APIs:19
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+java.source=1.7
+java.target=1.7 \ No newline at end of file
diff --git a/tests/src/cgeo/CGeoTestCase.java b/tests/src/cgeo/CGeoTestCase.java
index 7dd5956..5759bc7 100644
--- a/tests/src/cgeo/CGeoTestCase.java
+++ b/tests/src/cgeo/CGeoTestCase.java
@@ -39,7 +39,7 @@ public abstract class CGeoTestCase extends ApplicationTestCase<CgeoApplication>
*/
protected static void removeCacheCompletely(final String geocode) {
final EnumSet<RemoveFlag> flags = EnumSet.copyOf(LoadFlags.REMOVE_ALL);
- flags.add(RemoveFlag.REMOVE_OWN_WAYPOINTS_ONLY_FOR_TESTING);
+ flags.add(RemoveFlag.OWN_WAYPOINTS_ONLY_FOR_TESTING);
DataStore.removeCache(geocode, flags);
}
diff --git a/tests/src/cgeo/geocaching/CgeoApplicationTest.java b/tests/src/cgeo/geocaching/CgeoApplicationTest.java
index 3e63481..ae182d7 100644
--- a/tests/src/cgeo/geocaching/CgeoApplicationTest.java
+++ b/tests/src/cgeo/geocaching/CgeoApplicationTest.java
@@ -79,8 +79,8 @@ public class CgeoApplicationTest extends CGeoTestCase {
assertThat(tb.getIconUrl()).isEqualTo("http://www.geocaching.com/images/wpttypes/21.gif");
assertThat(tb.getName()).isEqualTo("blafoo's Children Music CD");
assertThat(tb.getType()).isEqualTo("Travel Bug Dog Tag");
- assertEquals(new GregorianCalendar(2009, 8 - 1, 24).getTime(), tb.getReleased());
- assertEquals("Niedersachsen, Germany", tb.getOrigin());
+ assertThat(tb.getReleased()).isEqualTo(new GregorianCalendar(2009, 8 - 1, 24).getTime());
+ assertThat(tb.getOrigin()).isEqualTo("Niedersachsen, Germany");
assertThat(tb.getOwner()).isEqualTo("blafoo");
assertThat(tb.getOwnerGuid()).isEqualTo("0564a940-8311-40ee-8e76-7e91b2cf6284");
assertThat(tb.getGoal()).isEqualTo("Kinder erfreuen.<br /><br />Make children happy.");
@@ -158,6 +158,7 @@ public class CgeoApplicationTest extends CGeoTestCase {
public static void testSearchByGeocodeNotLoggedIn() {
withMockedLoginDo(new Runnable() {
+ @Override
public void run() {
// non premium cache
MockedCache cache = new GC2CJPF();
@@ -193,6 +194,7 @@ public class CgeoApplicationTest extends CGeoTestCase {
public static void testSearchErrorOccured() {
withMockedLoginDo(new Runnable() {
+ @Override
public void run() {
// non premium cache
final MockedCache cache = new GC1ZXX2();
@@ -342,6 +344,7 @@ public class CgeoApplicationTest extends CGeoTestCase {
public static void testSearchByViewportNotLoggedIn() {
withMockedLoginDo(new Runnable() {
+ @Override
public void run() {
final Strategy strategy = Settings.getLiveMapStrategy();
final Strategy testStrategy = Strategy.FAST; // FASTEST, FAST or DETAILED for tests
@@ -415,7 +418,7 @@ public class CgeoApplicationTest extends CGeoTestCase {
*/
public static void testSearchByGeocodeSpecialties() {
final Geocache GCV2R9 = CgeoApplicationTest.testSearchByGeocode("GCV2R9");
- assertEquals("California, United States", GCV2R9.getLocation());
+ assertThat(GCV2R9.getLocation()).isEqualTo("California, United States");
final Geocache GC1ZXEZ = CgeoApplicationTest.testSearchByGeocode("GC1ZXEZ");
assertThat(GC1ZXEZ.getOwnerUserId()).isEqualTo("Ms.Marple/Mr.Stringer");
diff --git a/tests/src/cgeo/geocaching/DataStoreTest.java b/tests/src/cgeo/geocaching/DataStoreTest.java
index 93d76a1..3579cc5 100644
--- a/tests/src/cgeo/geocaching/DataStoreTest.java
+++ b/tests/src/cgeo/geocaching/DataStoreTest.java
@@ -121,7 +121,7 @@ public class DataStoreTest extends CGeoTestCase {
cache.setInventory(inventory);
try {
- DataStore.saveCache(cache, EnumSet.of(SaveFlag.SAVE_DB));
+ DataStore.saveCache(cache, EnumSet.of(SaveFlag.DB));
final Geocache loadedCache = DataStore.loadCache(GEOCODE_CACHE, LoadFlags.LOAD_ALL_DB_ONLY);
assertThat(loadedCache).overridingErrorMessage("Cache was not saved.").isNotNull();
assertThat(loadedCache.getInventory()).hasSize(1);
@@ -147,7 +147,7 @@ public class DataStoreTest extends CGeoTestCase {
final Geocache oldCache = DataStore.loadCache(upperCase, LoadFlags.LOAD_ALL_DB_ONLY);
assertThat(oldCache).as("Old cache").isNull();
- DataStore.saveCache(cache, EnumSet.of(SaveFlag.SAVE_DB));
+ DataStore.saveCache(cache, EnumSet.of(SaveFlag.DB));
final Geocache cacheWithOriginalCode = DataStore.loadCache(upperCase, LoadFlags.LOAD_ALL_DB_ONLY);
assertThat(cacheWithOriginalCode).overridingErrorMessage("Cache was not saved correctly!").isNotNull();
@@ -210,11 +210,11 @@ public class DataStoreTest extends CGeoTestCase {
inTileHighZoom.setCoords(new Geopoint("N49 44.001 E8 37.001"), Tile.ZOOMLEVEL_MIN_PERSONALIZED + 1);
// put in cache
- DataStore.saveCache(main, EnumSet.of(SaveFlag.SAVE_CACHE));
- DataStore.saveCache(inTileLowZoom, EnumSet.of(SaveFlag.SAVE_CACHE));
- DataStore.saveCache(inTileHighZoom, EnumSet.of(SaveFlag.SAVE_CACHE));
- DataStore.saveCache(outTile, EnumSet.of(SaveFlag.SAVE_CACHE));
- DataStore.saveCache(otherConnector, EnumSet.of(SaveFlag.SAVE_CACHE));
+ DataStore.saveCache(main, EnumSet.of(SaveFlag.CACHE));
+ DataStore.saveCache(inTileLowZoom, EnumSet.of(SaveFlag.CACHE));
+ DataStore.saveCache(inTileHighZoom, EnumSet.of(SaveFlag.CACHE));
+ DataStore.saveCache(outTile, EnumSet.of(SaveFlag.CACHE));
+ DataStore.saveCache(otherConnector, EnumSet.of(SaveFlag.CACHE));
final SearchResult search = new SearchResult(main);
diff --git a/tests/src/cgeo/geocaching/StaticMapsProviderTest.java b/tests/src/cgeo/geocaching/StaticMapsProviderTest.java
index 02c6660..42ad2c5 100644
--- a/tests/src/cgeo/geocaching/StaticMapsProviderTest.java
+++ b/tests/src/cgeo/geocaching/StaticMapsProviderTest.java
@@ -7,13 +7,14 @@ import cgeo.geocaching.files.LocalStorage;
import cgeo.geocaching.geopoint.Geopoint;
import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.settings.TestSettings;
+import cgeo.geocaching.utils.RxUtils;
+
+import junit.framework.TestCase;
import android.test.suitebuilder.annotation.Suppress;
import java.io.File;
-import junit.framework.TestCase;
-
@Suppress
public class StaticMapsProviderTest extends TestCase {
@@ -52,7 +53,7 @@ public class StaticMapsProviderTest extends TestCase {
assertThat(StaticMapsProvider.hasStaticMapForWaypoint(geocode, trailhead)).isFalse();
// download
- StaticMapsProvider.downloadMaps(cache);
+ RxUtils.waitForCompletion(StaticMapsProvider.downloadMaps(cache));
try {
Thread.sleep(10000);
diff --git a/tests/src/cgeo/geocaching/apps/cache/WhereYouGoAppTest.java b/tests/src/cgeo/geocaching/apps/cache/WhereYouGoAppTest.java
new file mode 100644
index 0000000..5290c35
--- /dev/null
+++ b/tests/src/cgeo/geocaching/apps/cache/WhereYouGoAppTest.java
@@ -0,0 +1,15 @@
+package cgeo.geocaching.apps.cache;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import cgeo.geocaching.Geocache;
+
+import junit.framework.TestCase;
+
+public class WhereYouGoAppTest extends TestCase {
+ public static void testGetWhereIGoUrl() throws Exception {
+ Geocache cache = new Geocache();
+ cache.setDescription("<p style=\"max-width:670px;\"><a href=\"http://www.wherigo.com/cartridge/details.aspx?CGUID=c4577c31-09e9-44f0-ae48-83737e57adbd\"><img class=\"InsideTable\"");
+ assertThat(WhereYouGoApp.getWhereIGoUrl(cache)).isEqualTo("http://www.wherigo.com/cartridge/details.aspx?CGUID=c4577c31-09e9-44f0-ae48-83737e57adbd");
+ }
+}
diff --git a/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java b/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java
index be0c4da..ef50709 100644
--- a/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java
+++ b/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java
@@ -16,9 +16,9 @@ public class GCConstantsTest extends AndroidTestCase {
public static void testLocation() {
// GC37GFJ
- assertEquals("Bretagne, France", parseLocation(" <span id=\"ctl00_ContentBody_Location\">In Bretagne, France</span><br />"));
+ assertThat(parseLocation(" <span id=\"ctl00_ContentBody_Location\">In Bretagne, France</span><br />")).isEqualTo("Bretagne, France");
// GCV2R9
- assertEquals("California, United States", parseLocation("<span id=\"ctl00_ContentBody_Location\">In <a href=\"/map/beta/default.aspx?lat=37.4354&lng=-122.07745&z=16\" title=\"View Map\">California, United States</a></span><br />"));
+ assertThat(parseLocation("<span id=\"ctl00_ContentBody_Location\">In <a href=\"/map/beta/default.aspx?lat=37.4354&lng=-122.07745&z=16\" title=\"View Map\">California, United States</a></span><br />")).isEqualTo("California, United States");
}
private static String parseLocation(final String html) {
@@ -55,16 +55,16 @@ public class GCConstantsTest extends AndroidTestCase {
public static void testConstants() {
final String session = "userSession = new Groundspeak.Map.UserSession('aKWZ', userOptions:'XPTf', sessionToken:'123pNKwdktYGZL0xd-I7yqA6nm_JE1BDUtM4KcOkifin2TRCMutBd_PZE14Ohpffs2ZgkTnxTSnxYpBigK4hBA2', subscriberType: 3, enablePersonalization: true });";
- assertEquals("aKWZ", TextUtils.getMatch(session, GCConstants.PATTERN_USERSESSION, ""));
+ assertThat(TextUtils.getMatch(session, GCConstants.PATTERN_USERSESSION, "")).isEqualTo("aKWZ");
assertThat(TextUtils.getMatch(session, GCConstants.PATTERN_SESSIONTOKEN, "").startsWith("123pNK")).isTrue();
}
public static void testTBWithSpecialChar() {
// Incidentally, the site incorrectly escapes the "&" into "&amp;"
final String page = "<span id=\"ctl00_ContentBody_lbHeading\">Schlauchen&amp;ravestorm</span>";
- assertEquals("Schlauchen&ravestorm", Html.fromHtml(TextUtils.getMatch(page, GCConstants.PATTERN_TRACKABLE_NAME, "")).toString());
+ assertThat(Html.fromHtml(TextUtils.getMatch(page, GCConstants.PATTERN_TRACKABLE_NAME, "")).toString()).isEqualTo("Schlauchen&ravestorm");
// Test with the current incorrect form as well
final String page2 = "<span id=\"ctl00_ContentBody_lbHeading\">Schlauchen&ravestorm</span>";
- assertEquals("Schlauchen&ravestorm", Html.fromHtml(TextUtils.getMatch(page2, GCConstants.PATTERN_TRACKABLE_NAME, "")).toString());
+ assertThat(Html.fromHtml(TextUtils.getMatch(page2, GCConstants.PATTERN_TRACKABLE_NAME, "")).toString()).isEqualTo("Schlauchen&ravestorm");
}
}
diff --git a/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java b/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java
index 2897b54..1c64568 100644
--- a/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java
+++ b/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java
@@ -36,7 +36,7 @@ public class GCParserTest extends AbstractResourceInstrumentationTestCase {
private void assertUnpublished(final int cache) {
final String page = getFileContent(cache);
- final SearchResult result = GCParser.parseCacheFromText(page, null);
+ final SearchResult result = GCParser.parseAndSaveCacheFromText(page, null);
assertThat(result).isNotNull();
assertThat(result.isEmpty()).isTrue();
assertThat(result.getError()).isEqualTo(StatusCode.UNPUBLISHED_CACHE);
@@ -52,7 +52,7 @@ public class GCParserTest extends AbstractResourceInstrumentationTestCase {
private void assertPublishedCache(final int cachePage, final String cacheName) {
final String page = getFileContent(cachePage);
- final SearchResult result = GCParser.parseCacheFromText(page, null);
+ final SearchResult result = GCParser.parseAndSaveCacheFromText(page, null);
assertThat(result).isNotNull();
assertThat(result.getCount()).isEqualTo(1);
final Geocache cache = result.getFirstCacheFromResult(LoadFlags.LOAD_CACHE_OR_DB);
@@ -79,7 +79,7 @@ public class GCParserTest extends AbstractResourceInstrumentationTestCase {
final SearchResult searchResult;
try {
Settings.setGcCustomDate(MockedCache.getDateFormat());
- searchResult = GCParser.parseCacheFromText(mockedCache.getData(), null);
+ searchResult = GCParser.parseAndSaveCacheFromText(mockedCache.getData(), null);
} finally {
Settings.setGcCustomDate(oldCustomDate);
}
@@ -103,7 +103,7 @@ public class GCParserTest extends AbstractResourceInstrumentationTestCase {
for (MockedCache mockedCache : RegExPerformanceTest.MOCKED_CACHES) {
// to get the same results we have to use the date format used when the mocked data was created
Settings.setGcCustomDate(MockedCache.getDateFormat());
- SearchResult searchResult = GCParser.parseCacheFromText(mockedCache.getData(), null);
+ SearchResult searchResult = GCParser.parseAndSaveCacheFromText(mockedCache.getData(), null);
Geocache parsedCache = searchResult.getFirstCacheFromResult(LoadFlags.LOAD_CACHE_OR_DB);
assertThat(StringUtils.isNotBlank(mockedCache.getMockedDataUser())).isTrue();
Compare.assertCompareCaches(mockedCache, parsedCache, true);
@@ -158,7 +158,7 @@ public class GCParserTest extends AbstractResourceInstrumentationTestCase {
GCParser.editModifiedCoordinates(cache, new Geopoint("N51 21.544", "E07 02.566"));
cache.dropSynchronous();
final String page = GCParser.requestHtmlPage(cache.getGeocode(), null, "n", "0");
- final Geocache cache2 = GCParser.parseCacheFromText(page, null).getFirstCacheFromResult(LoadFlags.LOAD_CACHE_ONLY);
+ final Geocache cache2 = GCParser.parseAndSaveCacheFromText(page, null).getFirstCacheFromResult(LoadFlags.LOAD_CACHE_ONLY);
assertThat(cache2).isNotNull();
assert (cache2 != null); // eclipse bug
assertThat(cache2.hasUserModifiedCoords()).isTrue();
@@ -167,7 +167,7 @@ public class GCParserTest extends AbstractResourceInstrumentationTestCase {
GCParser.deleteModifiedCoordinates(cache2);
cache2.dropSynchronous();
final String page2 = GCParser.requestHtmlPage(cache.getGeocode(), null, "n", "0");
- final Geocache cache3 = GCParser.parseCacheFromText(page2, null).getFirstCacheFromResult(LoadFlags.LOAD_CACHE_ONLY);
+ final Geocache cache3 = GCParser.parseAndSaveCacheFromText(page2, null).getFirstCacheFromResult(LoadFlags.LOAD_CACHE_ONLY);
assertThat(cache3).isNotNull();
assert (cache3 != null); // eclipse bug
assertThat(cache3.hasUserModifiedCoords()).isFalse();
@@ -210,7 +210,7 @@ public class GCParserTest extends AbstractResourceInstrumentationTestCase {
private Geocache parseCache(int resourceId) {
final String page = getFileContent(resourceId);
- final SearchResult result = GCParser.parseCacheFromText(page, null);
+ final SearchResult result = GCParser.parseAndSaveCacheFromText(page, null);
assertThat(result).isNotNull();
assertThat(result.isEmpty()).isFalse();
return result.getFirstCacheFromResult(LoadFlags.LOAD_CACHE_OR_DB);
diff --git a/tests/src/cgeo/geocaching/connector/gc/TrackablesTest.java b/tests/src/cgeo/geocaching/connector/gc/TrackablesTest.java
index c45efd7..faaedbf 100644
--- a/tests/src/cgeo/geocaching/connector/gc/TrackablesTest.java
+++ b/tests/src/cgeo/geocaching/connector/gc/TrackablesTest.java
@@ -101,9 +101,9 @@ public class TrackablesTest extends AbstractResourceInstrumentationTestCase {
assertThat(goal).isNotNull();
assertThat(goal.startsWith("Bei meinem Besitzer auf der Couch")).isTrue();
assertThat(goal.endsWith("Geocachern zusammen fotografieren.")).isTrue();
- assertEquals("Der kleine Maulwurf in etwas gr&ouml;&szlig;er :-)", trackable.getDetails());
+ assertThat(trackable.getDetails()).isEqualTo("Der kleine Maulwurf in etwas gr&ouml;&szlig;er :-)");
assertThat(trackable.getGeocode()).isEqualTo("TB54VJJ");
- assertEquals("Nordrhein-Westfalen, Germany", trackable.getOrigin());
+ assertThat(trackable.getOrigin()).isEqualTo("Nordrhein-Westfalen, Germany");
assertThat(trackable.getOwner()).isEqualTo("Lineflyer");
// the icon url is manipulated during compression
assertThat(trackable.getIconUrl().endsWith("www.geocaching.com/images/wpttypes/21.gif")).isTrue();
diff --git a/tests/src/cgeo/geocaching/utils/UncertainPropertyTest.java b/tests/src/cgeo/geocaching/connector/gc/UncertainPropertyTest.java
index 74aa680..728f78a 100644
--- a/tests/src/cgeo/geocaching/utils/UncertainPropertyTest.java
+++ b/tests/src/cgeo/geocaching/connector/gc/UncertainPropertyTest.java
@@ -1,4 +1,6 @@
-package cgeo.geocaching.utils;
+package cgeo.geocaching.connector.gc;
+
+import cgeo.geocaching.connector.gc.UncertainProperty;
import junit.framework.TestCase;
diff --git a/tests/src/cgeo/geocaching/connector/oc/OkapiClientTest.java b/tests/src/cgeo/geocaching/connector/oc/OkapiClientTest.java
index 05d676b..20a51b8 100644
--- a/tests/src/cgeo/geocaching/connector/oc/OkapiClientTest.java
+++ b/tests/src/cgeo/geocaching/connector/oc/OkapiClientTest.java
@@ -6,6 +6,7 @@ import cgeo.CGeoTestCase;
import cgeo.geocaching.DataStore;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.enumerations.LoadFlags;
+import cgeo.geocaching.enumerations.LogType;
public class OkapiClientTest extends CGeoTestCase {
@@ -22,6 +23,8 @@ public class OkapiClientTest extends CGeoTestCase {
assertThat(cache.getGeocode()).isEqualTo(geoCode);
assertThat(cache.getName()).isEqualTo("Oshkosh Municipal Tank");
assertThat(cache.isDetailed()).isTrue();
+ assertThat(cache.getOwnerDisplayName()).isNotEmpty();
+ assertThat(cache.getOwnerUserId()).isEqualTo(cache.getOwnerDisplayName());
}
public static void testOCSearchMustWorkWithoutOAuthAccessTokens() {
@@ -42,8 +45,17 @@ public class OkapiClientTest extends CGeoTestCase {
assertThat(cache.getWaypoints()).hasSize(3);
// load again
- cache.refreshSynchronous(cache.getListId(), null);
+ cache.refreshSynchronous(null);
assertThat(cache.getWaypoints()).hasSize(3);
}
+ public static void testOCWillAttendLogs() {
+ final String geoCode = "OC6465";
+
+ removeCacheCompletely(geoCode);
+ Geocache cache = OkapiClient.getCache(geoCode);
+ assertThat(cache).as("Cache from OKAPI").isNotNull();
+ assertThat(cache.getLogCounts().get(LogType.WILL_ATTEND)).isGreaterThan(0);
+ }
+
}
diff --git a/tests/src/cgeo/geocaching/export/ExportTest.java b/tests/src/cgeo/geocaching/export/ExportTest.java
index a9fceec..848a1f7 100644
--- a/tests/src/cgeo/geocaching/export/ExportTest.java
+++ b/tests/src/cgeo/geocaching/export/ExportTest.java
@@ -52,10 +52,6 @@ public class ExportTest extends CGeoTestCase {
private static class GpxExportTester extends GpxExport {
- protected GpxExportTester() {
- super();
- }
-
public File testExportSync(List<Geocache> caches) throws InterruptedException, ExecutionException {
final ArrayList<String> geocodes = new ArrayList<String>(caches.size());
for (final Geocache cache : caches) {
diff --git a/tests/src/cgeo/geocaching/files/FileTypeDetectorTest.java b/tests/src/cgeo/geocaching/files/FileTypeDetectorTest.java
new file mode 100644
index 0000000..5dbf3c2
--- /dev/null
+++ b/tests/src/cgeo/geocaching/files/FileTypeDetectorTest.java
@@ -0,0 +1,52 @@
+package cgeo.geocaching.files;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import cgeo.geocaching.test.AbstractResourceInstrumentationTestCase;
+import cgeo.geocaching.test.R;
+
+import org.eclipse.jdt.annotation.NonNull;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.net.Uri;
+
+public class FileTypeDetectorTest extends AbstractResourceInstrumentationTestCase {
+
+ private static class FileContentResolver extends ContentResolver {
+
+ public FileContentResolver(Context context) {
+ super(context);
+ }
+ }
+
+ public void testUnknown() throws Exception {
+ assertFileType(R.raw.gc2cjpf_html, FileType.UNKNOWN);
+ assertFileType(R.raw.map1, FileType.UNKNOWN);
+ }
+
+ public void testLoc() throws Exception {
+ assertFileType(R.raw.gc1bkp3_loc, FileType.LOC);
+ assertFileType(R.raw.oc5952_loc, FileType.LOC);
+ assertFileType(R.raw.waymarking_loc, FileType.LOC);
+ }
+
+ public void testGpx() throws Exception {
+ assertFileType(R.raw.gc1bkp3_gpx100, FileType.GPX);
+ assertFileType(R.raw.gc1bkp3_gpx101, FileType.GPX);
+ assertFileType(R.raw.oc5952_gpx, FileType.GPX);
+ assertFileType(R.raw.renamed_waypoints_wpts, FileType.GPX);
+ assertFileType(R.raw.waymarking_gpx, FileType.GPX);
+ }
+
+ public void testZip() throws Exception {
+ assertFileType(R.raw.pq_error, FileType.ZIP);
+ assertFileType(R.raw.pq7545915, FileType.ZIP);
+ }
+
+ private void assertFileType(final int resourceId, final @NonNull FileType fileType) {
+ final Uri resourceURI = getResourceURI(resourceId);
+ final FileContentResolver contentResolver = new FileContentResolver(getInstrumentation().getContext());
+ assertThat(new FileTypeDetector(resourceURI, contentResolver).getFileType()).isEqualTo(fileType);
+ }
+}
diff --git a/tests/src/cgeo/geocaching/files/GPXParserTest.java b/tests/src/cgeo/geocaching/files/GPXParserTest.java
index bb91243..6171bab 100644
--- a/tests/src/cgeo/geocaching/files/GPXParserTest.java
+++ b/tests/src/cgeo/geocaching/files/GPXParserTest.java
@@ -16,8 +16,6 @@ import cgeo.geocaching.test.AbstractResourceInstrumentationTestCase;
import cgeo.geocaching.test.R;
import cgeo.geocaching.utils.SynchronizedDateFormat;
-import org.apache.commons.lang3.StringUtils;
-
import java.io.IOException;
import java.io.InputStream;
import java.text.ParseException;
@@ -52,9 +50,9 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase {
assertThat(cache.getSize()).isEqualTo(CacheSize.MICRO);
assertThat(cache.getDifficulty()).isEqualTo(1.0f);
assertThat(cache.getTerrain()).isEqualTo(5.0f);
- assertEquals("Baden-Württemberg, Germany", cache.getLocation());
- assertEquals("Ein alter Kindheitstraum, ein Schatz auf einer unbewohnten Insel.\nA old dream of my childhood, a treasure on a lonely island.", cache.getShortDescription());
- assertEquals(new Geopoint(48.859683, 9.1874), cache.getCoords());
+ assertThat(cache.getLocation()).isEqualTo("Baden-Württemberg, Germany");
+ assertThat(cache.getShortDescription()).isEqualTo("Ein alter Kindheitstraum, ein Schatz auf einer unbewohnten Insel.\nA old dream of my childhood, a treasure on a lonely island.");
+ assertThat(cache.getCoords()).isEqualTo(new Geopoint(48.859683, 9.1874));
return cache;
}
@@ -77,9 +75,9 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase {
assertThat(cache.getSize()).isEqualTo(CacheSize.SMALL);
assertThat(cache.getDifficulty()).isEqualTo(1.0f);
assertThat(cache.getTerrain()).isEqualTo(4.0f);
- assertEquals("Baden-Württemberg, Germany", cache.getLocation());
- assertEquals("Ein alter Kindheitstraum, ein Schatz auf einer unbewohnten Insel. A old dream of my childhood, a treasure on a lonely is", cache.getShortDescription());
- assertEquals(new Geopoint(48.85968, 9.18740), cache.getCoords());
+ assertThat(cache.getLocation()).isEqualTo("Baden-Württemberg, Germany");
+ assertThat(cache.getShortDescription()).isEqualTo("Ein alter Kindheitstraum, ein Schatz auf einer unbewohnten Insel. A old dream of my childhood, a treasure on a lonely is");
+ assertThat(cache.getCoords()).isEqualTo(new Geopoint(48.85968, 9.18740));
assertThat(cache.isReliableLatLon()).isTrue();
}
@@ -176,7 +174,7 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase {
assertThat(log.author).isEqualTo("Geoteufel");
assertThat(log.date).isEqualTo(parseTime("2011-09-11T07:00:00Z"));
assertThat(log.found).isEqualTo(-1);
- assertEquals("Sehr schöne Runde und wir haben wieder etwas Neues über Hockenheim gelernt. Super Tarnung.\nTFTC, Geoteufel", log.log);
+ assertThat(log.log).isEqualTo("Sehr schöne Runde und wir haben wieder etwas Neues über Hockenheim gelernt. Super Tarnung.\nTFTC, Geoteufel");
assertThat(log.isOwn()).isFalse();
assertThat(log.getDisplayText()).isEqualTo(log.log);
assertThat(log.daysSinceLog() > 700).isTrue();
@@ -211,7 +209,7 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase {
assertThat(wp.getPrefix()).isEqualTo("S1");
assertThat(wp.getLookup()).isEqualTo("---");
assertThat(wp.getName()).isEqualTo("Station 1");
- assertEquals("Ein zweiter Wegpunkt, der nicht wirklich existiert sondern nur zum Testen gedacht ist.", wp.getNote());
+ assertThat(wp.getNote()).isEqualTo("Ein zweiter Wegpunkt, der nicht wirklich existiert sondern nur zum Testen gedacht ist.");
assertThat(wp.getWaypointType()).isEqualTo(WaypointType.STAGE);
assertEquals(49.317500, wp.getCoords().getLatitude(), 0.000001);
assertEquals(8.545100, wp.getCoords().getLongitude(), 0.000001);
@@ -287,7 +285,7 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase {
assertThat(caches).hasSize(1);
DataStore.removeAllFromCache();
// load only the minimum cache, it has several members missing
- final Geocache minimalCache = DataStore.loadCache(geocode, EnumSet.of(LoadFlag.LOAD_DB_MINIMAL));
+ final Geocache minimalCache = DataStore.loadCache(geocode, EnumSet.of(LoadFlag.DB_MINIMAL));
// now check that we load lazy members on demand
assertThat(minimalCache.getAttributes()).isNotEmpty();
@@ -320,7 +318,7 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase {
assertThat(waymark).isNotNull();
assertThat(waymark.getGeocode()).isEqualTo("WM7BM7");
assertThat(waymark.getName()).isEqualTo("Roman water pipe Kornwestheim");
- assertThat(StringUtils.isNotBlank(waymark.getUrl())).isTrue(); // connector must be able to create it
+ assertThat(waymark.getUrl()).isNotEmpty(); // connector must be able to create it
assertThat(waymark.getType()).isEqualTo(CacheType.UNKNOWN);
assertThat(waymark.getSize()).isEqualTo(CacheSize.UNKNOWN);
}
@@ -347,7 +345,7 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase {
assertThat(cache.getDifficulty()).isEqualTo(1.5f);
assertThat(cache.getTerrain()).isEqualTo(1.0f);
assertThat(cache.getDescription().startsWith("Dieses sind die Reste einer in Kornwestheim gefundenen")).isTrue();
- assertEquals(new Geopoint(48.8642167, 9.1836), cache.getCoords());
+ assertThat(cache.getCoords()).isEqualTo(new Geopoint(48.8642167, 9.1836));
assertThat(cache.isReliableLatLon()).isTrue();
assertThat(cache.getHint()).isEqualTo("Wasserleitung");
}
diff --git a/tests/src/cgeo/geocaching/files/InvalidXMLCharacterFilterReaderTest.java b/tests/src/cgeo/geocaching/files/InvalidXMLCharacterFilterReaderTest.java
index 0641b5d..515d8a6 100644
--- a/tests/src/cgeo/geocaching/files/InvalidXMLCharacterFilterReaderTest.java
+++ b/tests/src/cgeo/geocaching/files/InvalidXMLCharacterFilterReaderTest.java
@@ -17,6 +17,7 @@ public class InvalidXMLCharacterFilterReaderTest extends AndroidTestCase {
final AtomicReference<String> description = new AtomicReference<String>();
root.setEndTextElementListener(new EndTextElementListener() {
+ @Override
public void end(String body) {
description.set(body);
}
diff --git a/tests/src/cgeo/geocaching/filter/StateNotFoundFilterTest.java b/tests/src/cgeo/geocaching/filter/StateNotFoundFilterTest.java
new file mode 100644
index 0000000..2bf9d94
--- /dev/null
+++ b/tests/src/cgeo/geocaching/filter/StateNotFoundFilterTest.java
@@ -0,0 +1,28 @@
+package cgeo.geocaching.filter;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import cgeo.CGeoTestCase;
+import cgeo.geocaching.Geocache;
+import cgeo.geocaching.filter.StateFilter.StateNotFoundFilter;
+
+public class StateNotFoundFilterTest extends CGeoTestCase {
+
+ private StateFilter.StateNotFoundFilter notFoundFilter;
+ private Geocache foundCache;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ notFoundFilter = new StateNotFoundFilter();
+ foundCache = new Geocache();
+ foundCache.setFound(true);
+ }
+
+ public void testAccepts() {
+ assertThat(notFoundFilter.accepts(foundCache)).isFalse();
+ assertThat(notFoundFilter.accepts(new Geocache())).isTrue();
+ }
+
+}
diff --git a/tests/src/cgeo/geocaching/geopoint/GeoPointFormatterTest.java b/tests/src/cgeo/geocaching/geopoint/GeoPointFormatterTest.java
index 4b25247..2816664 100644
--- a/tests/src/cgeo/geocaching/geopoint/GeoPointFormatterTest.java
+++ b/tests/src/cgeo/geocaching/geopoint/GeoPointFormatterTest.java
@@ -2,7 +2,7 @@ package cgeo.geocaching.geopoint;
import static org.assertj.core.api.Assertions.assertThat;
-import cgeo.geocaching.ui.Formatter;
+import cgeo.geocaching.utils.Formatter;
import android.test.AndroidTestCase;
@@ -12,7 +12,7 @@ public class GeoPointFormatterTest extends AndroidTestCase {
// From issue #2624: coordinate is wrong near to a confluence point
final Geopoint point = new Geopoint(49.9999999999999, 5.0);
final String format = GeopointFormatter.format(GeopointFormatter.Format.LAT_LON_DECDEGREE_COMMA, point);
- assertEquals("50.000000,5.000000", format);
+ assertThat(format).isEqualTo("50.000000,5.000000");
final String formatMinute = GeopointFormatter.format(GeopointFormatter.Format.LAT_LON_DECMINUTE_RAW, point);
assertThat(formatMinute).isEqualTo("N 50° 00.000 E 005° 00.000");
final String formatSecond = GeopointFormatter.format(GeopointFormatter.Format.LAT_LON_DECSECOND, point).replaceAll(",", ".");
diff --git a/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java b/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java
index 3e5667b..f8a3bb2 100644
--- a/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java
+++ b/tests/src/cgeo/geocaching/geopoint/GeoPointParserTest.java
@@ -2,7 +2,7 @@ package cgeo.geocaching.geopoint;
import static org.assertj.core.api.Assertions.assertThat;
-import cgeo.geocaching.ui.Formatter;
+import cgeo.geocaching.utils.Formatter;
import android.test.AndroidTestCase;
diff --git a/tests/src/cgeo/geocaching/geopoint/UnitsTest.java b/tests/src/cgeo/geocaching/geopoint/UnitsTest.java
index acc964a..f208984 100644
--- a/tests/src/cgeo/geocaching/geopoint/UnitsTest.java
+++ b/tests/src/cgeo/geocaching/geopoint/UnitsTest.java
@@ -51,13 +51,13 @@ public class UnitsTest extends CGeoTestCase {
TestSettings.setUseImperialUnits(false);
assertSpeed("123 km/h", 122.782f);
assertSpeed("123 km/h", 123.456f);
- assertSpeed("12.3 km/h", 12.3456f);
- assertSpeed("1.23 km/h", 1.23456f);
- assertSpeed("123 m/h", 0.123456f);
+ assertSpeed("12 km/h", 12.3456f);
+ assertSpeed("1 km/h", 1.23456f);
+ assertSpeed("0 km/h", 0.123456f);
TestSettings.setUseImperialUnits(true);
- assertSpeed("76.7 mph", 123.456f);
- assertSpeed("7.67 mph", 12.3456f);
- assertSpeed("0.77 mph", 1.23456f);
+ assertSpeed("77 mph", 123.456f);
+ assertSpeed("8 mph", 12.3456f);
+ assertSpeed("1 mph", 1.23456f);
} finally {
TestSettings.setUseImperialUnits(savedImperial);
}
diff --git a/tests/src/cgeo/geocaching/geopoint/ViewportTest.java b/tests/src/cgeo/geocaching/geopoint/ViewportTest.java
index ab59e79..ace0356 100644
--- a/tests/src/cgeo/geocaching/geopoint/ViewportTest.java
+++ b/tests/src/cgeo/geocaching/geopoint/ViewportTest.java
@@ -6,6 +6,7 @@ import cgeo.geocaching.ICoordinates;
import org.eclipse.jdt.annotation.NonNull;
+import android.annotation.SuppressLint;
import android.test.AndroidTestCase;
import java.util.Collections;
@@ -59,6 +60,7 @@ public class ViewportTest extends AndroidTestCase {
assertThat(vpRef.contains(new Geopoint(3.0, 4.0))).isTrue();
}
+ @SuppressLint("DefaultLocale")
public static void testSqlWhere() {
assertThat(vpRef.sqlWhere(null).toString()).isEqualTo("latitude >= -1.0 and latitude <= 3.0 and longitude >= -2.0 and longitude <= 4.0");
assertThat(vpRef.sqlWhere("t").toString()).isEqualTo("t.latitude >= -1.0 and t.latitude <= 3.0 and t.longitude >= -2.0 and t.longitude <= 4.0");
@@ -66,7 +68,7 @@ public class ViewportTest extends AndroidTestCase {
try {
current = Locale.getDefault();
Locale.setDefault(Locale.FRENCH);
- assertEquals("1,0", String.format("%.2g", 1.0d)); // Control that we are in a locale with commma separator
+ assertThat(String.format("%.2g", 1.0d)).isEqualTo("1,0"); // Control that we are in a locale with comma separator
assertThat(vpRef.sqlWhere("t").toString()).isEqualTo("t.latitude >= -1.0 and t.latitude <= 3.0 and t.longitude >= -2.0 and t.longitude <= 4.0");
} finally {
Locale.setDefault(current);
diff --git a/tests/src/cgeo/geocaching/settings/TestSettings.java b/tests/src/cgeo/geocaching/settings/TestSettings.java
index 2e6809f..279f658 100644
--- a/tests/src/cgeo/geocaching/settings/TestSettings.java
+++ b/tests/src/cgeo/geocaching/settings/TestSettings.java
@@ -48,4 +48,8 @@ public final class TestSettings extends Settings {
putString(R.string.pref_twitter_trackable_message, template);
}
+ public static void setSignature(final String signature) {
+ putString(R.string.pref_signature, signature);
+ }
+
}
diff --git a/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java b/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java
index df8dc1f..eaac181 100644
--- a/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java
+++ b/tests/src/cgeo/geocaching/test/AbstractResourceInstrumentationTestCase.java
@@ -12,7 +12,9 @@ import cgeo.geocaching.files.GPX10Parser;
import cgeo.geocaching.files.ParserException;
import cgeo.geocaching.list.StoredList;
+import android.content.ContentResolver;
import android.content.res.Resources;
+import android.net.Uri;
import android.test.InstrumentationTestCase;
import java.io.File;
@@ -28,7 +30,7 @@ public abstract class AbstractResourceInstrumentationTestCase extends Instrument
protected static void removeCacheCompletely(final String geocode) {
final EnumSet<RemoveFlag> flags = EnumSet.copyOf(LoadFlags.REMOVE_ALL);
- flags.add(RemoveFlag.REMOVE_OWN_WAYPOINTS_ONLY_FOR_TESTING);
+ flags.add(RemoveFlag.OWN_WAYPOINTS_ONLY_FOR_TESTING);
DataStore.removeCache(geocode, flags);
}
@@ -102,4 +104,9 @@ public abstract class AbstractResourceInstrumentationTestCase extends Instrument
instream.close();
}
}
+
+ protected Uri getResourceURI(int resId) {
+ Resources resources = getInstrumentation().getContext().getResources();
+ return Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + resources.getResourcePackageName(resId) + '/' + resources.getResourceTypeName(resId) + '/' + resources.getResourceEntryName(resId));
+ }
}
diff --git a/tests/src/cgeo/geocaching/test/mock/GC2CJPF.java b/tests/src/cgeo/geocaching/test/mock/GC2CJPF.java
index c125422..3fe105d 100644
--- a/tests/src/cgeo/geocaching/test/mock/GC2CJPF.java
+++ b/tests/src/cgeo/geocaching/test/mock/GC2CJPF.java
@@ -66,7 +66,7 @@ public class GC2CJPF extends MockedCache {
@Override
public String getDescription() {
- return "Kleiner Multi über 7 Stationen";
+ return "<a href=\"http://www.kinderwald.de/\"><b>http://www.kinderwald.de/</b></a><br/><br/>Kleiner Multi über 7 Stationen";
}
@Override
diff --git a/tests/src/cgeo/geocaching/test/mock/MockedCache.java b/tests/src/cgeo/geocaching/test/mock/MockedCache.java
index d06e715..cd482f8 100644
--- a/tests/src/cgeo/geocaching/test/mock/MockedCache.java
+++ b/tests/src/cgeo/geocaching/test/mock/MockedCache.java
@@ -150,6 +150,7 @@ public abstract class MockedCache implements ICache {
return getName();
}
+ @Override
public Geopoint getCoords() {
return coords;
}
diff --git a/tests/src/cgeo/geocaching/twitter/TwitterTest.java b/tests/src/cgeo/geocaching/twitter/TwitterTest.java
index 9de5e2f..a4df454 100644
--- a/tests/src/cgeo/geocaching/twitter/TwitterTest.java
+++ b/tests/src/cgeo/geocaching/twitter/TwitterTest.java
@@ -1,5 +1,7 @@
package cgeo.geocaching.twitter;
+import static org.assertj.core.api.Assertions.assertThat;
+
import cgeo.geocaching.Geocache;
import cgeo.geocaching.LogEntry;
import cgeo.geocaching.Trackable;
@@ -18,7 +20,7 @@ public class TwitterTest extends TestCase {
Trackable tb = new Trackable();
tb.setName("Travel bug");
tb.setGeocode("TB1234");
- assertEquals("I touched Travel bug (http://www.geocaching.com//track/details.aspx?tracker=TB1234). #cgeo #geocaching", Twitter.getStatusMessage(tb, null));
+ assertThat(Twitter.getStatusMessage(tb, null)).isEqualTo("I touched Travel bug (http://www.geocaching.com//track/details.aspx?tracker=TB1234). #cgeo #geocaching");
} finally {
TestSettings.setTrackableTwitterMessage(oldMessage);
}
@@ -31,7 +33,7 @@ public class TwitterTest extends TestCase {
Geocache cache = new Geocache();
cache.setGeocode("GC1234");
cache.setName("TwitterTest");
- assertEquals("I found TwitterTest (http://coord.info/GC1234). #cgeo #geocaching", Twitter.getStatusMessage(cache, null));
+ assertThat(Twitter.getStatusMessage(cache, null)).isEqualTo("I found TwitterTest (http://coord.info/GC1234). #cgeo #geocaching");
} finally {
TestSettings.setCacheTwitterMessage(oldMessage);
}
@@ -43,7 +45,7 @@ public class TwitterTest extends TestCase {
TestSettings.setCacheTwitterMessage("[LOG]");
Geocache cache = new Geocache();
LogEntry log = new LogEntry(0, LogType.FOUND_IT, "log text");
- assertEquals("log text #cgeo #geocaching", Twitter.getStatusMessage(cache, log));
+ assertThat(Twitter.getStatusMessage(cache, log)).isEqualTo("log text #cgeo #geocaching");
} finally {
TestSettings.setCacheTwitterMessage(oldMessage);
}
@@ -55,7 +57,7 @@ public class TwitterTest extends TestCase {
TestSettings.setTrackableTwitterMessage("[LOG]");
Trackable trackable = new Trackable();
LogEntry log = new LogEntry(0, LogType.FOUND_IT, "trackable log text");
- assertEquals("trackable log text #cgeo #geocaching", Twitter.getStatusMessage(trackable, log));
+ assertThat(Twitter.getStatusMessage(trackable, log)).isEqualTo("trackable log text #cgeo #geocaching");
} finally {
TestSettings.setTrackableTwitterMessage(oldMessage);
}
@@ -68,7 +70,7 @@ public class TwitterTest extends TestCase {
Geocache cache = new Geocache();
cache.setGeocode("GC1234");
cache.setName("TwitterTest");
- assertEquals("TwitterTest #cgeo #mytag #geocaching", Twitter.getStatusMessage(cache, null));
+ assertThat(Twitter.getStatusMessage(cache, null)).isEqualTo("TwitterTest #cgeo #mytag #geocaching");
} finally {
TestSettings.setCacheTwitterMessage(oldMessage);
}
diff --git a/tests/src/cgeo/geocaching/ui/FormatterTest.java b/tests/src/cgeo/geocaching/utils/FormatterTest.java
index 22008e0..c91445d 100644
--- a/tests/src/cgeo/geocaching/ui/FormatterTest.java
+++ b/tests/src/cgeo/geocaching/utils/FormatterTest.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.ui;
+package cgeo.geocaching.utils;
import static org.assertj.core.api.Assertions.assertThat;
@@ -6,6 +6,7 @@ import cgeo.geocaching.CgeoApplication;
import cgeo.geocaching.R;
import cgeo.geocaching.Waypoint;
import cgeo.geocaching.enumerations.WaypointType;
+import cgeo.geocaching.utils.Formatter;
import android.test.AndroidTestCase;
diff --git a/tests/src/cgeo/geocaching/utils/LogTemplateProviderTest.java b/tests/src/cgeo/geocaching/utils/LogTemplateProviderTest.java
index a7dcb2b..77832b0 100644
--- a/tests/src/cgeo/geocaching/utils/LogTemplateProviderTest.java
+++ b/tests/src/cgeo/geocaching/utils/LogTemplateProviderTest.java
@@ -2,6 +2,8 @@ package cgeo.geocaching.utils;
import static org.assertj.core.api.Assertions.assertThat;
+import cgeo.geocaching.settings.Settings;
+import cgeo.geocaching.settings.TestSettings;
import cgeo.geocaching.utils.LogTemplateProvider.LogContext;
import java.util.Calendar;
@@ -10,13 +12,51 @@ import junit.framework.TestCase;
public class LogTemplateProviderTest extends TestCase {
- public static void testApplyTemplates() {
+ public static void testApplyTemplatesNone() {
final String noTemplates = " no templates ";
- assertEquals(noTemplates, LogTemplateProvider.applyTemplates(noTemplates, new LogContext(null, null, true)));
+ final String signature = LogTemplateProvider.applyTemplates(noTemplates, new LogContext(null, null, true));
+ assertThat(signature).isEqualTo(noTemplates);
+ }
+ public static void testApplyTemplates() {
// This test can occasionally fail if the current year changes right after the next line.
final String currentYear = Integer.toString(Calendar.YEAR);
- assertThat(LogTemplateProvider.applyTemplates("[DATE]", new LogContext(null, null, true)).contains(currentYear)).isTrue();
+ final String signature = LogTemplateProvider.applyTemplates("[DATE]", new LogContext(null, null, true));
+ assertThat(signature).contains(currentYear);
+ }
+
+ /**
+ * signature itself can contain templates, therefore nested applying is necessary
+ */
+ public static void testApplySignature() {
+ String oldSignature = Settings.getSignature();
+ try {
+ TestSettings.setSignature("[DATE]");
+ String currentDate = LogTemplateProvider.applyTemplates(Settings.getSignature(), new LogContext(null, null, true));
+ final String signatureTemplate = "Signature [SIGNATURE]";
+ final String signature = LogTemplateProvider.applyTemplates(signatureTemplate, new LogContext(null, null, true));
+ assertThat(signature).isEqualTo("Signature " + currentDate);
+
+ final String currentYear = Integer.toString(Calendar.YEAR);
+ assertThat(signature).contains(currentYear);
+ } finally {
+ TestSettings.setSignature(oldSignature);
+ }
+ }
+
+ /**
+ * signature must not contain itself as template
+ */
+ public static void testApplyInvalidSignature() {
+ String oldSignature = Settings.getSignature();
+ try {
+ final String signatureTemplate = "[SIGNATURE]";
+ TestSettings.setSignature(signatureTemplate);
+ final String signature = LogTemplateProvider.applyTemplates(signatureTemplate, new LogContext(null, null, true));
+ assertThat(signature).isEqualTo("invalid signature template");
+ } finally {
+ TestSettings.setSignature(oldSignature);
+ }
}
}
diff --git a/tests/src/cgeo/geocaching/utils/TextUtilsTest.java b/tests/src/cgeo/geocaching/utils/TextUtilsTest.java
index d1dba84..29c4864 100644
--- a/tests/src/cgeo/geocaching/utils/TextUtilsTest.java
+++ b/tests/src/cgeo/geocaching/utils/TextUtilsTest.java
@@ -13,7 +13,7 @@ import java.util.regex.Pattern;
public class TextUtilsTest extends AndroidTestCase {
public static void testRegEx() {
final String page = MockedCache.readCachePage("GC2CJPF");
- assertEquals(GCConstantsTest.MOCK_LOGIN_NAME, TextUtils.getMatch(page, GCConstants.PATTERN_LOGIN_NAME, true, "???"));
+ assertThat(TextUtils.getMatch(page, GCConstants.PATTERN_LOGIN_NAME, true, "???")).isEqualTo(GCConstantsTest.MOCK_LOGIN_NAME);
assertThat(page.contains("id=\"ctl00_hlRenew\"") || GCConstants.MEMBER_STATUS_PM.equals(TextUtils.getMatch(page, GCConstants.PATTERN_MEMBER_STATUS, true, "???"))).isTrue();
}
@@ -23,7 +23,7 @@ public class TextUtilsTest extends AndroidTestCase {
public static void testControlCharactersCleanup() {
final Pattern patternAll = Pattern.compile("(.*)", Pattern.DOTALL);
- assertEquals("some control characters removed", TextUtils.getMatch("some" + "\u001C" + "control" + (char) 0x1D + "characters removed", patternAll, ""));
- assertEquals("newline also removed", TextUtils.getMatch("newline\nalso\nremoved", patternAll, ""));
+ assertThat(TextUtils.getMatch("some" + "\u001C" + "control" + (char) 0x1D + "characters removed", patternAll, "")).isEqualTo("some control characters removed");
+ assertThat(TextUtils.getMatch("newline\nalso\nremoved", patternAll, "")).isEqualTo("newline also removed");
}
}