Clean visual style: move to Light, add Material support, change Drawables (progress, icons).
This code alters the visual style moving the APP to a Light theme.
Parents of the theme are either Theme.Holo.Light or Theme.Material.Light
depending on which API we start the APK from. Needs SDK 21 to build.
Other than the visual changes, this commit changes:
- name of the APP to 'Browser'
- animations and sequencing of the Tab switcher in {nav/anim}_screen
- removal of the warning icon from the Exit dialog
- change of the favicon appearance (removal of the double border)
Vast amount of unused resources are removed from the APK. Just XHDPI
drawables have been synthesized for now, and the Primary color was
used for the icons and is accessible in R.color.Primary.
Change-Id: If75cc051c5d4015383e96066cdb6507484e625d8
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index e4d6dfd..6b9e1b7 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -60,7 +60,8 @@
android:icon="@mipmap/ic_launcher_browser_swe"
android:backupAgent=".BrowserBackupAgent"
android:hardwareAccelerated="true"
- android:taskAffinity="android.task.swe.browser" >
+ android:taskAffinity="android.task.swe.browser"
+ android:theme="@style/BrowserBase" >
<uses-library android:name="com.qrd.useragent"
android:required="false" />
@@ -259,7 +260,7 @@
android:name=".widget.BookmarkWidgetProxy"
android:exported="false" />
<activity android:name=".widget.BookmarkWidgetConfigure"
- android:theme="@android:style/Theme.Holo.DialogWhenLarge">
+ android:theme="@style/DialogWhenLarge">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/>
</intent-filter>
diff --git a/res/drawable-hdpi/browsertab_inactive.png b/res/drawable-hdpi/browsertab_inactive.png
deleted file mode 100644
index eb2f4d9..0000000
--- a/res/drawable-hdpi/browsertab_inactive.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/deco_progress_bar.9.png b/res/drawable-hdpi/deco_progress_bar.9.png
new file mode 100644
index 0000000..821b870
--- /dev/null
+++ b/res/drawable-hdpi/deco_progress_bar.9.png
Binary files differ
diff --git a/res/drawable-hdpi/geolocation_permissions_prompt_background.9.png b/res/drawable-hdpi/geolocation_permissions_prompt_background.9.png
deleted file mode 100644
index 1604a3d..0000000
--- a/res/drawable-hdpi/geolocation_permissions_prompt_background.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_back_disabled_holo_dark.png b/res/drawable-hdpi/ic_back_disabled_holo_dark.png
deleted file mode 100644
index eca8a56..0000000
--- a/res/drawable-hdpi/ic_back_disabled_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_back_hierarchy_holo_dark.png b/res/drawable-hdpi/ic_back_hierarchy_holo_dark.png
deleted file mode 100644
index ed99557..0000000
--- a/res/drawable-hdpi/ic_back_hierarchy_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_back_holo_dark.png b/res/drawable-hdpi/ic_back_holo_dark.png
deleted file mode 100644
index 5e31b19..0000000
--- a/res/drawable-hdpi/ic_back_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_close_window_holo_dark.png b/res/drawable-hdpi/ic_close_window_holo_dark.png
deleted file mode 100644
index 60bcd4c..0000000
--- a/res/drawable-hdpi/ic_close_window_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_forward_disabled_holo_dark.png b/res/drawable-hdpi/ic_forward_disabled_holo_dark.png
deleted file mode 100644
index 9330b92..0000000
--- a/res/drawable-hdpi/ic_forward_disabled_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_forward_holo_dark.png b/res/drawable-hdpi/ic_forward_holo_dark.png
deleted file mode 100644
index d5a5fa7..0000000
--- a/res/drawable-hdpi/ic_forward_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_gps_denied_holo_dark.png b/res/drawable-hdpi/ic_gps_denied_holo_dark.png
deleted file mode 100644
index 5bd9c39..0000000
--- a/res/drawable-hdpi/ic_gps_denied_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_gps_on_holo_dark.png b/res/drawable-hdpi/ic_gps_on_holo_dark.png
deleted file mode 100644
index e736362..0000000
--- a/res/drawable-hdpi/ic_gps_on_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_forward.png b/res/drawable-hdpi/ic_menu_forward.png
deleted file mode 100644
index b1b0c89..0000000
--- a/res/drawable-hdpi/ic_menu_forward.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_dark.png b/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_dark.png
deleted file mode 100644
index 2abc458..0000000
--- a/res/drawable-hdpi/ic_menu_moreoverflow_normal_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_overflow.png b/res/drawable-hdpi/ic_menu_overflow.png
deleted file mode 100644
index a12aedf..0000000
--- a/res/drawable-hdpi/ic_menu_overflow.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_refresh.png b/res/drawable-hdpi/ic_menu_refresh.png
deleted file mode 100644
index e13315f..0000000
--- a/res/drawable-hdpi/ic_menu_refresh.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_stop.png b/res/drawable-hdpi/ic_menu_stop.png
deleted file mode 100644
index cf53a08..0000000
--- a/res/drawable-hdpi/ic_menu_stop.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_new_incognito_holo_dark.png b/res/drawable-hdpi/ic_new_incognito_holo_dark.png
deleted file mode 100644
index 2d2f5bf..0000000
--- a/res/drawable-hdpi/ic_new_incognito_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_refresh_holo_dark.png b/res/drawable-hdpi/ic_refresh_holo_dark.png
deleted file mode 100644
index b335c0f..0000000
--- a/res/drawable-hdpi/ic_refresh_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_search_category_bookmark.png b/res/drawable-hdpi/ic_search_category_bookmark.png
deleted file mode 100644
index bdecfd0..0000000
--- a/res/drawable-hdpi/ic_search_category_bookmark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_search_category_browser.png b/res/drawable-hdpi/ic_search_category_browser.png
deleted file mode 100644
index 30b7a1e..0000000
--- a/res/drawable-hdpi/ic_search_category_browser.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_search_category_history.png b/res/drawable-hdpi/ic_search_category_history.png
deleted file mode 100644
index 94c89ae..0000000
--- a/res/drawable-hdpi/ic_search_category_history.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_search_category_suggest.png b/res/drawable-hdpi/ic_search_category_suggest.png
deleted file mode 100644
index 165a11d..0000000
--- a/res/drawable-hdpi/ic_search_category_suggest.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_search_holo_dark.png b/res/drawable-hdpi/ic_search_holo_dark.png
deleted file mode 100644
index b33d638..0000000
--- a/res/drawable-hdpi/ic_search_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_share_holo_dark.png b/res/drawable-hdpi/ic_share_holo_dark.png
deleted file mode 100644
index 2094394..0000000
--- a/res/drawable-hdpi/ic_share_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_stop_holo_dark.png b/res/drawable-hdpi/ic_stop_holo_dark.png
deleted file mode 100644
index 60bcd4c..0000000
--- a/res/drawable-hdpi/ic_stop_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_windows_holo_dark.png b/res/drawable-hdpi/ic_windows_holo_dark.png
deleted file mode 100644
index cfc3f70..0000000
--- a/res/drawable-hdpi/ic_windows_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/list_selector_pressed_holo_dark.9.png b/res/drawable-hdpi/list_selector_pressed_holo_dark.9.png
deleted file mode 100644
index 0ed5ba3..0000000
--- a/res/drawable-hdpi/list_selector_pressed_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/magnifying_glass.png b/res/drawable-hdpi/magnifying_glass.png
deleted file mode 100644
index a3898b0..0000000
--- a/res/drawable-hdpi/magnifying_glass.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/nav_tab_bg.9.png b/res/drawable-hdpi/nav_tab_bg.9.png
deleted file mode 100644
index 72ae85b..0000000
--- a/res/drawable-hdpi/nav_tab_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/progress.9.png b/res/drawable-hdpi/progress.9.png
deleted file mode 100644
index da3ce0a..0000000
--- a/res/drawable-hdpi/progress.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/qc_background_normal.png b/res/drawable-hdpi/qc_background_normal.png
deleted file mode 100644
index 8a8e2dc..0000000
--- a/res/drawable-hdpi/qc_background_normal.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/textfield_active_holo_dark.9.png b/res/drawable-hdpi/textfield_active_holo_dark.9.png
deleted file mode 100644
index dd223c7..0000000
--- a/res/drawable-hdpi/textfield_active_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/textfield_default_holo_dark.9.png b/res/drawable-hdpi/textfield_default_holo_dark.9.png
deleted file mode 100644
index 7ea6c26..0000000
--- a/res/drawable-hdpi/textfield_default_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/browsertab_inactive.png b/res/drawable-mdpi/browsertab_inactive.png
deleted file mode 100644
index 1db22a5..0000000
--- a/res/drawable-mdpi/browsertab_inactive.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/deco_progress_bar.9.png b/res/drawable-mdpi/deco_progress_bar.9.png
new file mode 100644
index 0000000..4eb5f51
--- /dev/null
+++ b/res/drawable-mdpi/deco_progress_bar.9.png
Binary files differ
diff --git a/res/drawable-mdpi/geolocation_permissions_prompt_background.9.png b/res/drawable-mdpi/geolocation_permissions_prompt_background.9.png
deleted file mode 100644
index 1604a3d..0000000
--- a/res/drawable-mdpi/geolocation_permissions_prompt_background.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_back_disabled_holo_dark.png b/res/drawable-mdpi/ic_back_disabled_holo_dark.png
deleted file mode 100644
index aca4345..0000000
--- a/res/drawable-mdpi/ic_back_disabled_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_back_hierarchy_holo_dark.png b/res/drawable-mdpi/ic_back_hierarchy_holo_dark.png
deleted file mode 100644
index 13d20ce..0000000
--- a/res/drawable-mdpi/ic_back_hierarchy_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_back_holo_dark.png b/res/drawable-mdpi/ic_back_holo_dark.png
deleted file mode 100644
index 8977423..0000000
--- a/res/drawable-mdpi/ic_back_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_close_window_holo_dark.png b/res/drawable-mdpi/ic_close_window_holo_dark.png
deleted file mode 100644
index 682c0a5..0000000
--- a/res/drawable-mdpi/ic_close_window_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_forward_disabled_holo_dark.png b/res/drawable-mdpi/ic_forward_disabled_holo_dark.png
deleted file mode 100644
index 5cd3f7f..0000000
--- a/res/drawable-mdpi/ic_forward_disabled_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_forward_holo_dark.png b/res/drawable-mdpi/ic_forward_holo_dark.png
deleted file mode 100644
index 7f60012..0000000
--- a/res/drawable-mdpi/ic_forward_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_gps_denied_holo_dark.png b/res/drawable-mdpi/ic_gps_denied_holo_dark.png
deleted file mode 100644
index 3a48b47..0000000
--- a/res/drawable-mdpi/ic_gps_denied_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_gps_on_holo_dark.png b/res/drawable-mdpi/ic_gps_on_holo_dark.png
deleted file mode 100644
index 505e29a..0000000
--- a/res/drawable-mdpi/ic_gps_on_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_forward.png b/res/drawable-mdpi/ic_menu_forward.png
deleted file mode 100644
index 4a0b6ef..0000000
--- a/res/drawable-mdpi/ic_menu_forward.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_dark.png b/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_dark.png
deleted file mode 100644
index ba704b6..0000000
--- a/res/drawable-mdpi/ic_menu_moreoverflow_normal_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_overflow.png b/res/drawable-mdpi/ic_menu_overflow.png
deleted file mode 100644
index 4a3bde3..0000000
--- a/res/drawable-mdpi/ic_menu_overflow.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_refresh.png b/res/drawable-mdpi/ic_menu_refresh.png
deleted file mode 100644
index 30b660f..0000000
--- a/res/drawable-mdpi/ic_menu_refresh.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_stop.png b/res/drawable-mdpi/ic_menu_stop.png
deleted file mode 100644
index efb4036..0000000
--- a/res/drawable-mdpi/ic_menu_stop.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_new_incognito_holo_dark.png b/res/drawable-mdpi/ic_new_incognito_holo_dark.png
deleted file mode 100644
index e8a7f49..0000000
--- a/res/drawable-mdpi/ic_new_incognito_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_refresh_holo_dark.png b/res/drawable-mdpi/ic_refresh_holo_dark.png
deleted file mode 100644
index d015979..0000000
--- a/res/drawable-mdpi/ic_refresh_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_search_category_bookmark.png b/res/drawable-mdpi/ic_search_category_bookmark.png
deleted file mode 100644
index cdf4be1..0000000
--- a/res/drawable-mdpi/ic_search_category_bookmark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_search_category_browser.png b/res/drawable-mdpi/ic_search_category_browser.png
deleted file mode 100644
index 455e640..0000000
--- a/res/drawable-mdpi/ic_search_category_browser.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_search_category_history.png b/res/drawable-mdpi/ic_search_category_history.png
deleted file mode 100644
index 0f63144..0000000
--- a/res/drawable-mdpi/ic_search_category_history.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_search_category_suggest.png b/res/drawable-mdpi/ic_search_category_suggest.png
deleted file mode 100644
index 0f04fc4..0000000
--- a/res/drawable-mdpi/ic_search_category_suggest.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_search_holo_dark.png b/res/drawable-mdpi/ic_search_holo_dark.png
deleted file mode 100644
index 3a991cb..0000000
--- a/res/drawable-mdpi/ic_search_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_share_holo_dark.png b/res/drawable-mdpi/ic_share_holo_dark.png
deleted file mode 100644
index d02cbad..0000000
--- a/res/drawable-mdpi/ic_share_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_stop_holo_dark.png b/res/drawable-mdpi/ic_stop_holo_dark.png
deleted file mode 100644
index 682c0a5..0000000
--- a/res/drawable-mdpi/ic_stop_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_windows_holo_dark.png b/res/drawable-mdpi/ic_windows_holo_dark.png
deleted file mode 100644
index 4d1d3eb..0000000
--- a/res/drawable-mdpi/ic_windows_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/list_selector_pressed_holo_dark.9.png b/res/drawable-mdpi/list_selector_pressed_holo_dark.9.png
deleted file mode 100644
index bf36a43..0000000
--- a/res/drawable-mdpi/list_selector_pressed_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/magnifying_glass.png b/res/drawable-mdpi/magnifying_glass.png
deleted file mode 100644
index bdb48ee..0000000
--- a/res/drawable-mdpi/magnifying_glass.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/nav_tab_bg.9.png b/res/drawable-mdpi/nav_tab_bg.9.png
deleted file mode 100644
index 717a8cf..0000000
--- a/res/drawable-mdpi/nav_tab_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/progress.9.png b/res/drawable-mdpi/progress.9.png
deleted file mode 100644
index 9ccee66..0000000
--- a/res/drawable-mdpi/progress.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/qc_background_normal.png b/res/drawable-mdpi/qc_background_normal.png
deleted file mode 100644
index 9f5f6c9..0000000
--- a/res/drawable-mdpi/qc_background_normal.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/textfield_active_holo_dark.9.png b/res/drawable-mdpi/textfield_active_holo_dark.9.png
deleted file mode 100644
index 296760d..0000000
--- a/res/drawable-mdpi/textfield_active_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/textfield_default_holo_dark.9.png b/res/drawable-mdpi/textfield_default_holo_dark.9.png
deleted file mode 100644
index eb88c4d..0000000
--- a/res/drawable-mdpi/textfield_default_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-nodpi/bg_browsertabs.png b/res/drawable-nodpi/bg_browsertabs.png
deleted file mode 100644
index 8a517f7..0000000
--- a/res/drawable-nodpi/bg_browsertabs.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-nodpi/bg_urlbar.png b/res/drawable-nodpi/bg_urlbar.png
deleted file mode 100644
index 325aad7..0000000
--- a/res/drawable-nodpi/bg_urlbar.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-nodpi/browser_background_holo.png b/res/drawable-nodpi/browser_background_holo.png
deleted file mode 100644
index 62ee0ef..0000000
--- a/res/drawable-nodpi/browser_background_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-nodpi/bg_urlbar.png b/res/drawable-sw600dp-nodpi/bg_urlbar.png
deleted file mode 100644
index 51e95e0..0000000
--- a/res/drawable-sw600dp-nodpi/bg_urlbar.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/browsertab_inactive.png b/res/drawable-xhdpi/browsertab_inactive.png
deleted file mode 100644
index 28eeed4..0000000
--- a/res/drawable-xhdpi/browsertab_inactive.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/deco_cosmetic_topshadow.9.png b/res/drawable-xhdpi/deco_cosmetic_topshadow.9.png
new file mode 100644
index 0000000..f5516d9
--- /dev/null
+++ b/res/drawable-xhdpi/deco_cosmetic_topshadow.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/deco_progress_bar.9.png b/res/drawable-xhdpi/deco_progress_bar.9.png
new file mode 100644
index 0000000..1206ab2
--- /dev/null
+++ b/res/drawable-xhdpi/deco_progress_bar.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/geolocation_permissions_prompt_background.9.png b/res/drawable-xhdpi/geolocation_permissions_prompt_background.9.png
deleted file mode 100644
index 19a35a3..0000000
--- a/res/drawable-xhdpi/geolocation_permissions_prompt_background.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_back_disabled_holo_dark.png b/res/drawable-xhdpi/ic_back_disabled_holo_dark.png
deleted file mode 100644
index 9f99c00..0000000
--- a/res/drawable-xhdpi/ic_back_disabled_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_back_hierarchy_holo_dark.png b/res/drawable-xhdpi/ic_back_hierarchy_holo_dark.png
deleted file mode 100644
index e459b98..0000000
--- a/res/drawable-xhdpi/ic_back_hierarchy_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_back_holo_dark.png b/res/drawable-xhdpi/ic_back_holo_dark.png
deleted file mode 100644
index f79f20a..0000000
--- a/res/drawable-xhdpi/ic_back_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_close_window_holo_dark.png b/res/drawable-xhdpi/ic_close_window_holo_dark.png
deleted file mode 100644
index da31f98..0000000
--- a/res/drawable-xhdpi/ic_close_window_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_forward_disabled_holo_dark.png b/res/drawable-xhdpi/ic_forward_disabled_holo_dark.png
deleted file mode 100644
index bbe6571..0000000
--- a/res/drawable-xhdpi/ic_forward_disabled_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_forward_holo_dark.png b/res/drawable-xhdpi/ic_forward_holo_dark.png
deleted file mode 100644
index c0e8371..0000000
--- a/res/drawable-xhdpi/ic_forward_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_gps_denied_holo_dark.png b/res/drawable-xhdpi/ic_gps_denied_holo_dark.png
deleted file mode 100644
index a695cda..0000000
--- a/res/drawable-xhdpi/ic_gps_denied_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_gps_on_holo_dark.png b/res/drawable-xhdpi/ic_gps_on_holo_dark.png
deleted file mode 100644
index 38c1892..0000000
--- a/res/drawable-xhdpi/ic_gps_on_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_forward.png b/res/drawable-xhdpi/ic_menu_forward.png
deleted file mode 100644
index 6463e7a..0000000
--- a/res/drawable-xhdpi/ic_menu_forward.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_moreoverflow_normal_holo_dark.png b/res/drawable-xhdpi/ic_menu_moreoverflow_normal_holo_dark.png
deleted file mode 100644
index a92fb1d..0000000
--- a/res/drawable-xhdpi/ic_menu_moreoverflow_normal_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_overflow.png b/res/drawable-xhdpi/ic_menu_overflow.png
deleted file mode 100644
index 715cff8..0000000
--- a/res/drawable-xhdpi/ic_menu_overflow.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_refresh.png b/res/drawable-xhdpi/ic_menu_refresh.png
deleted file mode 100644
index 9e9f10e..0000000
--- a/res/drawable-xhdpi/ic_menu_refresh.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_menu_stop.png b/res/drawable-xhdpi/ic_menu_stop.png
deleted file mode 100644
index 855af11..0000000
--- a/res/drawable-xhdpi/ic_menu_stop.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_new_incognito_holo_dark.png b/res/drawable-xhdpi/ic_new_incognito_holo_dark.png
deleted file mode 100644
index 2f21240..0000000
--- a/res/drawable-xhdpi/ic_new_incognito_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_refresh_holo_dark.png b/res/drawable-xhdpi/ic_refresh_holo_dark.png
deleted file mode 100644
index efdf884..0000000
--- a/res/drawable-xhdpi/ic_refresh_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_search_category_bookmark.png b/res/drawable-xhdpi/ic_search_category_bookmark.png
deleted file mode 100644
index 6046a95..0000000
--- a/res/drawable-xhdpi/ic_search_category_bookmark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_search_category_browser.png b/res/drawable-xhdpi/ic_search_category_browser.png
deleted file mode 100644
index bb767b4..0000000
--- a/res/drawable-xhdpi/ic_search_category_browser.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_search_category_history.png b/res/drawable-xhdpi/ic_search_category_history.png
deleted file mode 100644
index 681e4b4..0000000
--- a/res/drawable-xhdpi/ic_search_category_history.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_search_category_suggest.png b/res/drawable-xhdpi/ic_search_category_suggest.png
deleted file mode 100644
index be0388c..0000000
--- a/res/drawable-xhdpi/ic_search_category_suggest.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_search_holo_dark.png b/res/drawable-xhdpi/ic_search_holo_dark.png
deleted file mode 100644
index fbc62cf..0000000
--- a/res/drawable-xhdpi/ic_search_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_share_holo_dark.png b/res/drawable-xhdpi/ic_share_holo_dark.png
deleted file mode 100644
index 5c3047a..0000000
--- a/res/drawable-xhdpi/ic_share_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_stop_holo_dark.png b/res/drawable-xhdpi/ic_stop_holo_dark.png
deleted file mode 100644
index da31f98..0000000
--- a/res/drawable-xhdpi/ic_stop_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_windows_holo_dark.png b/res/drawable-xhdpi/ic_windows_holo_dark.png
deleted file mode 100644
index c7411b7..0000000
--- a/res/drawable-xhdpi/ic_windows_holo_dark.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/list_selector_pressed_holo_dark.9.png b/res/drawable-xhdpi/list_selector_pressed_holo_dark.9.png
deleted file mode 100644
index df19701..0000000
--- a/res/drawable-xhdpi/list_selector_pressed_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/magnifying_glass.png b/res/drawable-xhdpi/magnifying_glass.png
deleted file mode 100644
index 62742b7..0000000
--- a/res/drawable-xhdpi/magnifying_glass.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/nav_tab_bg.9.png b/res/drawable-xhdpi/nav_tab_bg.9.png
deleted file mode 100644
index d81bbca..0000000
--- a/res/drawable-xhdpi/nav_tab_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/progress.9.png b/res/drawable-xhdpi/progress.9.png
deleted file mode 100644
index f6f8d8d..0000000
--- a/res/drawable-xhdpi/progress.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/qc_background_normal.png b/res/drawable-xhdpi/qc_background_normal.png
deleted file mode 100644
index bea09ca..0000000
--- a/res/drawable-xhdpi/qc_background_normal.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/textfield_active_holo_dark.9.png b/res/drawable-xhdpi/textfield_active_holo_dark.9.png
deleted file mode 100644
index 97687e5..0000000
--- a/res/drawable-xhdpi/textfield_active_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/textfield_default_holo_dark.9.png b/res/drawable-xhdpi/textfield_default_holo_dark.9.png
deleted file mode 100644
index c3e59fc..0000000
--- a/res/drawable-xhdpi/textfield_default_holo_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xxhdpi/deco_cosmetic_topshadow.9.png b/res/drawable-xxhdpi/deco_cosmetic_topshadow.9.png
new file mode 100644
index 0000000..4873a53
--- /dev/null
+++ b/res/drawable-xxhdpi/deco_cosmetic_topshadow.9.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_action_gps_off.png b/res/drawable-xxhdpi/ic_action_gps_off.png
new file mode 100644
index 0000000..ea88d56
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_action_gps_off.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_action_gps_on.png b/res/drawable-xxhdpi/ic_action_gps_on.png
new file mode 100644
index 0000000..1c2d93c
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_action_gps_on.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_action_overflow_active.png b/res/drawable-xxhdpi/ic_action_overflow_active.png
new file mode 100644
index 0000000..6de9030
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_action_overflow_active.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_action_overflow_disabled.png b/res/drawable-xxhdpi/ic_action_overflow_disabled.png
new file mode 100644
index 0000000..b400f31
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_action_overflow_disabled.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_action_overflow_normal.png b/res/drawable-xxhdpi/ic_action_overflow_normal.png
new file mode 100644
index 0000000..3fcf285
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_action_overflow_normal.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_action_search_normal.png b/res/drawable-xxhdpi/ic_action_search_normal.png
new file mode 100644
index 0000000..1525102
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_action_search_normal.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_action_tabswitcher_active.png b/res/drawable-xxhdpi/ic_action_tabswitcher_active.png
new file mode 100644
index 0000000..d594918
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_action_tabswitcher_active.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_action_tabswitcher_disabled.png b/res/drawable-xxhdpi/ic_action_tabswitcher_disabled.png
new file mode 100644
index 0000000..e1f611b
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_action_tabswitcher_disabled.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_action_tabswitcher_normal.png b/res/drawable-xxhdpi/ic_action_tabswitcher_normal.png
new file mode 100644
index 0000000..a2e3aaa
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_action_tabswitcher_normal.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_suggest_bookmark_normal.png b/res/drawable-xxhdpi/ic_suggest_bookmark_normal.png
new file mode 100644
index 0000000..d1e6fae
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_suggest_bookmark_normal.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_suggest_browser_normal.png b/res/drawable-xxhdpi/ic_suggest_browser_normal.png
new file mode 100644
index 0000000..b433694
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_suggest_browser_normal.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_suggest_history_normal.png b/res/drawable-xxhdpi/ic_suggest_history_normal.png
new file mode 100644
index 0000000..fda1241
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_suggest_history_normal.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_suggest_search_normal.png b/res/drawable-xxhdpi/ic_suggest_search_normal.png
new file mode 100644
index 0000000..1525102
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_suggest_search_normal.png
Binary files differ
diff --git a/res/drawable-xxhdpi/nav_tab_title.9.png b/res/drawable-xxhdpi/nav_tab_title.9.png
new file mode 100644
index 0000000..744d6d4
--- /dev/null
+++ b/res/drawable-xxhdpi/nav_tab_title.9.png
Binary files differ
diff --git a/res/drawable/ic_action_overflow.xml b/res/drawable/ic_action_overflow.xml
new file mode 100644
index 0000000..4b03943
--- /dev/null
+++ b/res/drawable/ic_action_overflow.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2014, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:state_enabled="true" android:state_pressed="true"
+ android:drawable="@drawable/ic_action_overflow_active" />
+
+ <item android:state_enabled="true" android:state_selected="true"
+ android:drawable="@drawable/ic_action_overflow_active" />
+
+ <item android:state_enabled="false"
+ android:drawable="@drawable/ic_action_overflow_disabled" />
+
+ <item android:drawable="@drawable/ic_action_overflow_normal" />
+
+</selector>
diff --git a/res/drawable/ic_action_tabswitcher.xml b/res/drawable/ic_action_tabswitcher.xml
new file mode 100644
index 0000000..bc927a6
--- /dev/null
+++ b/res/drawable/ic_action_tabswitcher.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2014, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <item android:state_enabled="true" android:state_pressed="true"
+ android:drawable="@drawable/ic_action_tabswitcher_active" />
+
+ <item android:state_enabled="true" android:state_selected="true"
+ android:drawable="@drawable/ic_action_tabswitcher_active" />
+
+ <item android:state_enabled="false"
+ android:drawable="@drawable/ic_action_tabswitcher_disabled" />
+
+ <item android:drawable="@drawable/ic_action_tabswitcher_normal" />
+
+</selector>
diff --git a/res/drawable/url_background.xml b/res/drawable/url_background.xml
deleted file mode 100644
index f719c29..0000000
--- a/res/drawable/url_background.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<selector
- xmlns:android="http://schemas.android.com/apk/res/android">
- <item
- android:state_focused="true"
- android:drawable="@drawable/textfield_active_holo_dark" />
- <item
- android:state_focused="false"
- android:drawable="@drawable/textfield_default_holo_dark" />
-</selector>
\ No newline at end of file
diff --git a/res/layout-land/nav_screen.xml b/res/layout-land/nav_screen.xml
deleted file mode 100644
index fdadd6a..0000000
--- a/res/layout-land/nav_screen.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?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.
--->
-
-<RelativeLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/nav_screen"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@drawable/browser_background_holo">
- <com.android.browser.NavTabScroller
- android:id="@+id/scroller"
- android:layout_width="match_parent"
- android:layout_height="match_parent" />
- <LinearLayout
- android:id="@+id/tabbar"
- android:orientation="horizontal"
- android:layout_width="match_parent"
- android:layout_height="@dimen/toolbar_height"
- android:layout_gravity="top"
- android:gravity="right"
- android:background="#CC0d0d0d">
- <ImageButton
- android:id="@+id/newtab"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- style="@style/HoloButton"
- android:gravity="center_vertical"
- android:contentDescription="@string/accessibility_button_newtab"
- android:src="@drawable/ic_new_window_holo_dark" />
- <ImageButton
- android:id="@+id/bookmarks"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:contentDescription="@string/accessibility_button_bookmarks"
- android:src="@drawable/ic_bookmarks_history_holo_dark"
- style="@style/HoloButton" />
- <ImageButton
- android:id="@+id/more"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:paddingLeft="8dip"
- android:paddingRight="8dip"
- style="@style/HoloButton"
- android:gravity="center_vertical"
- android:contentDescription="@string/accessibility_button_more"
- android:src="@drawable/ic_menu_overflow" />
- </LinearLayout>
-</RelativeLayout>
diff --git a/res/layout-sw600dp/title_bar_nav.xml b/res/layout-sw600dp/title_bar_nav.xml
index e6abe7c..3ec3192 100644
--- a/res/layout-sw600dp/title_bar_nav.xml
+++ b/res/layout-sw600dp/title_bar_nav.xml
@@ -14,119 +14,127 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<com.android.browser.NavigationBarTablet
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="horizontal"
- android:background="@drawable/bg_urlbar">
+<com.android.browser.NavigationBarTablet xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/NavigationBarBackground"
+ android:orientation="horizontal">
+
<LinearLayout
android:id="@+id/navbuttons"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal">
+
<ImageButton
android:id="@+id/back"
- android:src="@drawable/ic_back_holo_dark"
+ style="@style/NavButton"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
android:contentDescription="@string/accessibility_button_back"
- style="@style/HoloButton" />
+ android:src="@drawable/ic_action_history_backward" />
+
<ImageButton
android:id="@+id/forward"
- android:src="@drawable/ic_forward_holo_dark"
+ style="@style/NavButton"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
android:contentDescription="@string/accessibility_button_forward"
- style="@style/HoloButton" />
+ android:src="@drawable/ic_action_history_forward" />
+
+ <!-- Stop/Refresh button -->
<ImageButton
android:id="@+id/stop"
+ style="@style/NavButton"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
- style="@style/HoloButton"
- android:gravity="center_vertical"
android:contentDescription="@string/accessibility_button_stop"
- android:src="@drawable/ic_stop_holo_dark" />
+ android:gravity="center_vertical" />
</LinearLayout>
+
<LinearLayout
android:id="@+id/urlbar_focused"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1.0"
- android:orientation="horizontal"
- android:background="@drawable/url_background">
+ android:orientation="horizontal">
+
<com.android.browser.LocationButton
android:id="@+id/location_button"
- android:layout_width="32dip"
- android:layout_height="20dip"
- android:visibility="gone"
- style="@style/HoloButton"
- android:layout_gravity="center" />
+ style="@style/NavButton"
+ android:layout_width="48dp"
+ android:visibility="gone" />
+
<ImageView
android:id="@+id/url_icon"
android:layout_width="32dip"
android:layout_height="20dip"
- android:src="@drawable/ic_web_holo_dark"
- android:layout_gravity="center" />
+ android:layout_gravity="center"
+ android:src="@drawable/ic_web_holo_dark" />
+
<ImageView
android:id="@+id/lock"
+ style="@style/HoloIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="0dip"
- style="@style/HoloIcon"
android:visibility="gone" />
+
<com.android.browser.UrlInputView
android:id="@+id/url"
+ style="@style/Suggestions"
android:layout_width="0dip"
- android:layout_weight="1.0"
android:layout_height="match_parent"
+ android:layout_weight="1.0"
+ android:background="@null"
+ android:ellipsize="end"
+ android:hint="@string/search_hint"
+ android:imeOptions="actionGo|flagNoExtractUi|flagNoFullscreen"
+ android:inputType="textUri"
+ android:lines="1"
android:paddingLeft="4dip"
android:paddingRight="0dip"
- android:background="@null"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:hint="@string/search_hint"
- android:singleLine="true"
- android:ellipsize="end"
- android:lines="1"
android:scrollHorizontally="true"
- android:inputType="textUri"
- android:imeOptions="actionGo|flagNoExtractUi|flagNoFullscreen"
- style="@style/Suggestions" />
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
<ImageButton
android:id="@+id/star"
- android:src="@drawable/btn_imageview_star"
+ style="@style/NavButton"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
android:contentDescription="@string/accessibility_button_addbookmark"
- style="@style/HoloButton" />
+ android:src="@drawable/ic_action_bookmark" />
+
<ImageButton
android:id="@+id/clear"
- android:src="@drawable/ic_stop_holo_dark"
+ style="@style/NavButton"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
android:contentDescription="@string/accessibility_button_clear"
- style="@style/HoloButton" />
+ android:src="@drawable/ic_action_stop" />
+
<ImageButton
android:id="@+id/voice"
- android:src="@drawable/ic_voice_search_holo_dark"
+ style="@style/NavButton"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
android:contentDescription="@string/accessibility_button_voice"
- style="@style/HoloButton" />
- </LinearLayout>
+ android:src="@drawable/ic_voice_search_holo_dark" />
+ </LinearLayout>
+
<ImageButton
android:id="@+id/search"
- android:src="@drawable/ic_search_holo_dark"
+ style="@style/NavButton"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
+ android:contentDescription="@string/accessibility_button_search"
android:gravity="center_vertical"
- android:contentDescription="@string/accessibility_button_search"
- style="@style/HoloButton" />
+ android:src="@drawable/ic_action_search_normal" />
+
<ImageButton
android:id="@+id/all_btn"
+ style="@style/NavButton"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:scaleType="center"
- style="@style/HoloButton"
android:contentDescription="@string/accessibility_button_bookmarks"
+ android:scaleType="center"
android:src="@drawable/ic_bookmarks_history_holo_dark" />
+
+ <ImageButton
+ android:id="@+id/more_browser_settings"
+ style="@style/OverflowButton" />
</com.android.browser.NavigationBarTablet>
diff --git a/res/layout-sw600dp/title_bar_snapshot.xml b/res/layout-sw600dp/title_bar_snapshot.xml
index 72e4b2b..f2abd5c 100644
--- a/res/layout-sw600dp/title_bar_snapshot.xml
+++ b/res/layout-sw600dp/title_bar_snapshot.xml
@@ -18,11 +18,10 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:background="@drawable/bg_urlbar">
+ android:orientation="horizontal" >
<ImageView
android:id="@+id/date_icon"
- android:src="@drawable/ic_search_category_history"
+ android:src="@drawable/ic_suggest_history_normal"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingLeft="16dip" />
@@ -43,13 +42,13 @@
android:singleLine="true"
android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceMedium" />
+
<ImageButton
android:id="@+id/all_btn"
+ style="@style/NavButton"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:scaleType="center"
+ android:contentDescription="@string/accessibility_button_bookmarks"
android:paddingRight="16dip"
- style="@style/HoloButton"
- android:src="@drawable/ic_bookmarks_history_holo_dark"
- android:contentDescription="@string/accessibility_button_bookmarks" />
+ android:scaleType="center"
+ android:src="@drawable/ic_bookmarks_history_holo_dark" />
</com.android.browser.SnapshotBar>
\ No newline at end of file
diff --git a/res/layout/anim_screen.xml b/res/layout/anim_screen.xml
index 0cdc931..9dc91d5 100644
--- a/res/layout/anim_screen.xml
+++ b/res/layout/anim_screen.xml
@@ -14,21 +14,27 @@
limitations under the License.
-->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/main"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical"
- android:focusable="false"
- android:background="@drawable/browser_background_holo">
- <ImageView
- android:id="@+id/title"
+ android:orientation="vertical">
+
+ <!-- obfuscate with the same color as the tabs Nav background -->
+ <View
android:layout_width="match_parent"
- android:layout_height="@dimen/toolbar_height" />
+ android:layout_height="match_parent"
+ android:layout_marginTop="@dimen/toolbar_height"
+ android:background="@color/TabNavBackgroundColor" />
+
+ <!-- the moving preview (manually placed) -->
<ImageView
- android:id="@+id/content"
+ android:id="@+id/anim_screen_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/white" />
-</LinearLayout>
+
+ <!-- block the size of the menu (to protect touch during animations) -->
+ <!-- View
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/toolbar_height" / -->
+</FrameLayout>
diff --git a/res/layout/browser_subwindow.xml b/res/layout/browser_subwindow.xml
index fb6fa37..0e8051a 100644
--- a/res/layout/browser_subwindow.xml
+++ b/res/layout/browser_subwindow.xml
@@ -23,15 +23,15 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@color/black"
+ android:background="@color/NavigationBarBackground"
android:layout_gravity="right"
android:gravity="right" >
- <ImageButton android:id="@+id/subwindow_close"
- style="@style/HoloButton"
- android:focusable="true"
+ <ImageButton
+ android:id="@+id/subwindow_close"
+ style="@style/NavButton"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/ic_close_window_holo_dark" />
+ android:focusable="true"
+ android:src="@drawable/ic_action_stop" />
</LinearLayout>
<LinearLayout
android:id="@+id/inner_container"
diff --git a/res/layout/custom_screen.xml b/res/layout/custom_screen.xml
index 61c455c..d166d80 100644
--- a/res/layout/custom_screen.xml
+++ b/res/layout/custom_screen.xml
@@ -18,7 +18,6 @@
xmlns:android="http://schemas.android.com/apk/res/android">
<FrameLayout android:id="@+id/fullscreen_custom_content"
android:visibility="gone"
- android:background="@color/black"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
diff --git a/res/layout/geolocation_permissions_prompt.xml b/res/layout/geolocation_permissions_prompt.xml
index d63ef84..b42b3f9 100755
--- a/res/layout/geolocation_permissions_prompt.xml
+++ b/res/layout/geolocation_permissions_prompt.xml
@@ -18,43 +18,44 @@
<com.android.browser.GeolocationPermissionsPrompt
xmlns:android="http://schemas.android.com/apk/res/android"
+ android:background="@color/TabPassiveMessageBackground"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@drawable/geolocation_permissions_prompt_background"
- android:visibility="gone">
+ android:orientation="vertical">
+
+ <!-- Cosmetic separator -->
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:background="@color/TabPassiveMessageLine" />
<!-- 'google.com wants to know your location' -->
<TextView android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:singleLine="true"
- android:scrollHorizontally="true"
- android:padding="6dip"
+ android:paddingBottom="4dp"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ android:paddingTop="16dp"
android:textAppearance="?android:attr/textAppearanceSmall" />
- <CheckBox android:id="@+id/remember"
- android:layout_width="wrap_content"
+ <CheckBox
+ android:id="@+id/remember"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_below="@id/message"
- android:layout_alignLeft="@id/message" />
- <TextView
- android:paddingLeft="4dip"
+ android:layout_marginLeft="8dp"
+ android:layout_marginRight="8dp"
android:text="@string/geolocation_permissions_prompt_remember"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:layout_alignBaseline="@id/remember"
- android:layout_toRightOf="@id/remember" />
+ android:textAppearance="?android:attr/textAppearanceSmall" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_below="@id/remember"
android:orientation="vertical"
android:divider="?android:attr/dividerHorizontal"
android:showDividers="beginning"
- android:dividerPadding="16dip"
- android:background="@null">
+ android:layout_marginTop="8dp"
+ android:dividerPadding="16dip" >
<LinearLayout
style="?android:attr/buttonBarStyle"
android:layout_width="match_parent"
diff --git a/res/layout/menu_item.xml b/res/layout/menu_item.xml
index 7247ee1..cdee2fd 100644
--- a/res/layout/menu_item.xml
+++ b/res/layout/menu_item.xml
@@ -20,8 +20,6 @@
android:layout_gravity="start"
android:gravity="center_vertical"
android:singleLine="true"
- android:paddingLeft="16dp"
- android:paddingEnd="9dp"
/>
<view
class="com.android.browser.appmenu.AppMenuItemIcon"
@@ -37,6 +35,6 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:tint="@color/black"
- android:visible="false"
+ android:visibility="gone"
android:clickable="true" />
</LinearLayout>
diff --git a/res/layout/nav_screen.xml b/res/layout/nav_screen.xml
index c655727..51109f7 100644
--- a/res/layout/nav_screen.xml
+++ b/res/layout/nav_screen.xml
@@ -14,49 +14,58 @@
limitations under the License.
-->
-<RelativeLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/nav_screen"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@drawable/browser_background_holo">
+ android:background="@color/TabNavBackgroundColor"
+ android:orientation="vertical">
+
<com.android.browser.NavTabScroller
android:id="@+id/scroller"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="vertical" />
+ android:orientation="@integer/nav_tab_orientation" />
+
+ <!-- Tabs toolbar -->
<LinearLayout
- android:id="@+id/tabbar"
- android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_height"
- android:layout_gravity="top"
- android:gravity="right"
- android:background="#CC0d0d0d">
- <ImageButton
- android:id="@+id/newtab"
+ android:background="@color/NavigationBarBackground"
+ android:gravity="end"
+ android:orientation="horizontal">
+
+ <!-- animated subset -->
+ <LinearLayout
+ android:id="@+id/nav_toolbar_animate"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- style="@style/HoloButton"
- android:gravity="center_vertical"
- android:contentDescription="@string/accessibility_button_newtab"
- android:src="@drawable/ic_new_window_holo_dark" />
- <ImageButton
- android:id="@+id/bookmarks"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:contentDescription="@string/accessibility_button_bookmarks"
- android:src="@drawable/ic_bookmarks_history_holo_dark"
- style="@style/HoloButton" />
+ android:orientation="horizontal">
+
+ <ImageButton
+ android:id="@+id/newtab"
+ style="@style/NavButtonWide"
+ android:contentDescription="@string/accessibility_button_newtab"
+ android:gravity="center_vertical"
+ android:src="@drawable/ic_action_add_tab" />
+
+ <ImageButton
+ android:id="@+id/newincognitotab"
+ style="@style/NavButtonWide"
+ android:contentDescription="@string/accessibility_button_newincognitotab"
+ android:gravity="center_vertical"
+ android:src="@drawable/ic_action_add_incognito" />
+ </LinearLayout>
+
<ImageButton
android:id="@+id/more"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:paddingLeft="8dip"
- android:paddingRight="8dip"
- style="@style/HoloButton"
- android:gravity="center_vertical"
- android:contentDescription="@string/accessibility_button_more"
- android:src="@drawable/ic_menu_overflow" />
+ style="@style/OverflowButton" />
</LinearLayout>
-</RelativeLayout>
+
+ <!-- Cosmetic shadow (covered by anim_screen during transitions) -->
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="8dp"
+ android:layout_marginTop="@dimen/toolbar_height"
+ android:background="@drawable/deco_cosmetic_topshadow" />
+
+</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/nav_tab_view.xml b/res/layout/nav_tab_view.xml
index d1205f0..36e2082 100644
--- a/res/layout/nav_tab_view.xml
+++ b/res/layout/nav_tab_view.xml
@@ -20,7 +20,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:background="@drawable/nav_tab_bg"
+ android:background="@drawable/nav_tab_title"
android:focusable="false">
<LinearLayout
android:id="@+id/titlebar"
@@ -41,19 +41,20 @@
android:textAppearance="?android:attr/textAppearanceSmall"
android:scrollHorizontally="true"
android:drawablePadding="8dip" />
+
<ImageView
android:id="@+id/closetab"
- android:src="@drawable/ic_tab_close"
- android:layout_gravity="center_vertical"
+ style="@style/NavButton"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:paddingRight="16dip"
+ android:layout_gravity="center_vertical"
android:contentDescription="@string/accessibility_button_closetab"
- style="@style/HoloButton" />
+ android:paddingRight="16dip"
+ android:src="@drawable/ic_action_stop" />
</LinearLayout>
+
+ <!-- Preview Image -->
<ImageView
android:id="@+id/tab_view"
- android:src="@drawable/ic_stop_holo_dark"
android:layout_width="@dimen/nav_tab_width"
android:layout_height="@dimen/nav_tab_height"
android:paddingLeft="2dip"
diff --git a/res/layout/one_button_plus_menu_item.xml b/res/layout/one_button_plus_menu_item.xml
index 278611c..29eaf57 100644
--- a/res/layout/one_button_plus_menu_item.xml
+++ b/res/layout/one_button_plus_menu_item.xml
@@ -21,11 +21,6 @@
<ImageButton
android:id="@+id/button_two"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="6"
- android:background="?android:attr/listChoiceBackgroundIndicator"
- android:scaleType="center"
- />
+ style="@style/OverflowButton" />
</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/tab_bar.xml b/res/layout/tab_bar.xml
index a9a70fd..bbb22a5 100644
--- a/res/layout/tab_bar.xml
+++ b/res/layout/tab_bar.xml
@@ -10,24 +10,23 @@
the specific language governing permissions and limitations under the
License.
-->
-<merge
- xmlns:android="http://schemas.android.com/apk/res/android"
+<merge xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabbarcontent"
android:layout_width="match_parent"
android:layout_height="?android:attr/actionBarSize"
- android:orientation="horizontal"
- >
+ android:orientation="horizontal">
+
<com.android.browser.TabScrollView
android:id="@+id/tabs"
android:layout_width="0dip"
android:layout_height="match_parent"
android:layout_weight="1.0"
android:orientation="horizontal" />
+
<ImageButton
android:id="@+id/newtab"
- android:src="@drawable/ic_menu_new_window"
+ style="@style/NavButton"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
- style="@style/HoloButton"
- android:background="@drawable/add_tab_selector" />
+ android:background="@drawable/add_tab_selector"
+ android:src="@drawable/ic_menu_new_window" />
</merge>
diff --git a/res/layout/tab_title.xml b/res/layout/tab_title.xml
index 8a5e308..57251d9 100644
--- a/res/layout/tab_title.xml
+++ b/res/layout/tab_title.xml
@@ -29,7 +29,7 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
- android:src="@drawable/ic_search_category_history"
+ android:src="@drawable/ic_suggest_history_normal"
android:contentDescription="@string/accessibility_state_frozen"
android:visibility="gone" />
<ImageView
diff --git a/res/layout/three_button_plus_menu_item.xml b/res/layout/three_button_plus_menu_item.xml
index e0cc23b..631690d 100644
--- a/res/layout/three_button_plus_menu_item.xml
+++ b/res/layout/three_button_plus_menu_item.xml
@@ -45,12 +45,5 @@
<ImageButton
android:id="@+id/button_four"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="6"
- android:paddingStart="11dp"
- android:paddingEnd="11dp"
- android:background="?android:attr/listChoiceBackgroundIndicator"
- android:scaleType="center"
- android:tint="@color/black" />
+ style="@style/OverflowButton" />
</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/title_bar.xml b/res/layout/title_bar.xml
index 7771c59..d972dd7 100644
--- a/res/layout/title_bar.xml
+++ b/res/layout/title_bar.xml
@@ -22,23 +22,39 @@
android:focusableInTouchMode="true"
android:layout_width="match_parent"
android:layout_height="wrap_content">
- <include
- layout="@layout/title_bar_nav"
- android:id="@+id/taburlbar"
+
+ <FrameLayout
android:layout_width="match_parent"
- android:layout_height="@dimen/toolbar_height" />
- <ViewStub
- android:id="@+id/snapshotbar_stub"
- android:layout="@layout/title_bar_snapshot"
- android:layout_width="match_parent"
- android:layout_height="@dimen/toolbar_height" />
+ android:layout_height="@dimen/toolbar_height">
+
+ <include
+ layout="@layout/title_bar_nav"
+ android:id="@+id/taburlbar"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/toolbar_height" />
+
+ <ViewStub
+ android:id="@+id/snapshotbar_stub"
+ android:layout="@layout/title_bar_snapshot"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/toolbar_height" />
+
+ <!-- Cosmetic separator -->
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:layout_gravity="bottom"
+ android:background="@color/NavigationBarUnderline" />
+ </FrameLayout>
+
+ <!-- the main Progress view -->
<com.android.browser.PageProgressView
android:id="@+id/progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:layout_gravity="bottom"
- android:src="@drawable/progress"
+ android:src="@drawable/deco_progress_bar"
android:layout_marginTop="@dimen/progress_bar_margin"
android:visibility="gone" />
</LinearLayout>
diff --git a/res/layout/title_bar_nav.xml b/res/layout/title_bar_nav.xml
index 3ee99fd..b9952f1 100644
--- a/res/layout/title_bar_nav.xml
+++ b/res/layout/title_bar_nav.xml
@@ -14,53 +14,55 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<com.android.browser.NavigationBarPhone
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="horizontal"
- android:background="@drawable/bg_urlbar">
+<com.android.browser.NavigationBarPhone xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/NavigationBarBackground"
+ android:orientation="horizontal">
+
<LinearLayout
- android:id="@+id/title_bg"
android:layout_width="0dip"
- android:layout_weight="1.0"
android:layout_height="match_parent"
+ android:layout_weight="1.0"
android:gravity="center_vertical"
- android:layout_marginLeft="8dip"
- android:layout_marginRight="8dip"
android:orientation="horizontal">
- <ImageView
- android:id="@+id/magnify"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="4dip"
- android:paddingRight="8dip"
- android:visibility="gone"
- android:src="@drawable/ic_search_category_suggest" />
+
<ImageView
android:id="@+id/incognito_icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="4dip"
- android:visibility="gone"
- android:src="@drawable/ic_incognito_holo_dark" />
+ android:layout_width="48dp"
+ android:layout_height="match_parent"
+ android:src="@drawable/ic_incognito_holo_dark"
+ android:visibility="gone" />
+
<com.android.browser.LocationButton
android:id="@+id/location_button"
- android:layout_width="32dip"
- android:layout_height="32dip"
- android:visibility="gone"
- style="@style/HoloButton"/>
+ style="@style/NavButton"
+ android:layout_width="wrap_content"
+ android:visibility="gone" />
+
+ <ImageView
+ android:id="@+id/magnify"
+ android:layout_width="44dp"
+ android:layout_height="match_parent"
+ android:src="@drawable/ic_action_search_normal"
+ android:paddingLeft="6dp"
+ android:paddingRight="6dp"
+ android:visibility="visible" />
+
<FrameLayout
android:id="@+id/iconcombo"
+ style="@style/NavButton"
android:layout_width="44dip"
- android:layout_height="match_parent"
- android:contentDescription="@string/page_info"
- style="@style/HoloButton">
+ android:contentDescription="@string/page_info">
+
<ImageView
android:id="@+id/favicon"
android:layout_width="32dip"
android:layout_height="32dip"
- android:paddingLeft="4dip"
- android:paddingRight="8dip"
- android:layout_gravity="center" />
+ android:layout_gravity="center"
+ android:paddingLeft="6dip"
+ android:paddingRight="6dip" />
+
<ImageView
android:id="@+id/lock"
android:layout_width="32dip"
@@ -68,65 +70,80 @@
android:layout_gravity="center"
android:visibility="gone" />
</FrameLayout>
+
<ImageView
android:id="@+id/stop"
+ style="@style/NavButton"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
- android:paddingLeft="4dip"
android:contentDescription="@string/accessibility_button_stop"
- android:src="@drawable/ic_stop_holo_dark"
- style="@style/HoloButton" />
+ android:paddingLeft="6dp"
+ android:paddingRight="6dp"
+ android:src="@drawable/ic_action_stop" />
+
<com.android.browser.UrlInputView
android:id="@+id/url"
- android:focusable="true"
+ style="@style/Suggestions"
android:layout_width="0dip"
- android:layout_weight="1.0"
android:layout_height="match_parent"
+ android:layout_weight="1.0"
+ android:background="@null"
+ android:ellipsize="end"
android:fadingEdge="horizontal"
android:fadingEdgeLength="24dip"
- android:textAppearance="?android:attr/textAppearanceMedium"
+ android:focusable="true"
android:hint="@string/search_hint"
- android:singleLine="true"
- android:ellipsize="end"
- android:lines="1"
- android:scrollHorizontally="true"
- android:inputType="textUri"
android:imeOptions="actionGo|flagNoExtractUi|flagNoFullscreen"
- style="@style/Suggestions"
- android:background="@null" />
+ android:inputType="textUri"
+ android:lines="1"
+ android:paddingLeft="4dp"
+ android:paddingRight="6dp"
+ android:scrollHorizontally="true"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceMedium" />
+
<ImageView
android:id="@+id/voice"
+ style="@style/NavButton"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:paddingRight="4dip"
android:contentDescription="@string/accessibility_button_voice"
- android:src="@drawable/ic_voice_search_holo_dark"
- style="@style/HoloButton"
- android:visibility="gone" />
- <ImageView
- android:id="@+id/clear"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
android:paddingRight="4dip"
+ android:src="@drawable/ic_voice_search_holo_dark"
+ android:visibility="gone" />
+
+ <ImageButton
+ android:id="@+id/clear"
+ style="@style/NavButton"
+ android:layout_width="wrap_content"
android:contentDescription="@string/accessibility_button_clear"
- android:src="@drawable/ic_close_window_holo_dark"
- style="@style/HoloButton"
+ android:src="@drawable/ic_action_stop"
android:visibility="gone" />
</LinearLayout>
- <ImageButton
- android:id="@+id/tab_switcher"
- android:layout_width="wrap_content"
+
+ <FrameLayout
android:layout_height="match_parent"
+ android:layout_width="wrap_content">
+
+ <ImageButton
+ android:id="@+id/tab_switcher"
+ style="@style/NavButton"
+ android:layout_width="wrap_content"
android:contentDescription="@string/accessibility_button_navscreen"
- android:src="@drawable/ic_windows_holo_dark"
- style="@style/HoloButton" />
+ android:src="@drawable/ic_action_tabswitcher" />
+
+ <TextView
+ android:id="@+id/tab_switcher_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:paddingBottom="3dp"
+ android:paddingRight="2dp"
+ android:clickable="false"
+ android:text="0" >
+ </TextView>
+ </FrameLayout>
+
<ImageButton
android:id="@+id/more_browser_settings"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- style="@style/HoloButton"
- android:gravity="center_vertical"
- android:contentDescription="@string/accessibility_button_more"
- android:src="@drawable/ic_menu_overflow" />
+ style="@style/OverflowButton" />
</com.android.browser.NavigationBarPhone>
diff --git a/res/layout/title_bar_snapshot.xml b/res/layout/title_bar_snapshot.xml
index c46dd6f..13a35ac 100644
--- a/res/layout/title_bar_snapshot.xml
+++ b/res/layout/title_bar_snapshot.xml
@@ -18,10 +18,9 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:background="@drawable/bg_urlbar">
+ android:orientation="horizontal" >
<ImageView
- android:src="@drawable/ic_search_category_history"
+ android:src="@drawable/ic_suggest_history_normal"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingLeft="8dip" />
@@ -52,19 +51,31 @@
android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceMedium" />
</FrameLayout>
- <ImageButton
- android:id="@+id/tab_switcher"
- android:layout_width="wrap_content"
+
+ <FrameLayout
android:layout_height="match_parent"
- android:src="@drawable/ic_windows_holo_dark"
- android:contentDescription="@string/accessibility_button_navscreen"
- style="@style/HoloButton" />
+ android:layout_width="wrap_content">
+
+ <ImageButton
+ android:id="@+id/tab_switcher"
+ style="@style/NavButton"
+ android:layout_width="wrap_content"
+ android:contentDescription="@string/accessibility_button_navscreen"
+ android:src="@drawable/ic_action_tabswitcher" />
+
+ <TextView
+ android:id="@+id/tab_switcher_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:paddingBottom="3dp"
+ android:paddingRight="2dp"
+ android:clickable="false"
+ android:text="0" >
+ </TextView>
+ </FrameLayout>
+
<ImageButton
android:id="@+id/more"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- style="@style/HoloButton"
- android:gravity="center_vertical"
- android:src="@drawable/ic_menu_moreoverflow_normal_holo_dark"
- android:contentDescription="@string/accessibility_button_more" />
+ style="@style/OverflowButton" />
</com.android.browser.SnapshotBar>
diff --git a/res/layout/two_button_plus_menu_item.xml b/res/layout/two_button_plus_menu_item.xml
index ae47f53..5ec508b 100644
--- a/res/layout/two_button_plus_menu_item.xml
+++ b/res/layout/two_button_plus_menu_item.xml
@@ -30,10 +30,5 @@
<ImageButton
android:id="@+id/button_three"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="6"
- android:background="?android:attr/listChoiceBackgroundIndicator"
- android:scaleType="center"
- />
+ style="@style/OverflowButton" />
</LinearLayout>
\ No newline at end of file
diff --git a/res/menu/url_selection.xml b/res/menu/url_selection.xml
index 8f4a93c..23e84b3 100644
--- a/res/menu/url_selection.xml
+++ b/res/menu/url_selection.xml
@@ -16,7 +16,7 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/share"
- android:icon="@drawable/ic_share_holo_dark"
+ android:icon="@drawable/ic_action_share"
android:title="@string/menu_share_url"
android:showAsAction="always|withText"
/>
diff --git a/res/values-sw600dp/integers.xml b/res/values-sw600dp/integers.xml
index abdafbf..8c76458 100644
--- a/res/values-sw600dp/integers.xml
+++ b/res/values-sw600dp/integers.xml
@@ -12,6 +12,8 @@
-->
<resources
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- use horizontal tabs navigation -->
+ <integer name="nav_tab_orientation">0</integer>
<!-- The number of lines in the suggestions dropdown in landscape -->
<integer name="max_suggest_lines_landscape">5</integer>
<!-- The number of lines in the suggestions dropdown in portrait -->
diff --git a/res/values-sw600dp/styles.xml b/res/values-sw600dp/styles.xml
index 699f10a..44fe540 100644
--- a/res/values-sw600dp/styles.xml
+++ b/res/values-sw600dp/styles.xml
@@ -14,18 +14,15 @@
limitations under the License.
-->
<resources>
- <style name="BrowserTheme" parent="@android:Theme.Holo">
- <item name="android:windowBackground">@color/white</item>
- <item name="android:colorBackground">#FFFFFFFF</item>
+
+ <style name="BrowserTheme" parent="@style/BrowserBase">
+ <item name="android:windowBackground">@color/browser_window_background</item>
+
<item name="android:windowActionBar">true</item>
<item name="android:windowNoTitle">false</item>
+ <!--<item name="android:windowActionModeOverlay">true</item>-->
<item name="android:actionBarStyle">@style/ActionBarStyle</item>
<item name="android:actionBarSize">56dip</item>
</style>
- <style name="Suggestions" parent="@android:style/Widget.Holo.AutoCompleteTextView">
- </style>
- <style name="ActionBarStyle" parent="@android:style/Widget.Holo.ActionBar">
- <item name="android:background">@drawable/bg_browsertabs</item>
- <item name="android:displayOptions"></item>
- </style>
+
</resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index c1c5df9..31853ac 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -20,6 +20,23 @@
<!-- FIXME: Change the name of this file! It is now being used generically
for the browser -->
<resources>
+
+ <!-- fundamental colors -->
+ <color name="primary">#ffffff</color>
+ <color name="navigation_bars">#101828</color>
+ <color name="accent">#008aa1</color>
+ <color name="browser_window_background">#ffffff</color>
+
+ <!-- derived colors -->
+ <color name="NavigationBarBackground">#ffffff</color> <!-- reference: f2f2f2 -->
+ <color name="NavigationBarUnderline">#b3b3b3</color>
+ <color name="PopupBackground">#ffffff</color>
+ <color name="TabNavBackgroundColor">#757575</color>
+ <color name="TabPassiveMessageBackground">#f2f2f2</color>
+ <color name="TabPassiveMessageLine">#b3b3b3</color>
+
+
+ <!-- legacy colors -->
<color name="white">#ffffffff</color>
<color name="black">#ff000000</color>
diff --git a/res/values/integers.xml b/res/values/integers.xml
index 0ce7ea7..84c48be 100644
--- a/res/values/integers.xml
+++ b/res/values/integers.xml
@@ -12,6 +12,8 @@
-->
<resources
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- use vertical tabs navigation -->
+ <integer name="nav_tab_orientation">1</integer>
<!-- The number of lines in the suggestions dropdown in landscape -->
<integer name="max_suggest_lines_landscape">5</integer>
<!-- The number of lines in the suggestions dropdown in portrait -->
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 67134a1..61c5d9e 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -20,7 +20,7 @@
<!-- The name of the application. -->
<string name="application_name">Browser</string>
<!-- The name of standalone application. -->
- <string name="application_name_swe">SWE Android Browser</string>
+ <string name="application_name_swe">Browser</string>
<!-- Displayed with a file picker to choose a file to upload -->
<string name="choose_upload">Choose file for upload</string>
<!-- Toast to show the user after they try to open the file picker but no apps on the
@@ -1095,7 +1095,7 @@
<!-- Toast message displayed when the full screen received message -->
<string name="received_message_full_screen">Receive a message from: <xliff:g id="FROM">%s</xliff:g>.</string>
<string name="acivity_not_found">No activity found to handle this intent <xliff:g id="NOACTIVITY">%s</xliff:g></string>
- <!-- SWE Android Browser -->
+ <!-- Snapdragon Browser Additions -->
<string name="ssl_certificate">Security certificate</string>
<string name="ssl_certificate_is_valid">This certificate is valid.</string>
<string name="version">Version</string>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 751451a..106c803 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -18,65 +18,93 @@
*/
-->
<resources>
- <style name="BrowserTheme" parent="@android:Theme.Holo">
- <item name="android:windowBackground">@color/white</item>
- <item name="android:colorBackground">#FFFFFFFF</item>
+
+ <!-- parents that change depending on version -->
+ <style name="BrowserBase" parent="@android:style/Theme.Holo.Light">
+ <item name="android:windowContentOverlay">@null</item>
+ </style>
+ <style name="DialogWhenLarge" parent="@android:style/Theme.Holo.Light.DialogWhenLarge" >
+ <item name="android:windowActionBar">false</item>
+ </style>
+ <style name="ActionBarStyle" parent="@android:style/Widget.Holo.Light.ActionBar">
+ <item name="android:displayOptions"></item>
+ </style>
+ <style name="PopupMenuStyle" parent="@android:style/Widget.Holo.Light.PopupMenu">
+ </style>
+ <style name="Suggestions" parent="@android:style/Widget.Holo.Light.AutoCompleteTextView">
+ <item name="android:popupBackground">@color/NavigationBarBackground</item>
+ <item name="android:dropDownHorizontalOffset">0dip</item>
+ <item name="android:dropDownVerticalOffset">0dip</item>
+ </style>
+ <style name="TextAppearance.Medium" parent="@android:style/TextAppearance.Holo.Medium" />
+ <style name="TextAppearance.Small" parent="@android:style/TextAppearance.Holo.Small" />
+
+
+ <!-- common theme elements -->
+
+ <style name="BrowserTheme" parent="@style/BrowserBase">
+ <item name="android:windowBackground">@color/browser_window_background</item>
+
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionModeOverlay">true</item>
<item name="android:actionBarStyle">@style/ActionBarStyle</item>
+ <item name="android:actionBarSize">56dip</item>
+ <item name="android:popupMenuStyle">@style/PopupMenuStyle</item>
</style>
- <style name="DialogWhenLarge" parent="@android:style/Theme.Holo.DialogWhenLarge" >
- <item name="android:windowActionBar">false</item>
- </style>
- <style name="BookmarkTheme" parent="@android:Theme.Holo">
+
+ <style name="BookmarkTheme" parent="@style/BrowserBase">
<item name="android:windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowFrame">@null</item>
- <item name="android:windowContentOverlay">@null</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">false</item>
<item name="android:windowIsTranslucent">true</item>
</style>
- <style name="ActionBarStyle" parent="@android:style/Widget.Holo.ActionBar">
- <item name="android:background">@drawable/bg_urlbar</item>
- <item name="android:displayOptions"></item>
+
+ <style name="ShortcutTheme" parent="@style/BrowserBase">
</style>
- <style name="Suggestions" parent="@android:style/Widget.Holo.AutoCompleteTextView">
- <item name="android:popupBackground">#D0000000</item>
- <item name="android:dropDownVerticalOffset">0dip</item>
+
+
+ <style name="NavButton">
+ <item name="android:background">?android:attr/selectableItemBackground</item>
+ <item name="android:layout_height">match_parent</item>
+ <item name="android:paddingLeft">8dip</item>
+ <item name="android:paddingRight">8dip</item>
</style>
- <style name="SuggestionLineMedium"
- parent="@android:style/TextAppearance.Holo.Medium">
+ <style name="NavButtonWide" parent="@style/NavButton">
+ <item name="android:layout_width">96dp</item>
+ </style>
+
+ <style name="OverflowButton" parent="@android:style/Widget.Holo.Light.ActionButton.Overflow">
+ <item name="android:src">@drawable/ic_action_overflow</item>
+ <item name="android:layout_width">48dp</item>
+ <item name="android:layout_height">match_parent</item>
+ <item name="android:gravity">center_vertical</item>
+ </style>
+
+ <style name="SuggestionLineMedium" parent="@style/TextAppearance.Medium">
<item name="android:textSize">16sp</item>
</style>
- <style name="SuggestionLineSmall"
- parent="@android:style/TextAppearance.Holo.Small">
+ <style name="SuggestionLineSmall" parent="@style/TextAppearance.Small">
<item name="android:textSize">12sp</item>
</style>
- <style name="ActionBar" parent="@android:style/Widget.ActionBar">
- <item name="android:background">@color/black</item>
+
+ <style name="HoloIcon">
+ <item name="android:layout_marginLeft">16dip</item>
</style>
- <style name="ShortcutTheme" parent="@android:Theme.Holo.DialogWhenLarge">
- </style>
+
<style name="TitleBar">
<item name="android:windowEnterAnimation">@anim/title_bar_enter</item>
<item name="android:windowExitAnimation">@anim/title_bar_exit</item>
</style>
- <style name="HoloIcon">
- <item name="android:layout_marginLeft">16dip</item>
- </style>
- <style name="HoloButton">
- <item name="android:background">?android:attr/selectableItemBackground</item>
- <item name="android:paddingLeft">8dip</item>
- <item name="android:paddingRight">8dip</item>
- </style>
- <style name="TabTitleSelected" parent="@android:style/TextAppearance.Small">
+
+ <style name="TabTitleSelected" parent="@style/TextAppearance.Small">
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textStyle">bold</item>
</style>
- <style name="TabTitleUnselected" parent="@android:style/TextAppearance.Small">
+ <style name="TabTitleUnselected" parent="@style/TextAppearance.Small">
<item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:textStyle">normal</item>
</style>
@@ -93,15 +121,16 @@
<item name="android:imeOptions">flagNoExtractUi|actionNext</item>
<item name="android:singleLine">true</item>
</style>
- <style name="OverflowMenuThemeBase" parent="BrowserTheme">
- <item name="android:popupBackground">@null</item>
+
+ <style name="OverflowMenuThemeBase" parent="@style/BrowserTheme">
+ <item name="android:background">@color/PopupBackground</item>
<item name="android:listDivider">@null</item>
<item name="android:listPreferredItemHeightSmall">48dp</item>
<item name="android:listPreferredItemPaddingStart">16dp</item>
<item name="android:listPreferredItemPaddingEnd">16dp</item>
<item name="android:textSize">16sp</item>
</style>
- <style name="OverflowMenuTheme" parent="OverflowMenuThemeBase" />
+ <style name="OverflowMenuTheme" parent="@style/OverflowMenuThemeBase" />
<style name="OverflowMenuAnim">
<item name="android:windowEnterAnimation">@anim/menu_enter</item>
<item name="android:windowExitAnimation">@anim/menu_exit</item>
diff --git a/res/xml/searchable.xml b/res/xml/searchable.xml
index a06d5b0..69b5108 100644
--- a/res/xml/searchable.xml
+++ b/res/xml/searchable.xml
@@ -18,7 +18,7 @@
is actually used to enter Uri's to load and display. -->
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
- android:icon="@drawable/ic_search_category_browser"
+ android:icon="@drawable/ic_suggest_browser_normal"
android:label="@string/search_label"
android:hint="@string/search_hint"
android:searchButtonText="@string/search_button_text"
diff --git a/res_v21/values-v21/styles.xml b/res_v21/values-v21/styles.xml
new file mode 100644
index 0000000..4a02338
--- /dev/null
+++ b/res_v21/values-v21/styles.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2014, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<resources>
+
+ <style name="BrowserBase" parent="@android:style/Theme.Material.Light">
+ <item name="android:windowContentOverlay">@null</item>
+ <!-- these are defined just in Material attrs -->
+ <item name="android:colorPrimary">@color/primary</item>
+ <item name="android:colorPrimaryDark">@color/navigation_bars</item>
+ <item name="android:colorAccent">@color/accent</item>
+ <item name="android:navigationBarColor">@color/navigation_bars</item>
+ <item name="android:colorEdgeEffect">@color/primary</item>
+ </style>
+
+ <style name="DialogWhenLarge" parent="@android:style/Theme.Material.Light.DialogWhenLarge" >
+ <item name="android:windowActionBar">false</item>
+ </style>
+ <style name="ActionBarStyle" parent="@android:style/Widget.Material.Light.ActionBar">
+ <item name="android:displayOptions"></item>
+ </style>
+ <style name="PopupMenuStyle" parent="@android:style/Widget.Material.Light.PopupMenu">
+ </style>
+ <style name="Suggestions" parent="@android:style/Widget.Material.Light.AutoCompleteTextView">
+ <!-- Doesn't play nice with material <item name="android:popupBackground">@color/NavigationBarBackground</item>-->
+ <item name="android:dropDownHorizontalOffset">0dip</item>
+ <item name="android:dropDownVerticalOffset">0dip</item>
+ </style>
+ <style name="TextAppearance.Medium" parent="@android:style/TextAppearance.Material.Medium" />
+ <style name="TextAppearance.Small" parent="@android:style/TextAppearance.Material.Small" />
+
+</resources>
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index a04f5e0..9dbfe24 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -63,7 +63,7 @@
*/
public abstract class BaseUi implements UI {
- private static final String LOGTAG = "BaseUi";
+ protected static final boolean ENABLE_BORDER_AROUND_FAVICON = false;
protected static final FrameLayout.LayoutParams COVER_SCREEN_PARAMS =
new FrameLayout.LayoutParams(
@@ -117,9 +117,10 @@
mActivity = browser;
mUiController = controller;
mTabControl = controller.getTabControl();
- Resources res = mActivity.getResources();
mInputManager = (InputMethodManager)
browser.getSystemService(Activity.INPUT_METHOD_SERVICE);
+ // This assumes that the top-level root of our layout has the 'android.R.id.content' id
+ // it's used in place of setContentView because we're attaching a <merge> here.
FrameLayout frameLayout = (FrameLayout) mActivity.getWindow()
.getDecorView().findViewById(android.R.id.content);
LayoutInflater.from(mActivity)
@@ -856,19 +857,22 @@
}
public Drawable getFaviconDrawable(Bitmap icon) {
- Drawable[] array = new Drawable[3];
- array[0] = new PaintDrawable(Color.BLACK);
- PaintDrawable p = new PaintDrawable(Color.WHITE);
- array[1] = p;
- if (icon == null) {
- array[2] = getGenericFavicon();
- } else {
- array[2] = new BitmapDrawable(icon);
+ if (ENABLE_BORDER_AROUND_FAVICON) {
+ Drawable[] array = new Drawable[3];
+ array[0] = new PaintDrawable(Color.BLACK);
+ PaintDrawable p = new PaintDrawable(Color.WHITE);
+ array[1] = p;
+ if (icon == null) {
+ array[2] = getGenericFavicon();
+ } else {
+ array[2] = new BitmapDrawable(mActivity.getResources(), icon);
+ }
+ LayerDrawable d = new LayerDrawable(array);
+ d.setLayerInset(1, 1, 1, 1, 1);
+ d.setLayerInset(2, 2, 2, 2, 2);
+ return d;
}
- LayerDrawable d = new LayerDrawable(array);
- d.setLayerInset(1, 1, 1, 1, 1);
- d.setLayerInset(2, 2, 2, 2, 2);
- return d;
+ return icon == null ? getGenericFavicon() : new BitmapDrawable(mActivity.getResources(), icon);
}
public boolean isLoading() {
@@ -897,6 +901,14 @@
mHandler.sendMessageDelayed(msg, duration);
}
+ protected void setMenuItemVisibility(Menu menu, int id,
+ boolean visibility) {
+ MenuItem item = menu.findItem(id);
+ if (item != null) {
+ item.setVisible(visibility);
+ }
+ }
+
protected Handler mHandler = new Handler() {
@Override
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 3b95ee9..4b9f48c 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -305,7 +305,7 @@
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
- return mController.onPrepareOptionsMenu(menu);
+ return false;
}
@Override
diff --git a/src/com/android/browser/BrowserWebView.java b/src/com/android/browser/BrowserWebView.java
index 5d71ce3..e2348a5 100644
--- a/src/com/android/browser/BrowserWebView.java
+++ b/src/com/android/browser/BrowserWebView.java
@@ -30,6 +30,7 @@
* Manage WebView scroll events
*/
public class BrowserWebView extends WebView implements WebView.TitleBarDelegate {
+ private static final boolean ENABLE_ROOTVIEW_BACKREMOVAL_OPTIMIZATION = true;
public interface OnScrollChangedListener {
void onScrollChanged(int l, int t, int oldl, int oldt);
@@ -121,13 +122,17 @@
@Override
public void onDraw(Canvas c) {
super.onDraw(c);
- if (!mBackgroundRemoved && getRootView().getBackground() != null) {
- mBackgroundRemoved = true;
- post(new Runnable() {
- public void run() {
- getRootView().setBackgroundDrawable(null);
- }
- });
+
+ // if enabled, removes the background from the main view (assumes coverage with opaqueness)
+ if (ENABLE_ROOTVIEW_BACKREMOVAL_OPTIMIZATION) {
+ if (!mBackgroundRemoved && getRootView().getBackground() != null) {
+ mBackgroundRemoved = true;
+ post(new Runnable() {
+ public void run() {
+ getRootView().setBackgroundDrawable(null);
+ }
+ });
+ }
}
}
@@ -137,6 +142,7 @@
@Override
public void onScrollChanged(int l, int t, int oldl, int oldt) {
+ // NOTE: this function seems to not be called when the WebView is scrolled (it may be fine)
super.onScrollChanged(l, t, oldl, oldt);
if (mTitleBar != null) {
mTitleBar.onScrollChanged();
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index b0657c9..77f4032 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -2281,7 +2281,7 @@
private void showExitDialog(final Activity activity) {
new AlertDialog.Builder(activity)
.setTitle(R.string.exit_browser_title)
- .setIcon(android.R.drawable.ic_dialog_alert)
+ /* disabled, was worrying people: .setIcon(android.R.drawable.ic_dialog_alert) */
.setMessage(R.string.exit_browser_msg)
.setNegativeButton(R.string.exit_minimize, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
@@ -2295,7 +2295,6 @@
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
- // TODO Auto-generated method stub
mCrashRecoveryHandler.clearState(true);
int pid = android.os.Process.myPid();
android.os.Process.killProcess(pid);
@@ -3216,7 +3215,7 @@
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_MENU && event.getRepeatCount() == 0) {
// Hardware menu key
- mAppMenuHandler.showAppMenu(mActivity.findViewById(R.id.more_browser_settings),
+ mAppMenuHandler.showAppMenu(mActivity.findViewById(R.id.taburlbar),
true, false);
return true;
}
diff --git a/src/com/android/browser/GeolocationPermissionsPrompt.java b/src/com/android/browser/GeolocationPermissionsPrompt.java
index d0e94ad..cab6deb 100755
--- a/src/com/android/browser/GeolocationPermissionsPrompt.java
+++ b/src/com/android/browser/GeolocationPermissionsPrompt.java
@@ -16,8 +16,6 @@
package com.android.browser;
-import com.android.browser.R;
-
import org.codeaurora.swe.GeolocationPermissions;
import org.json.JSONArray;
@@ -29,11 +27,11 @@
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
-import android.widget.RelativeLayout;
+import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
-public class GeolocationPermissionsPrompt extends RelativeLayout {
+public class GeolocationPermissionsPrompt extends LinearLayout {
private TextView mMessage;
private Button mShareButton;
private Button mShareForLimitedTimeButton;
diff --git a/src/com/android/browser/LocationButton.java b/src/com/android/browser/LocationButton.java
index 4136d6e..c80c0e8 100644
--- a/src/com/android/browser/LocationButton.java
+++ b/src/com/android/browser/LocationButton.java
@@ -208,10 +208,10 @@
public void onReceiveValue(Boolean allowed) {
if (allowed != null) {
if (allowed.booleanValue()) {
- LocationButton.this.setImageResource(R.drawable.ic_gps_on_holo_dark);
+ LocationButton.this.setImageResource(R.drawable.ic_action_gps_on);
LocationButton.this.setVisibility(VISIBLE);
} else {
- LocationButton.this.setImageResource(R.drawable.ic_gps_denied_holo_dark);
+ LocationButton.this.setImageResource(R.drawable.ic_action_gps_off);
LocationButton.this.setVisibility(VISIBLE);
}
}
@@ -230,8 +230,8 @@
@Override
public void onGeolocationPolicyAdded(String origin, boolean allow) {
if (mCurrentOrigin != null && mCurrentOrigin.equals(origin)) {
- this.setImageResource(allow ? R.drawable.ic_gps_on_holo_dark :
- R.drawable.ic_gps_denied_holo_dark);
+ this.setImageResource(allow ? R.drawable.ic_action_gps_on :
+ R.drawable.ic_action_gps_off);
this.setVisibility(VISIBLE);
}
}
diff --git a/src/com/android/browser/NavScreen.java b/src/com/android/browser/NavScreen.java
index 64243e3..0962449 100644
--- a/src/com/android/browser/NavScreen.java
+++ b/src/com/android/browser/NavScreen.java
@@ -27,20 +27,14 @@
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
-import android.widget.FrameLayout;
import android.widget.ImageButton;
-import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupMenu;
import android.widget.PopupMenu.OnMenuItemClickListener;
import android.widget.RelativeLayout;
-import android.widget.TextView;
-import com.android.browser.R;
-import com.android.browser.NavTabScroller.OnLayoutListener;
import com.android.browser.NavTabScroller.OnRemoveListener;
import com.android.browser.TabControl.OnThumbnailUpdatedListener;
-import com.android.browser.UI.ComboViews;
import java.util.HashMap;
@@ -50,19 +44,12 @@
UiController mUiController;
PhoneUi mUi;
- Tab mTab;
Activity mActivity;
- ImageButton mRefresh;
- ImageButton mForward;
- ImageButton mBookmarks;
+ View mToolbarLayout;
ImageButton mMore;
ImageButton mNewTab;
- FrameLayout mHolder;
-
- TextView mTitle;
- ImageView mFavicon;
- ImageButton mCloseTab;
+ ImageButton mNewIncognitoTab;
NavTabScroller mScroller;
TabAdapter mAdapter;
@@ -94,10 +81,6 @@
return mUiController.onOptionsItemSelected(item);
}
- protected float getToolbarHeight() {
- return mActivity.getResources().getDimension(R.dimen.toolbar_height);
- }
-
@Override
protected void onConfigurationChanged(Configuration newconfig) {
if (newconfig.orientation != mOrientation) {
@@ -119,10 +102,11 @@
LayoutInflater.from(getContext()).inflate(R.layout.nav_screen, this);
setContentDescription(getContext().getResources().getString(
R.string.accessibility_transition_navscreen));
- mBookmarks = (ImageButton) findViewById(R.id.bookmarks);
+ mToolbarLayout = findViewById(R.id.nav_toolbar_animate);
+ mNewIncognitoTab = (ImageButton) findViewById(R.id.newincognitotab);
mNewTab = (ImageButton) findViewById(R.id.newtab);
mMore = (ImageButton) findViewById(R.id.more);
- mBookmarks.setOnClickListener(this);
+ mNewIncognitoTab.setOnClickListener(this);
mNewTab.setOnClickListener(this);
mMore.setOnClickListener(this);
mScroller = (NavTabScroller) findViewById(R.id.scroller);
@@ -148,10 +132,10 @@
@Override
public void onClick(View v) {
- if (mBookmarks == v) {
- mUiController.bookmarksOrHistoryPicker(ComboViews.Bookmarks);
- } else if (mNewTab == v) {
+ if (mNewTab == v) {
openNewTab();
+ } else if (mNewIncognitoTab == v) {
+ openNewIncognitoTab();
} else if (mMore == v) {
showMenu();
}
@@ -168,6 +152,18 @@
}
}
+ private void openNewIncognitoTab() {
+ final Tab tab = mUiController.openIncognitoTab();
+ if (tab != null) {
+ mUiController.setBlockEvents(true);
+ final int tix = mUi.mTabControl.getTabPosition(tab);
+ switchToTab(tab);
+ mUi.hideNavScreen(tix, true);
+ mScroller.handleDataChanged(tix);
+ mUiController.setBlockEvents(false);
+ }
+ }
+
private void openNewTab() {
// need to call openTab explicitely with setactive false
final Tab tab = mUiController.openTab(BrowserSettings.getInstance().getHomePage(),
diff --git a/src/com/android/browser/NavTabScroller.java b/src/com/android/browser/NavTabScroller.java
index a23ebe9..39c73ac 100644
--- a/src/com/android/browser/NavTabScroller.java
+++ b/src/com/android/browser/NavTabScroller.java
@@ -135,7 +135,7 @@
}
private void calcPadding() {
- if (mAdapter.getCount() > 0) {
+ if (mAdapter != null && mAdapter.getCount() > 0) {
View v = mContentView.getChildAt(0);
if (mHorizontal) {
int pad = (getMeasuredWidth() - v.getMeasuredWidth()) / 2 + 2;
diff --git a/src/com/android/browser/NavigationBarBase.java b/src/com/android/browser/NavigationBarBase.java
index ec18786..01435b6 100644
--- a/src/com/android/browser/NavigationBarBase.java
+++ b/src/com/android/browser/NavigationBarBase.java
@@ -15,6 +15,7 @@
*/
package com.android.browser;
+import android.app.Activity;
import android.app.SearchManager;
import android.content.ActivityNotFoundException;
import android.content.Context;
@@ -28,11 +29,15 @@
import android.util.AttributeSet;
import android.util.Log;
import android.view.KeyEvent;
+import android.view.Menu;
+import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnFocusChangeListener;
+import android.view.ViewConfiguration;
import android.widget.ImageView;
import android.widget.LinearLayout;
+import android.widget.PopupMenu;
import android.widget.Toast;
import com.android.browser.R;
@@ -45,7 +50,8 @@
public class NavigationBarBase extends LinearLayout implements
OnClickListener, UrlInputListener, OnFocusChangeListener,
- TextWatcher {
+ TextWatcher, UrlInputView.StateListener,
+ PopupMenu.OnMenuItemClickListener, PopupMenu.OnDismissListener {
private final static String TAG = "NavigationBarBase";
@@ -58,6 +64,10 @@
private ImageView mFavicon;
private ImageView mLockIcon;
+ private View mMore;
+ private PopupMenu mPopupMenu;
+ private boolean mOverflowMenuShowing;
+ private boolean mNeedsMenu;
public NavigationBarBase(Context context) {
super(context);
@@ -82,6 +92,9 @@
mUrlInput.setOnFocusChangeListener(this);
mUrlInput.setSelectAllOnFocus(true);
mUrlInput.addTextChangedListener(this);
+ mMore = findViewById(R.id.more_browser_settings);
+ mMore.setOnClickListener(this);
+ mNeedsMenu = !ViewConfiguration.get(getContext()).hasPermanentMenuKey();
}
public void setTitleBar(TitleBar titleBar) {
@@ -108,6 +121,30 @@
@Override
public void onClick(View v) {
+ if (mMore == v) {
+ showMenu(mMore);
+ }
+ }
+
+ void showMenu(View anchor) {
+ Activity activity = mUiController.getActivity();
+ if (mPopupMenu == null) {
+ mPopupMenu = new PopupMenu(getContext(), anchor);
+ mPopupMenu.setOnMenuItemClickListener(this);
+ mPopupMenu.setOnDismissListener(this);
+ if (!activity.onCreateOptionsMenu(mPopupMenu.getMenu())) {
+ mPopupMenu = null;
+ return;
+ }
+ }
+ Menu menu = mPopupMenu.getMenu();
+
+ if (mUiController instanceof Controller) {
+ Controller controller = (Controller) mUiController;
+ if (controller.onPrepareOptionsMenu(menu)) {
+ mOverflowMenuShowing = true;
+ }
+ }
}
@Override
@@ -389,10 +426,6 @@
public void onProgressStopped() {
}
- public boolean isMenuShowing() {
- return false;
- }
-
public void onTabDataChanged(Tab tab) {
mLocationButton.onTabDataChanged(tab);
}
@@ -411,4 +444,41 @@
@Override
public void afterTextChanged(Editable s) { }
+ @Override
+ public void onStateChanged(int state) {
+ switch(state) {
+ case STATE_NORMAL:
+ mMore.setVisibility(mNeedsMenu ? View.VISIBLE : View.GONE);
+ break;
+ case STATE_HIGHLIGHTED:
+ mMore.setVisibility(View.GONE);
+ break;
+ case STATE_EDITED:
+ mMore.setVisibility(View.GONE);
+ break;
+ }
+ }
+
+ public boolean isMenuShowing() {
+ return mOverflowMenuShowing;
+ }
+
+
+ @Override
+ public void onDismiss(PopupMenu popupMenu) {
+ if (popupMenu == mPopupMenu) {
+ onMenuHidden();
+ }
+ }
+
+ private void onMenuHidden() {
+ mOverflowMenuShowing = false;
+ mBaseUi.showTitleBarForDuration();
+ }
+
+
+ @Override
+ public boolean onMenuItemClick(MenuItem item) {
+ return mUiController.onOptionsItemSelected(item);
+ }
}
diff --git a/src/com/android/browser/NavigationBarPhone.java b/src/com/android/browser/NavigationBarPhone.java
index fe5ca28..f528e8f 100644
--- a/src/com/android/browser/NavigationBarPhone.java
+++ b/src/com/android/browser/NavigationBarPhone.java
@@ -15,26 +15,22 @@
*/
package com.android.browser;
-import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
-import android.view.Menu;
-import android.view.MenuItem;
+import android.util.TypedValue;
import android.view.View;
-import android.view.ViewConfiguration;
import org.codeaurora.swe.WebView;
-import android.widget.ImageView;
-import android.widget.PopupMenu;
-import android.widget.PopupMenu.OnDismissListener;
-import android.widget.PopupMenu.OnMenuItemClickListener;
+import org.codeaurora.swe.util.Activator;
+import org.codeaurora.swe.util.Observable;
-import com.android.browser.R;
+import android.widget.ImageView;
+import android.widget.TextView;
import com.android.browser.UrlInputView.StateListener;
public class NavigationBarPhone extends NavigationBarBase implements
- StateListener, OnMenuItemClickListener, OnDismissListener {
+ StateListener {
private ImageView mStopButton;
private ImageView mMagnify;
@@ -45,14 +41,12 @@
private String mStopDescription;
private String mRefreshDescription;
private View mTabSwitcher;
+ private TextView mTabText;
private View mComboIcon;
- private View mTitleContainer;
- private View mMore;
- private Drawable mTextfieldBgDrawable;
- private PopupMenu mPopupMenu;
- private boolean mOverflowMenuShowing;
- private boolean mNeedsMenu;
private View mIncognitoIcon;
+ private float mTabSwitcherInitialTextSize = 0;
+ private float mTabSwitcherCompressedTextSize = 0;
+
public NavigationBarPhone(Context context) {
super(context);
@@ -78,22 +72,42 @@
mMagnify = (ImageView) findViewById(R.id.magnify);
mTabSwitcher = findViewById(R.id.tab_switcher);
mTabSwitcher.setOnClickListener(this);
- mMore = findViewById(R.id.more_browser_settings);
- mMore.setOnClickListener(this);
+ mTabText = (TextView) findViewById(R.id.tab_switcher_text);
mComboIcon = findViewById(R.id.iconcombo);
mComboIcon.setOnClickListener(this);
- mTitleContainer = findViewById(R.id.title_bg);
setFocusState(false);
Resources res = getContext().getResources();
- mStopDrawable = res.getDrawable(R.drawable.ic_stop_holo_dark);
- mRefreshDrawable = res.getDrawable(R.drawable.ic_refresh_holo_dark);
+ mStopDrawable = res.getDrawable(R.drawable.ic_action_stop);
+ mRefreshDrawable = res.getDrawable(R.drawable.ic_action_reload);
mStopDescription = res.getString(R.string.accessibility_button_stop);
mRefreshDescription = res.getString(R.string.accessibility_button_refresh);
- mTextfieldBgDrawable = res.getDrawable(R.drawable.textfield_active_holo_dark);
mUrlInput.setContainer(this);
mUrlInput.setStateListener(this);
- mNeedsMenu = !ViewConfiguration.get(getContext()).hasPermanentMenuKey();
mIncognitoIcon = findViewById(R.id.incognito_icon);
+
+ if (mTabSwitcherInitialTextSize == 0) {
+ mTabSwitcherInitialTextSize = mTabText.getTextSize();
+ mTabSwitcherCompressedTextSize = (float) (mTabSwitcherInitialTextSize / 1.2);
+ }
+ }
+
+ @Override
+ public void setTitleBar(TitleBar titleBar) {
+ super.setTitleBar(titleBar);
+ Activator.activate(
+ new Observable.Observer() {
+ @Override
+ public void onChange(Object... params) {
+ if ((Integer)params[0] > 9) {
+ mTabText.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTabSwitcherCompressedTextSize);
+ } else {
+ mTabText.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTabSwitcherInitialTextSize);
+ }
+
+ mTabText.setText(Integer.toString((Integer) params[0]));
+ }
+ },
+ mUiController.getTabControl().getTabCountObservable());
}
@Override
@@ -160,8 +174,6 @@
}
} else if (v == mTabSwitcher) {
((PhoneUi) mBaseUi).toggleNavScreen();
- } else if (mMore == v) {
- showMenu(mMore);
} else if (mClearButton == v) {
mUrlInput.setText("");
} else if (mComboIcon == v) {
@@ -174,40 +186,6 @@
}
@Override
- public boolean isMenuShowing() {
- return super.isMenuShowing() || mOverflowMenuShowing;
- }
-
- void showMenu(View anchor) {
- Activity activity = mUiController.getActivity();
- if (mPopupMenu == null) {
- mPopupMenu = new PopupMenu(getContext(), anchor);
- mPopupMenu.setOnMenuItemClickListener(this);
- mPopupMenu.setOnDismissListener(this);
- if (!activity.onCreateOptionsMenu(mPopupMenu.getMenu())) {
- mPopupMenu = null;
- return;
- }
- }
- Menu menu = mPopupMenu.getMenu();
- if (activity.onPrepareOptionsMenu(menu)) {
- mOverflowMenuShowing = true;
- }
- }
-
- @Override
- public void onDismiss(PopupMenu menu) {
- if (menu == mPopupMenu) {
- onMenuHidden();
- }
- }
-
- private void onMenuHidden() {
- mOverflowMenuShowing = false;
- mBaseUi.showTitleBarForDuration();
- }
-
- @Override
public void onFocusChange(View view, boolean hasFocus) {
if (view == mUrlInput && !hasFocus) {
setDisplayTitle(mUrlInput.getText().toString());
@@ -217,6 +195,7 @@
@Override
public void onStateChanged(int state) {
+ super.onStateChanged(state);
mVoiceButton.setVisibility(View.GONE);
switch(state) {
case StateListener.STATE_NORMAL:
@@ -225,8 +204,7 @@
mClearButton.setVisibility(View.GONE);
mMagnify.setVisibility(View.GONE);
mTabSwitcher.setVisibility(View.VISIBLE);
- mTitleContainer.setBackgroundDrawable(null);
- mMore.setVisibility(mNeedsMenu ? View.VISIBLE : View.GONE);
+ mTabText.setVisibility(View.VISIBLE);
if (mUiController != null) {
mUiController.setWindowDimming(0f);
}
@@ -240,8 +218,7 @@
}
mMagnify.setVisibility(View.GONE);
mTabSwitcher.setVisibility(View.GONE);
- mMore.setVisibility(View.GONE);
- mTitleContainer.setBackgroundDrawable(mTextfieldBgDrawable);
+ mTabText.setVisibility(View.GONE);
if (!mUrlInput.getText().toString().equals(mUrlInput.getTag())) {
// only change text if different
@@ -259,8 +236,7 @@
mClearButton.setVisibility(View.VISIBLE);
mMagnify.setVisibility(View.VISIBLE);
mTabSwitcher.setVisibility(View.GONE);
- mMore.setVisibility(View.GONE);
- mTitleContainer.setBackgroundDrawable(mTextfieldBgDrawable);
+ mTabText.setVisibility(View.GONE);
break;
}
}
@@ -271,10 +247,4 @@
mIncognitoIcon.setVisibility(tab.isPrivateBrowsingEnabled()
? View.VISIBLE : View.GONE);
}
-
- @Override
- public boolean onMenuItemClick(MenuItem item) {
- return mUiController.onOptionsItemSelected(item);
- }
-
}
diff --git a/src/com/android/browser/NavigationBarTablet.java b/src/com/android/browser/NavigationBarTablet.java
index a965e0a..17f7398 100644
--- a/src/com/android/browser/NavigationBarTablet.java
+++ b/src/com/android/browser/NavigationBarTablet.java
@@ -31,7 +31,6 @@
import android.widget.ImageButton;
import android.widget.ImageView;
-import com.android.browser.R;
import com.android.browser.UI.ComboViews;
import com.android.browser.UrlInputView.StateListener;
@@ -53,8 +52,6 @@
private View mClearButton;
private View mVoiceButton;
private View mNavButtons;
- private Drawable mFocusDrawable;
- private Drawable mUnfocusDrawable;
private boolean mHideNavButtons;
private Drawable mFaviconDrawable;
@@ -75,14 +72,10 @@
private void init(Context context) {
Resources resources = context.getResources();
- mStopDrawable = resources.getDrawable(R.drawable.ic_stop_holo_dark);
- mReloadDrawable = resources.getDrawable(R.drawable.ic_refresh_holo_dark);
+ mStopDrawable = resources.getDrawable(R.drawable.ic_action_stop);
+ mReloadDrawable = resources.getDrawable(R.drawable.ic_action_reload);
mStopDescription = resources.getString(R.string.accessibility_button_stop);
mRefreshDescription = resources.getString(R.string.accessibility_button_refresh);
- mFocusDrawable = resources.getDrawable(
- R.drawable.textfield_active_holo_dark);
- mUnfocusDrawable = resources.getDrawable(
- R.drawable.textfield_default_holo_dark);
mHideNavButtons = resources.getBoolean(R.bool.hide_nav_buttons);
}
@@ -140,12 +133,8 @@
void updateNavigationState(Tab tab) {
if (tab != null) {
- mBackButton.setImageResource(tab.canGoBack()
- ? R.drawable.ic_back_holo_dark
- : R.drawable.ic_back_disabled_holo_dark);
- mForwardButton.setImageResource(tab.canGoForward()
- ? R.drawable.ic_forward_holo_dark
- : R.drawable.ic_forward_disabled_holo_dark);
+ mBackButton.setEnabled(tab.canGoBack());
+ mForwardButton.setEnabled(tab.canGoBack());
}
updateUrlIcon();
}
@@ -205,7 +194,7 @@
void updateUrlIcon() {
if (mUrlInput.hasFocus()) {
- mUrlIcon.setImageResource(R.drawable.ic_search_holo_dark);
+ mUrlIcon.setImageResource(R.drawable.ic_action_search_normal);
} else {
if (mFaviconDrawable == null) {
mFaviconDrawable = mBaseUi.getFaviconDrawable(null);
@@ -223,7 +212,7 @@
}
mSearchButton.setVisibility(View.GONE);
mStar.setVisibility(View.GONE);
- mUrlIcon.setImageResource(R.drawable.ic_search_holo_dark);
+ mUrlIcon.setImageResource(R.drawable.ic_action_search_normal);
} else {
if (mHideNavButtons) {
showNavButtons();
@@ -232,8 +221,6 @@
mSearchButton.setVisibility(View.VISIBLE);
updateUrlIcon();
}
- mUrlContainer.setBackgroundDrawable(focus
- ? mFocusDrawable : mUnfocusDrawable);
}
private void stopOrRefresh() {
@@ -324,6 +311,7 @@
@Override
public void onStateChanged(int state) {
+ super.onStateChanged(state);
mVoiceButton.setVisibility(View.GONE);
switch(state) {
case STATE_NORMAL:
diff --git a/src/com/android/browser/PhoneUi.java b/src/com/android/browser/PhoneUi.java
index ca478c2..5dc87f3 100644
--- a/src/com/android/browser/PhoneUi.java
+++ b/src/com/android/browser/PhoneUi.java
@@ -23,12 +23,10 @@
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
-import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.os.Message;
import android.util.Log;
-import android.util.TypedValue;
import android.view.ActionMode;
import android.view.KeyEvent;
import android.view.LayoutInflater;
@@ -36,11 +34,11 @@
import android.view.MenuItem;
import android.view.View;
import android.view.accessibility.AccessibilityEvent;
+import android.view.animation.DecelerateInterpolator;
import android.webkit.ValueCallback;
import org.codeaurora.swe.WebView;
import android.widget.ImageView;
-import com.android.browser.R;
import com.android.browser.UrlInputView.StateListener;
/**
@@ -160,14 +158,6 @@
return true;
}
- private void setMenuItemVisibility(Menu menu, int id,
- boolean visibility) {
- MenuItem item = menu.findItem(id);
- if (item != null) {
- item.setVisible(visibility);
- }
- }
-
@Override
public void updateMenuState(Tab tab, Menu menu) {
MenuItem bm = menu.findItem(R.id.bookmarks_menu_id);
@@ -273,7 +263,6 @@
mAnimScreen = new AnimScreen(mActivity);
} else {
mAnimScreen.mMain.setAlpha(1f);
- mAnimScreen.mTitle.setAlpha(1f);
mAnimScreen.setScaleFactor(1f);
}
mAnimScreen.set(getTitleBar(), viewportBitmap);
@@ -295,37 +284,40 @@
int toTop = ((fromBottom - (ntth + height)) / 2 + ntth);
int toRight = toLeft + width;
int toBottom = toTop + height;
- float scaleFactor = width / (float) mContentView.getWidth();
- mContentView.setVisibility(View.GONE);
- AnimatorSet set1 = new AnimatorSet();
- AnimatorSet inanim = new AnimatorSet();
- ObjectAnimator tx = ObjectAnimator.ofInt(mAnimScreen.mContent, "left",
- fromLeft, toLeft);
- ObjectAnimator ty = ObjectAnimator.ofInt(mAnimScreen.mContent, "top",
- fromTop, toTop);
- ObjectAnimator tr = ObjectAnimator.ofInt(mAnimScreen.mContent, "right",
- fromRight, toRight);
- ObjectAnimator tb = ObjectAnimator.ofInt(mAnimScreen.mContent, "bottom",
- fromBottom, toBottom);
- ObjectAnimator title = ObjectAnimator.ofFloat(mAnimScreen.mTitle, "alpha",
- 1f, 0f);
- ObjectAnimator sx = ObjectAnimator.ofFloat(mAnimScreen, "scaleFactor",
- 1f, scaleFactor);
- ObjectAnimator blend1 = ObjectAnimator.ofFloat(mAnimScreen.mMain,
- "alpha", 1f, 0f);
- blend1.setDuration(100);
+ float toScaleFactor = width / (float) mContentView.getWidth();
+ ObjectAnimator tx = ObjectAnimator.ofInt(mAnimScreen.mContent, "left", fromLeft, toLeft);
+ ObjectAnimator ty = ObjectAnimator.ofInt(mAnimScreen.mContent, "top", fromTop, toTop);
+ ObjectAnimator tr = ObjectAnimator.ofInt(mAnimScreen.mContent, "right", fromRight, toRight);
+ ObjectAnimator tb = ObjectAnimator.ofInt(mAnimScreen.mContent, "bottom", fromBottom, toBottom);
+ ObjectAnimator sx = ObjectAnimator.ofFloat(mAnimScreen, "scaleFactor", 1f, toScaleFactor);
+ ObjectAnimator navTabsIn = ObjectAnimator.ofFloat(mNavScreen.mToolbarLayout, "translationY",
+ -mNavScreen.getResources().getDimensionPixelSize(R.dimen.toolbar_height), 0f);
+ mAnimScreen.mContent.layout(fromLeft, fromTop, fromRight, fromBottom);
+ mAnimScreen.setScaleFactor(1f);
- inanim.playTogether(tx, ty, tr, tb, sx, title);
+ AnimatorSet inanim = new AnimatorSet();
+ inanim.playTogether(tx, ty, tr, tb, sx, navTabsIn);
+ inanim.setInterpolator(new DecelerateInterpolator());
inanim.setDuration(200);
+
+ ObjectAnimator disappear = ObjectAnimator.ofFloat(mAnimScreen.mMain, "alpha", 1f, 0f);
+ disappear.setInterpolator(new DecelerateInterpolator());
+ disappear.setDuration(100);
+
+ AnimatorSet set1 = new AnimatorSet();
set1.addListener(new AnimatorListenerAdapter() {
@Override
+ public void onAnimationStart(Animator animation) {
+ mContentView.setVisibility(View.GONE);
+ }
+ @Override
public void onAnimationEnd(Animator anim) {
mCustomViewContainer.removeView(mAnimScreen.mMain);
finishAnimationIn();
mUiController.setBlockEvents(false);
}
});
- set1.playSequentially(inanim, blend1);
+ set1.playSequentially(inanim, disappear);
set1.start();
mUiController.setBlockEvents(false);
}
@@ -396,39 +388,33 @@
mAnimScreen.mContent.setRight(fromRight);
mAnimScreen.mContent.setBottom(fromBottom);
mAnimScreen.setScaleFactor(1f);
- AnimatorSet set1 = new AnimatorSet();
- ObjectAnimator fade2 = ObjectAnimator.ofFloat(mAnimScreen.mMain, "alpha", 0f, 1f);
- ObjectAnimator fade1 = ObjectAnimator.ofFloat(mNavScreen, "alpha", 1f, 0f);
- set1.playTogether(fade1, fade2);
- set1.setDuration(100);
- AnimatorSet set2 = new AnimatorSet();
- ObjectAnimator l = ObjectAnimator.ofInt(mAnimScreen.mContent, "left",
- fromLeft, toLeft);
- ObjectAnimator t = ObjectAnimator.ofInt(mAnimScreen.mContent, "top",
- fromTop, toTop);
- ObjectAnimator r = ObjectAnimator.ofInt(mAnimScreen.mContent, "right",
- fromRight, toRight);
- ObjectAnimator b = ObjectAnimator.ofInt(mAnimScreen.mContent, "bottom",
- fromBottom, toBottom);
- ObjectAnimator scale = ObjectAnimator.ofFloat(mAnimScreen, "scaleFactor",
- 1f, scaleFactor);
- set2.playTogether(l, t, r, b, scale);
- set2.setDuration(200);
- AnimatorSet combo = new AnimatorSet();
- combo.playSequentially(set1, set2);
- combo.addListener(new AnimatorListenerAdapter() {
+ //ObjectAnimator fade2 = ObjectAnimator.ofFloat(mNavScreen, "alpha", 1f, 0f);
+ //fade2.setDuration(100);
+ AnimatorSet set = new AnimatorSet();
+ ObjectAnimator animAppear = ObjectAnimator.ofFloat(mAnimScreen.mMain, "alpha", 0f, 1f);
+ animAppear.setDuration(100);
+ ObjectAnimator l = ObjectAnimator.ofInt(mAnimScreen.mContent, "left", fromLeft, toLeft);
+ ObjectAnimator t = ObjectAnimator.ofInt(mAnimScreen.mContent, "top", fromTop, toTop);
+ ObjectAnimator r = ObjectAnimator.ofInt(mAnimScreen.mContent, "right", fromRight, toRight);
+ ObjectAnimator b = ObjectAnimator.ofInt(mAnimScreen.mContent, "bottom", fromBottom, toBottom);
+ ObjectAnimator scale = ObjectAnimator.ofFloat(mAnimScreen, "scaleFactor", 1f, scaleFactor);
+ set.playTogether(animAppear, l, t, r, b, scale);
+ set.setInterpolator(new DecelerateInterpolator());
+ set.setDuration(200);
+ set.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator anim) {
checkTabReady();
}
});
- combo.start();
+ set.start();
}
private int mNumTries = 0;
private void checkTabReady() {
boolean isready = true;
+ boolean zeroTries = mNumTries == 0;
Tab tab = mUiController.getTabControl().getCurrentTab();
BrowserWebView webview = null;
if (tab == null)
@@ -456,11 +442,16 @@
}
mNumTries = 0;
final boolean hasCrashed = (webview == null) ? false : webview.hasCrashed();
+ // fast path: don't wait if we've been ready for a while
+ if (zeroTries) {
+ fadeOutCustomViewContainer(hasCrashed);
+ return;
+ }
mCustomViewContainer.postDelayed(new Runnable() {
- public void run() {
- fadeOutCustomViewContainer(hasCrashed);
- }
- }, 33); //WebView is ready, but give it extra 2 frame's time to display and finish the swaps
+ public void run() {
+ fadeOutCustomViewContainer(hasCrashed);
+ }
+ }, 32); //WebView is ready, but give it extra 2 frame's time to display and finish the swaps
}
private void fadeOutCustomViewContainer(boolean hasCrashed) {
@@ -477,6 +468,7 @@
mUiController.setBlockEvents(false);
}
});
+ otheralpha.setInterpolator(new DecelerateInterpolator());
otheralpha.start();
}
@@ -509,16 +501,18 @@
static class AnimScreen {
private View mMain;
- private ImageView mTitle;
private ImageView mContent;
private float mScale;
- private Bitmap mTitleBarBitmap;
public AnimScreen(Context ctx) {
- mMain = LayoutInflater.from(ctx).inflate(R.layout.anim_screen,
- null);
- mTitle = (ImageView) mMain.findViewById(R.id.title);
- mContent = (ImageView) mMain.findViewById(R.id.content);
+ mMain = LayoutInflater.from(ctx).inflate(R.layout.anim_screen, null);
+ mMain.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ // just eat clicks when this view is visible
+ }
+ });
+ mContent = (ImageView) mMain.findViewById(R.id.anim_screen_content);
mContent.setScaleType(ImageView.ScaleType.MATRIX);
mContent.setImageMatrix(new Matrix());
mScale = 1.0f;
@@ -529,47 +523,26 @@
if (tbar == null) {
return;
}
- int embTbarHeight = tbar.getEmbeddedHeight();
- int tbarHeight = tbar.isFixed() ? tbar.calculateEmbeddedHeight() : embTbarHeight;
- if (tbar.getWidth() > 0 && tbarHeight > 0) {
- if (mTitleBarBitmap == null
- || mTitleBarBitmap.getWidth() != tbar.getWidth()
- || mTitleBarBitmap.getHeight() != tbarHeight) {
- mTitleBarBitmap = safeCreateBitmap(tbar.getWidth(),
- tbarHeight);
- }
- if (mTitleBarBitmap != null) {
- Canvas c = new Canvas(mTitleBarBitmap);
- tbar.draw(c);
- c.setBitmap(null);
- }
- } else {
- mTitleBarBitmap = null;
- }
- mTitle.setImageBitmap(mTitleBarBitmap);
- mTitle.setVisibility(View.VISIBLE);
-
mContent.setImageBitmap(viewportBitmap);
}
- private Bitmap safeCreateBitmap(int width, int height) {
+ /*private Bitmap safeCreateBitmap(int width, int height) {
if (width <= 0 || height <= 0) {
Log.w(LOGTAG, "safeCreateBitmap failed! width: " + width
+ ", height: " + height);
return null;
}
return Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565);
- }
+ }*/
public void set(Bitmap image) {
- mTitle.setVisibility(View.GONE);
mContent.setImageBitmap(image);
}
private void setScaleFactor(float sf) {
mScale = sf;
Matrix m = new Matrix();
- m.postScale(sf,sf);
+ m.postScale(sf, sf);
mContent.setImageMatrix(m);
}
diff --git a/src/com/android/browser/SuggestionsAdapter.java b/src/com/android/browser/SuggestionsAdapter.java
index 41d2b74..78c454f 100644
--- a/src/com/android/browser/SuggestionsAdapter.java
+++ b/src/com/android/browser/SuggestionsAdapter.java
@@ -178,16 +178,16 @@
switch (item.type) {
case TYPE_SUGGEST:
case TYPE_SEARCH:
- id = R.drawable.ic_search_category_suggest;
+ id = R.drawable.ic_suggest_search_normal;
break;
case TYPE_BOOKMARK:
- id = R.drawable.ic_search_category_bookmark;
+ id = R.drawable.ic_suggest_bookmark_normal;
break;
case TYPE_HISTORY:
- id = R.drawable.ic_search_category_history;
+ id = R.drawable.ic_suggest_history_normal;
break;
case TYPE_SUGGEST_URL:
- id = R.drawable.ic_search_category_browser;
+ id = R.drawable.ic_suggest_browser_normal;
break;
default:
id = -1;
diff --git a/src/com/android/browser/TabBar.java b/src/com/android/browser/TabBar.java
index a4e039d..c8a4815 100644
--- a/src/com/android/browser/TabBar.java
+++ b/src/com/android/browser/TabBar.java
@@ -25,12 +25,10 @@
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Bitmap;
-import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Path;
-import android.graphics.Shader;
import android.graphics.drawable.Drawable;
import android.view.Gravity;
import android.view.LayoutInflater;
@@ -45,8 +43,6 @@
import java.util.List;
import java.util.Map;
-import com.android.browser.R;
-
/**
* tabbed title bar for xlarge screen browser
*/
@@ -71,8 +67,8 @@
private int mCurrentTextureWidth = 0;
private int mCurrentTextureHeight = 0;
- private Drawable mActiveDrawable;
- private Drawable mInactiveDrawable;
+ ///private Drawable mActiveDrawable;
+ ///private Drawable mInactiveDrawable;
private final Paint mActiveShaderPaint = new Paint();
private final Paint mInactiveShaderPaint = new Paint();
@@ -80,8 +76,8 @@
private final Matrix mActiveMatrix = new Matrix();
private final Matrix mInactiveMatrix = new Matrix();
- private BitmapShader mActiveShader;
- private BitmapShader mInactiveShader;
+ ///private BitmapShader mActiveShader;
+ ///private BitmapShader mInactiveShader;
private int mTabOverlap;
private int mAddTabOverlap;
@@ -95,8 +91,8 @@
mUi = ui;
Resources res = activity.getResources();
mTabWidth = (int) res.getDimension(R.dimen.tab_width);
- mActiveDrawable = res.getDrawable(R.drawable.bg_urlbar);
- mInactiveDrawable = res.getDrawable(R.drawable.browsertab_inactive);
+ ///mActiveDrawable = res.getDrawable(R.drawable.bg_urlbar);
+ ///mInactiveDrawable = res.getDrawable(R.drawable.browsertab_inactive);
mTabMap = new HashMap<Tab, TabView>();
LayoutInflater factory = LayoutInflater.from(activity);
@@ -226,7 +222,7 @@
TextView mTitle;
View mIncognito;
View mSnapshot;
- ImageView mIconView;
+ ImageView mFaviconView;
ImageView mLock;
ImageView mClose;
boolean mSelected;
@@ -250,7 +246,7 @@
LayoutInflater inflater = LayoutInflater.from(getContext());
mTabContent = inflater.inflate(R.layout.tab_title, this, true);
mTitle = (TextView) mTabContent.findViewById(R.id.title);
- mIconView = (ImageView) mTabContent.findViewById(R.id.favicon);
+ mFaviconView = (ImageView) mTabContent.findViewById(R.id.favicon);
mLock = (ImageView) mTabContent.findViewById(R.id.lock);
mClose = (ImageView) mTabContent.findViewById(R.id.close);
mClose.setOnClickListener(this);
@@ -292,7 +288,7 @@
public void setActivated(boolean selected) {
mSelected = selected;
mClose.setVisibility(mSelected ? View.VISIBLE : View.GONE);
- mIconView.setVisibility(mSelected ? View.GONE : View.VISIBLE);
+ mFaviconView.setVisibility(mSelected ? View.GONE : View.VISIBLE);
mTitle.setTextAppearance(mActivity, mSelected ?
R.style.TabTitleSelected : R.style.TabTitleUnselected);
setHorizontalFadingEdgeEnabled(!mSelected);
@@ -314,7 +310,7 @@
}
void setFavicon(Drawable d) {
- mIconView.setImageDrawable(d);
+ mFaviconView.setImageDrawable(d);
}
void setLock(Drawable d) {
@@ -341,7 +337,7 @@
setFocusPath(mFocusPath, 0, 0, r - l, b - t);
}
- @Override
+ /*@Override
protected void dispatchDraw(Canvas canvas) {
if (mCurrentTextureWidth != mUi.getContentWidth() ||
mCurrentTextureHeight != getHeight()) {
@@ -383,7 +379,7 @@
if (isFocused()) {
canvas.drawPath(mFocusPath, mFocusPaint);
}
- }
+ }*/
private void setTabPath(Path path, int l, int t, int r, int b) {
path.reset();
diff --git a/src/com/android/browser/TabControl.java b/src/com/android/browser/TabControl.java
index 84330c1..0d16b59 100644
--- a/src/com/android/browser/TabControl.java
+++ b/src/com/android/browser/TabControl.java
@@ -21,6 +21,7 @@
import org.codeaurora.swe.GeolocationPermissions;
import org.codeaurora.swe.WebView;
+import org.codeaurora.swe.util.Observable;
import java.util.ArrayList;
import java.util.HashMap;
@@ -56,6 +57,8 @@
private OnThumbnailUpdatedListener mOnThumbnailUpdatedListener;
+ private Observable mTabCountObservable;
+
/**
* Construct a new TabControl object
*/
@@ -64,12 +67,18 @@
mMaxTabs = mController.getMaxTabs();
mTabs = new ArrayList<Tab>(mMaxTabs);
mTabQueue = new ArrayList<Tab>(mMaxTabs);
+ mTabCountObservable = new Observable();
+ mTabCountObservable.set(0);
}
synchronized static long getNextId() {
return sNextId++;
}
+ Observable getTabCountObservable() {
+ return mTabCountObservable;
+ }
+
/**
* Return the current tab's main WebView. This will always return the main
* WebView for a given tab and not a subwindow.
@@ -181,6 +190,7 @@
}
}
mTabs.add(tab);
+ mTabCountObservable.set(mTabs.size());
tab.setController(mController);
mController.onSetWebView(tab, tab.getWebView());
tab.putInBackground();
@@ -207,6 +217,7 @@
// Create a new tab and add it to the tab list
Tab t = new Tab(mController, w, state);
mTabs.add(t);
+ mTabCountObservable.set(mTabs.size());
if (privateBrowsing) {
mNumIncognito += 1;
}
@@ -226,6 +237,7 @@
SnapshotTab createSnapshotTab(long snapshotId) {
SnapshotTab t = new SnapshotTab(mController, snapshotId);
mTabs.add(t);
+ mTabCountObservable.set(mTabs.size());
return t;
}
@@ -253,6 +265,7 @@
// Remove t from our list of tabs.
mTabs.remove(t);
+ mTabCountObservable.set(mTabs.size());
//Clear incognito geolocation state if this is the last incognito tab.
if (t.isPrivateBrowsingEnabled()) {
@@ -435,6 +448,7 @@
Tab t = new Tab(mController, state);
tabMap.put(id, t);
mTabs.add(t);
+ mTabCountObservable.set(mTabs.size());
// added the tab to the front as they are not current
mTabQueue.add(0, t);
}
diff --git a/src/com/android/browser/TitleBar.java b/src/com/android/browser/TitleBar.java
index 4fc56c6..741dc41 100644
--- a/src/com/android/browser/TitleBar.java
+++ b/src/com/android/browser/TitleBar.java
@@ -34,8 +34,6 @@
import android.view.animation.DecelerateInterpolator;
import org.codeaurora.swe.WebView;
-import com.android.browser.R;
-
import android.widget.FrameLayout;
import android.widget.RelativeLayout;
diff --git a/src/com/android/browser/XLargeUi.java b/src/com/android/browser/XLargeUi.java
index 83d7439..a87b045 100644
--- a/src/com/android/browser/XLargeUi.java
+++ b/src/com/android/browser/XLargeUi.java
@@ -104,6 +104,9 @@
if (bm != null) {
bm.setVisible(false);
}
+
+ menu.setGroupVisible(R.id.NAV_MENU, false);
+
return true;
}
@@ -262,16 +265,19 @@
@Override
public Drawable getFaviconDrawable(Bitmap icon) {
- Drawable[] array = new Drawable[2];
- array[0] = getFaviconBackground();
- if (icon == null) {
- array[1] = getGenericFavicon();
- } else {
- array[1] = new BitmapDrawable(mActivity.getResources(), icon);
+ if (ENABLE_BORDER_AROUND_FAVICON) {
+ Drawable[] array = new Drawable[2];
+ array[0] = getFaviconBackground();
+ if (icon == null) {
+ array[1] = getGenericFavicon();
+ } else {
+ array[1] = new BitmapDrawable(mActivity.getResources(), icon);
+ }
+ LayerDrawable d = new LayerDrawable(array);
+ d.setLayerInset(1, 2, 2, 2, 2);
+ return d;
}
- LayerDrawable d = new LayerDrawable(array);
- d.setLayerInset(1, 2, 2, 2, 2);
- return d;
+ return icon == null ? getGenericFavicon() : new BitmapDrawable(mActivity.getResources(), icon);
}
}
diff --git a/src/com/android/browser/appmenu/AppMenu.java b/src/com/android/browser/appmenu/AppMenu.java
index a0ff710..66ddc9f 100644
--- a/src/com/android/browser/appmenu/AppMenu.java
+++ b/src/com/android/browser/appmenu/AppMenu.java
@@ -235,6 +235,9 @@
// The menu is displayed above the anchored view, so shift the menu up by the bottom
// padding of the background.
int verticalOffset = appRect.height() - popup.getHeight() + padding.bottom;
+ if (anchorLocation[1] > 0) {
+ verticalOffset -= anchorHeight;
+ }
popup.setVerticalOffset(verticalOffset);
} else {
// The menu is displayed over and below the anchored view, so shift the menu up by the
diff --git a/src/com/android/browser/appmenu/AppMenuAdapter.java b/src/com/android/browser/appmenu/AppMenuAdapter.java
index 6a8cdb4..425e91c 100644
--- a/src/com/android/browser/appmenu/AppMenuAdapter.java
+++ b/src/com/android/browser/appmenu/AppMenuAdapter.java
@@ -292,7 +292,6 @@
} else {
holder = (FourButtonMenuItemViewHolder) convertView.getTag();
}
-
setupImageButton(holder.buttons[0], item.getSubMenu().getItem(0));
setupImageButton(holder.buttons[1], item.getSubMenu().getItem(1));
setupImageButton(holder.buttons[2], item.getSubMenu().getItem(2));
@@ -391,17 +390,13 @@
}
private void setupMenuButton(ImageButton button) {
- button.setImageResource(R.drawable.ic_menu_overflow);
- button.setEnabled(true);
- button.setFocusable(true);
+ button.setSelected(true);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
mAppMenu.dismiss();
}
});
-
- button.setScaleType(ScaleType.CENTER);
}
/**
diff --git a/src/com/android/browser/preferences/WebsiteSettingsFragment.java b/src/com/android/browser/preferences/WebsiteSettingsFragment.java
index 38c1926..020492c 100644
--- a/src/com/android/browser/preferences/WebsiteSettingsFragment.java
+++ b/src/com/android/browser/preferences/WebsiteSettingsFragment.java
@@ -227,9 +227,9 @@
mUsageHighIcon = BitmapFactory.decodeResource(getResources(),
R.drawable.ic_list_data_large);
mLocationAllowedIcon = BitmapFactory.decodeResource(getResources(),
- R.drawable.ic_gps_on_holo_dark);
+ R.drawable.ic_action_gps_on);
mLocationDisallowedIcon = BitmapFactory.decodeResource(getResources(),
- R.drawable.ic_gps_denied_holo_dark);
+ R.drawable.ic_action_gps_off);
mCurrentSite = site;
if (mCurrentSite == null) {
askForOrigins();
diff --git a/src/com/android/browser/provider/BrowserProvider.java b/src/com/android/browser/provider/BrowserProvider.java
index 0d27d8d..c86ae84 100644
--- a/src/com/android/browser/provider/BrowserProvider.java
+++ b/src/com/android/browser/provider/BrowserProvider.java
@@ -608,16 +608,16 @@
if (type == 1) {
if (mHistoryCursor.getInt(3) == 1) {
return Integer.valueOf(
- R.drawable.ic_search_category_bookmark)
+ R.drawable.ic_suggest_bookmark_normal)
.toString();
} else {
return Integer.valueOf(
- R.drawable.ic_search_category_history)
+ R.drawable.ic_suggest_history_normal)
.toString();
}
} else {
return Integer.valueOf(
- R.drawable.ic_search_category_suggest)
+ R.drawable.ic_suggest_search_normal)
.toString();
}
diff --git a/src/com/android/browser/search/OpenSearchSearchEngine.java b/src/com/android/browser/search/OpenSearchSearchEngine.java
index 2cd4670..eb7c97e 100644
--- a/src/com/android/browser/search/OpenSearchSearchEngine.java
+++ b/src/com/android/browser/search/OpenSearchSearchEngine.java
@@ -246,7 +246,7 @@
Log.w(TAG, "Error", e);
}
} else if (column == COLUMN_INDEX_ICON) {
- return String.valueOf(R.drawable.magnifying_glass);
+ return String.valueOf(R.drawable.ic_action_search_normal);
}
}
return null;
diff --git a/src/com/android/browser/view/StopProgressView.java b/src/com/android/browser/view/StopProgressView.java
deleted file mode 100644
index 3df099d..0000000
--- a/src/com/android/browser/view/StopProgressView.java
+++ /dev/null
@@ -1,98 +0,0 @@
-
-package com.android.browser.view;
-
-import com.android.browser.R;
-
-import android.content.Context;
-import android.graphics.Canvas;
-import android.graphics.drawable.Drawable;
-import android.util.AttributeSet;
-import android.widget.ProgressBar;
-
-
-public class StopProgressView extends ProgressBar {
-
- Drawable mOverlayDrawable;
- Drawable mProgressDrawable;
- int mWidth;
- int mHeight;
-
- /**
- * @param context
- * @param attrs
- * @param defStyle
- * @param styleRes
- */
- public StopProgressView(Context context, AttributeSet attrs, int defStyle, int styleRes) {
- super(context, attrs, defStyle);
- init(attrs);
- }
-
- /**
- * @param context
- * @param attrs
- * @param defStyle
- */
- public StopProgressView(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
- init(attrs);
- }
-
- /**
- * @param context
- * @param attrs
- */
- public StopProgressView(Context context, AttributeSet attrs) {
- super(context, attrs);
- init(attrs);
- }
-
- /**
- * @param context
- */
- public StopProgressView(Context context) {
- super(context);
- init(null);
- }
-
- private void init(AttributeSet attrs) {
- mProgressDrawable = getIndeterminateDrawable();
- setImageDrawable(getContext().getResources()
- .getDrawable(R.drawable.ic_stop_holo_dark));
- }
-
- public void hideProgress() {
- setIndeterminateDrawable(null);
- }
-
- public void showProgress() {
- setIndeterminateDrawable(mProgressDrawable);
- }
-
- @Override
- protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
- super.onLayout(changed, left, top, right, bottom);
- mWidth = (right - left) * 2 / 3;
- mHeight = (bottom - top) * 2 / 3;
- }
-
- @Override
- protected void onDraw(Canvas canvas) {
- super.onDraw(canvas);
- if (mOverlayDrawable != null) {
- int l = (getWidth() - mWidth) / 2;
- int t = (getHeight() - mHeight) / 2;
- mOverlayDrawable.setBounds(l, t, l + mWidth, t + mHeight);
- mOverlayDrawable.draw(canvas);
- }
- }
-
- public Drawable getDrawable() {
- return mOverlayDrawable;
- }
-
- public void setImageDrawable(Drawable d) {
- mOverlayDrawable = d;
- }
-
-}