Spec update for Bookmark widget

 Bug: 3286323
 This updates both the assets for the bookmark widget and slightly
 alters its behavior to match the updated spec. There are now two
 touch targets in the header, one launches the browser and the other
 launches the bookmarks view.

Change-Id: I1e8864983852af8421280b86421dea1d9ed4335e
diff --git a/res/drawable-hdpi/bg_bookmark_widget_holo.9.png b/res/drawable-hdpi/bg_bookmark_widget_holo.9.png
new file mode 100644
index 0000000..8a23d6f
--- /dev/null
+++ b/res/drawable-hdpi/bg_bookmark_widget_holo.9.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_ic_back_bookmark_widget_holo_dark.png b/res/drawable-hdpi/btn_ic_back_bookmark_widget_holo_dark.png
new file mode 100644
index 0000000..447f3af
--- /dev/null
+++ b/res/drawable-hdpi/btn_ic_back_bookmark_widget_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_ic_bookmark_bookmark_widget_holo_dark.png b/res/drawable-hdpi/btn_ic_bookmark_bookmark_widget_holo_dark.png
new file mode 100644
index 0000000..1c10e98
--- /dev/null
+++ b/res/drawable-hdpi/btn_ic_bookmark_bookmark_widget_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/gradient_overlay_bg_bookmark_widget_holo.png b/res/drawable-hdpi/gradient_overlay_bg_bookmark_widget_holo.png
new file mode 100644
index 0000000..1a84583
--- /dev/null
+++ b/res/drawable-hdpi/gradient_overlay_bg_bookmark_widget_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/header_bg_bookmark_widget_holo.png b/res/drawable-hdpi/header_bg_bookmark_widget_holo.png
new file mode 100644
index 0000000..8d0706a
--- /dev/null
+++ b/res/drawable-hdpi/header_bg_bookmark_widget_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/header_row_focused_bookmark_widget_holo.9.png b/res/drawable-hdpi/header_row_focused_bookmark_widget_holo.9.png
new file mode 100644
index 0000000..b3406fd
--- /dev/null
+++ b/res/drawable-hdpi/header_row_focused_bookmark_widget_holo.9.png
Binary files differ
diff --git a/res/drawable-hdpi/header_row_press_bookmark_widget_holo.9.png b/res/drawable-hdpi/header_row_press_bookmark_widget_holo.9.png
new file mode 100644
index 0000000..2a6ff60
--- /dev/null
+++ b/res/drawable-hdpi/header_row_press_bookmark_widget_holo.9.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_browser_bookmark_widget_holo.png b/res/drawable-hdpi/ic_browser_bookmark_widget_holo.png
new file mode 100644
index 0000000..1fb772e
--- /dev/null
+++ b/res/drawable-hdpi/ic_browser_bookmark_widget_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_folder_bookmark_widget_holo_dark.png b/res/drawable-hdpi/ic_folder_bookmark_widget_holo_dark.png
new file mode 100644
index 0000000..8a167e2
--- /dev/null
+++ b/res/drawable-hdpi/ic_folder_bookmark_widget_holo_dark.png
Binary files differ
diff --git a/res/drawable-hdpi/list_div_bookmark_widget_holo.9.png b/res/drawable-hdpi/list_div_bookmark_widget_holo.9.png
new file mode 100644
index 0000000..65f42ba
--- /dev/null
+++ b/res/drawable-hdpi/list_div_bookmark_widget_holo.9.png
Binary files differ
diff --git a/res/drawable-hdpi/list_div_top_btm_bookmark_widget_holo.9.png b/res/drawable-hdpi/list_div_top_btm_bookmark_widget_holo.9.png
new file mode 100644
index 0000000..e9165d2
--- /dev/null
+++ b/res/drawable-hdpi/list_div_top_btm_bookmark_widget_holo.9.png
Binary files differ
diff --git a/res/drawable-hdpi/row_activated_bookmark_widget_holo.9.png b/res/drawable-hdpi/row_activated_bookmark_widget_holo.9.png
new file mode 100644
index 0000000..b6cfc4c
--- /dev/null
+++ b/res/drawable-hdpi/row_activated_bookmark_widget_holo.9.png
Binary files differ
diff --git a/res/drawable-hdpi/stripes_overlay_bg_bookmark_widget_holo.png b/res/drawable-hdpi/stripes_overlay_bg_bookmark_widget_holo.png
new file mode 100644
index 0000000..95d24fa
--- /dev/null
+++ b/res/drawable-hdpi/stripes_overlay_bg_bookmark_widget_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/bg_bookmark_widget_holo.9.png b/res/drawable-mdpi/bg_bookmark_widget_holo.9.png
new file mode 100644
index 0000000..ac56bbe
--- /dev/null
+++ b/res/drawable-mdpi/bg_bookmark_widget_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_ic_back_bookmark_widget_holo_dark.png b/res/drawable-mdpi/btn_ic_back_bookmark_widget_holo_dark.png
new file mode 100644
index 0000000..d8697b8
--- /dev/null
+++ b/res/drawable-mdpi/btn_ic_back_bookmark_widget_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_ic_bookmark_bookmark_widget_holo_dark.png b/res/drawable-mdpi/btn_ic_bookmark_bookmark_widget_holo_dark.png
new file mode 100644
index 0000000..21a2cc3
--- /dev/null
+++ b/res/drawable-mdpi/btn_ic_bookmark_bookmark_widget_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/gradient_overlay_bg_bookmark_widget_holo.png b/res/drawable-mdpi/gradient_overlay_bg_bookmark_widget_holo.png
new file mode 100644
index 0000000..1673338
--- /dev/null
+++ b/res/drawable-mdpi/gradient_overlay_bg_bookmark_widget_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/header_bg_bookmark_widget_holo.png b/res/drawable-mdpi/header_bg_bookmark_widget_holo.png
new file mode 100644
index 0000000..9c3f7a6
--- /dev/null
+++ b/res/drawable-mdpi/header_bg_bookmark_widget_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/header_row_focused_bookmark_widget_holo.9.png b/res/drawable-mdpi/header_row_focused_bookmark_widget_holo.9.png
new file mode 100644
index 0000000..b745159
--- /dev/null
+++ b/res/drawable-mdpi/header_row_focused_bookmark_widget_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/header_row_press_bookmark_widget_holo.9.png b/res/drawable-mdpi/header_row_press_bookmark_widget_holo.9.png
new file mode 100644
index 0000000..2e8874e
--- /dev/null
+++ b/res/drawable-mdpi/header_row_press_bookmark_widget_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_browser_bookmark_widget_holo.png b/res/drawable-mdpi/ic_browser_bookmark_widget_holo.png
new file mode 100644
index 0000000..0d9e49d
--- /dev/null
+++ b/res/drawable-mdpi/ic_browser_bookmark_widget_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_folder_bookmark_widget_holo_dark.png b/res/drawable-mdpi/ic_folder_bookmark_widget_holo_dark.png
new file mode 100644
index 0000000..910e9ec
--- /dev/null
+++ b/res/drawable-mdpi/ic_folder_bookmark_widget_holo_dark.png
Binary files differ
diff --git a/res/drawable-mdpi/list_div_bookmark_widget_holo.9.png b/res/drawable-mdpi/list_div_bookmark_widget_holo.9.png
new file mode 100644
index 0000000..fc1946f
--- /dev/null
+++ b/res/drawable-mdpi/list_div_bookmark_widget_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/list_div_top_btm_bookmark_widget_holo.9.png b/res/drawable-mdpi/list_div_top_btm_bookmark_widget_holo.9.png
new file mode 100644
index 0000000..309b608
--- /dev/null
+++ b/res/drawable-mdpi/list_div_top_btm_bookmark_widget_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/row_activated_bookmark_widget_holo.9.png b/res/drawable-mdpi/row_activated_bookmark_widget_holo.9.png
new file mode 100644
index 0000000..ed8760f
--- /dev/null
+++ b/res/drawable-mdpi/row_activated_bookmark_widget_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/stripes_overlay_bg_bookmark_widget_holo.png b/res/drawable-mdpi/stripes_overlay_bg_bookmark_widget_holo.png
new file mode 100644
index 0000000..8c9614b
--- /dev/null
+++ b/res/drawable-mdpi/stripes_overlay_bg_bookmark_widget_holo.png
Binary files differ
diff --git a/res/drawable/preview.png b/res/drawable/preview.png
index b363ab5..b239716 100644
--- a/res/drawable/preview.png
+++ b/res/drawable/preview.png
Binary files differ
diff --git a/res/drawable/widget_background.xml b/res/drawable/widget_background.xml
new file mode 100644
index 0000000..de6c3f2
--- /dev/null
+++ b/res/drawable/widget_background.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<layer-list
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <bitmap
+            android:src="@drawable/gradient_overlay_bg_bookmark_widget_holo"
+            android:gravity="top|fill_horizontal" />
+    </item>
+    <item>
+        <bitmap
+            android:src="@drawable/stripes_overlay_bg_bookmark_widget_holo"
+            android:gravity="top|fill_horizontal" />
+    </item>
+</layer-list>
diff --git a/res/drawable/widget_header_selector.xml b/res/drawable/widget_header_selector.xml
new file mode 100644
index 0000000..0e6bc47
--- /dev/null
+++ b/res/drawable/widget_header_selector.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:exitFadeDuration="@android:integer/config_mediumAnimTime">
+    <item
+        android:state_window_focused="false"
+        android:drawable="@android:color/transparent" />
+    <item
+        android:state_focused="true"
+        android:state_pressed="true"
+        android:drawable="@drawable/header_row_press_bookmark_widget_holo" />
+    <item
+        android:state_focused="false"
+        android:state_pressed="true"
+        android:drawable="@drawable/header_row_press_bookmark_widget_holo" />
+    <item
+        android:state_focused="true"
+        android:drawable="@drawable/header_row_focused_bookmark_widget_holo" />
+</selector>
diff --git a/res/layout/bookmarklistwidget.xml b/res/layout/bookmarklistwidget.xml
index 17aee1d..f3857f8 100644
--- a/res/layout/bookmarklistwidget.xml
+++ b/res/layout/bookmarklistwidget.xml
@@ -13,41 +13,87 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-
-<LinearLayout
+<FrameLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:orientation="vertical"
-    android:background="@null"
-    android:focusable="true"
-    android:clickable="true">
+    android:paddingTop="4dip"
+    android:paddingBottom="20dip"
+    android:paddingLeft="12dip"
+    android:paddingRight="12dip">
     <LinearLayout
-        android:id="@+id/header"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:padding="8dip"
-        android:background="@color/bookmarkWidgetHeader">
-        <ImageView
-            android:id="@+id/logo"
-            android:layout_width="32dp"
-            android:layout_height="32dp"
-            android:src="@mipmap/ic_launcher_browser" />
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
-            android:text="@string/tab_bookmarks"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:paddingLeft="8dip" />
-    </LinearLayout>
-    <ListView
-        android:id="@+id/bookmarks_list"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:background="@color/bookmarkWidgetItemBackground"
-        android:cacheColorHint="@color/bookmarkWidgetItemBackground"
-        android:dividerHeight="1px"
-        android:divider="@color/bookmarkWidgetDivider" />
-</LinearLayout>
+        android:orientation="vertical"
+        android:background="@drawable/bg_bookmark_widget_holo"
+        android:paddingLeft="0dip"
+        android:paddingRight="0dip"
+        android:paddingBottom="0dip">
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="42dip"
+            android:orientation="horizontal"
+            android:background="@drawable/header_bg_bookmark_widget_holo"
+            android:layout_marginLeft="5dip"
+            android:layout_marginRight="5dip">
+            <LinearLayout
+                android:id="@+id/header_browser"
+                android:layout_width="0dip"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:orientation="horizontal"
+                android:paddingLeft="16dip"
+                android:focusable="true"
+                android:clickable="true"
+                android:background="@drawable/widget_header_selector">
+                <ImageView
+                    android:id="@+id/logo"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:src="@drawable/ic_browser_bookmark_widget_holo" />
+                <TextView
+                    android:layout_width="0dip"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:layout_gravity="center_vertical"
+                    android:text="@string/application_name"
+                    android:textAppearance="?android:attr/textAppearanceMedium"
+                    android:textStyle="bold"
+                    android:paddingLeft="8dip" />
+            </LinearLayout>
+            <ImageView
+                android:id="@+id/header_bookmarks"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:src="@drawable/btn_ic_bookmark_bookmark_widget_holo_dark"
+                android:scaleType="centerInside"
+                android:focusable="true"
+                android:clickable="true"
+                android:background="@drawable/widget_header_selector"
+                android:paddingLeft="8dip"
+                android:paddingRight="8dip" />
+        </LinearLayout>
+        <ImageView android:background="@drawable/list_div_top_btm_bookmark_widget_holo"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:layout_marginLeft="2dip"
+            android:layout_marginRight="2dip" />
+        <ListView
+            android:id="@+id/bookmarks_list"
+            android:layout_width="match_parent"
+            android:layout_height="0dip"
+            android:layout_weight="1"
+            android:background="@drawable/widget_background"
+            android:cacheColorHint="@android:color/transparent"
+            android:divider="@drawable/list_div_bookmark_widget_holo"
+            android:layout_marginLeft="5dip"
+            android:layout_marginRight="5dip" />
+        <ImageView android:background="@drawable/list_div_top_btm_bookmark_widget_holo"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:layout_marginLeft="2dip"
+            android:layout_marginRight="2dip"
+            android:layout_marginBottom="2dip" />
+    </LinearLayout>
+</FrameLayout>
diff --git a/res/layout/bookmarklistwidget_item.xml b/res/layout/bookmarklistwidget_item.xml
index 9e41d39..039bc2c 100644
--- a/res/layout/bookmarklistwidget_item.xml
+++ b/res/layout/bookmarklistwidget_item.xml
@@ -18,23 +18,23 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/list_item"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:minHeight="@dimen/widgetItemMinHeight"
+    android:layout_height="48dp"
     android:orientation="horizontal"
-    android:padding="8dip"
-    android:background="@color/bookmarkWidgetFolderBackground">
+    android:background="@drawable/row_activated_bookmark_widget_holo">
     <ImageView
         android:id="@+id/thumb"
         android:src="@drawable/browser_thumbnail"
-        android:layout_height="24dp"
-        android:layout_width="24dp"
+        android:layout_height="32dp"
+        android:layout_width="32dp"
         android:layout_gravity="center_vertical"
+        android:layout_marginLeft="16dp"
         android:scaleType="fitXY"/>
     <TextView
         android:id="@+id/label"
-        android:layout_width="wrap_content"
+        android:layout_width="0dip"
         android:layout_height="wrap_content"
         android:layout_gravity="center_vertical"
+        android:layout_weight="1"
         android:textAppearance="?android:attr/textAppearanceSmall"
         android:paddingLeft="8dip"
         android:maxLines="1"
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index 28a144d..95e795c 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -448,6 +448,9 @@
 
     @Override
     public void showComboView(boolean startWithHistory, Bundle extras) {
+        if (mComboView != null) {
+            return;
+        }
         mComboView = new CombinedBookmarkHistoryView(mActivity,
                 mUiController,
                 startWithHistory ?
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 8282eb0..ba5ba29 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -39,6 +39,8 @@
 
 public class BrowserActivity extends Activity {
 
+    public static final String ACTION_SHOW_BOOKMARKS = "show_bookmarks";
+    public static final String ACTION_SHOW_BROWSER = "show_browser";
     public static final String ACTION_RESTART = "--restart--";
     private static final String EXTRA_STATE = "state";
 
diff --git a/src/com/android/browser/BrowserBookmarksAdapter.java b/src/com/android/browser/BrowserBookmarksAdapter.java
index f587f01..c680a88 100644
--- a/src/com/android/browser/BrowserBookmarksAdapter.java
+++ b/src/com/android/browser/BrowserBookmarksAdapter.java
@@ -81,7 +81,7 @@
         tv.setText(cursor.getString(BookmarksLoader.COLUMN_INDEX_TITLE));
         if (cursor.getInt(BookmarksLoader.COLUMN_INDEX_IS_FOLDER) != 0) {
             // folder
-            favicon.setImageResource(R.drawable.ic_folder);
+            favicon.setImageResource(R.drawable.ic_folder_bookmark_widget_holo_dark);
         } else {
             byte[] faviconData = cursor.getBlob(BookmarksLoader.COLUMN_INDEX_FAVICON);
             Bitmap faviconBitmap = null;
diff --git a/src/com/android/browser/BrowserBookmarksPage.java b/src/com/android/browser/BrowserBookmarksPage.java
index c030915..c39218c 100644
--- a/src/com/android/browser/BrowserBookmarksPage.java
+++ b/src/com/android/browser/BrowserBookmarksPage.java
@@ -369,7 +369,7 @@
         if (isFolder) {
             item.setUrl(null);
             Bitmap bitmap =
-                BitmapFactory.decodeResource(getResources(), R.drawable.ic_folder);
+                BitmapFactory.decodeResource(getResources(), R.drawable.ic_folder_bookmark_widget_holo_dark);
             item.setFavicon(bitmap);
             new LookupBookmarkCount(getActivity(), item)
                     .execute(cursor.getLong(BookmarksLoader.COLUMN_INDEX_ID));
@@ -472,6 +472,7 @@
         }
         mCrumbs.setController(null);
         mCrumbs = null;
+        getLoaderManager().stopLoader(LOADER_BOOKMARKS);
     }
 
     @Override
diff --git a/src/com/android/browser/BrowserHistoryPage.java b/src/com/android/browser/BrowserHistoryPage.java
index 18feee9..c623012 100644
--- a/src/com/android/browser/BrowserHistoryPage.java
+++ b/src/com/android/browser/BrowserHistoryPage.java
@@ -209,8 +209,8 @@
         mEmptyView = root.findViewById(android.R.id.empty);
 
         // Start the loader
-        getLoaderManager().initLoader(LOADER_HISTORY, null, this);
-        getLoaderManager().initLoader(LOADER_MOST_VISITED, null, this);
+        getLoaderManager().restartLoader(LOADER_HISTORY, null, this);
+        getLoaderManager().restartLoader(LOADER_MOST_VISITED, null, this);
 
         // Register to receive icons in case they haven't all been loaded.
         CombinedBookmarkHistoryView.getIconListenerSet().addListener(mIconReceiver);
diff --git a/src/com/android/browser/CombinedBookmarkHistoryView.java b/src/com/android/browser/CombinedBookmarkHistoryView.java
index e63d126..cc56489 100644
--- a/src/com/android/browser/CombinedBookmarkHistoryView.java
+++ b/src/com/android/browser/CombinedBookmarkHistoryView.java
@@ -43,7 +43,6 @@
 interface BookmarksHistoryCallbacks {
     public void onUrlSelected(String url, boolean newWindow);
     public void onRemoveParentChildRelationships();
-    public void onComboCanceled();
 }
 
 public class CombinedBookmarkHistoryView extends LinearLayout
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index d49a778..11b6bd7 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -318,6 +318,9 @@
         if (jsFlags.trim().length() != 0) {
             getCurrentWebView().setJsFlags(jsFlags);
         }
+        if (BrowserActivity.ACTION_SHOW_BOOKMARKS.equals(intent.getAction())) {
+            bookmarksOrHistoryPicker(false);
+        }
     }
 
     void setWebViewFactory(WebViewFactory factory) {
@@ -1131,14 +1134,6 @@
     }
 
     /**
-     * callback from ComboPage when dismissed
-     */
-    @Override
-    public void onComboCanceled() {
-        removeComboView();
-    }
-
-    /**
      * dismiss the ComboPage
      */
     @Override
diff --git a/src/com/android/browser/IntentHandler.java b/src/com/android/browser/IntentHandler.java
index cbbc482..bd5595f 100644
--- a/src/com/android/browser/IntentHandler.java
+++ b/src/com/android/browser/IntentHandler.java
@@ -84,6 +84,14 @@
             // just resume the browser
             return;
         }
+        if (BrowserActivity.ACTION_SHOW_BOOKMARKS.equals(action)) {
+            mController.bookmarksOrHistoryPicker(false);
+            return;
+        }
+        if (BrowserActivity.ACTION_SHOW_BROWSER.equals(action)) {
+            mController.removeComboView();
+            return;
+        }
         // In case the SearchDialog is open.
         ((SearchManager) mActivity.getSystemService(Context.SEARCH_SERVICE))
                 .stopSearch();
diff --git a/src/com/android/browser/widget/BookmarkListWidgetProvider.java b/src/com/android/browser/widget/BookmarkListWidgetProvider.java
index 2196ae0..99daaa1 100644
--- a/src/com/android/browser/widget/BookmarkListWidgetProvider.java
+++ b/src/com/android/browser/widget/BookmarkListWidgetProvider.java
@@ -79,6 +79,10 @@
 
     private void performUpdate(Context context,
             AppWidgetManager appWidgetManager, int[] appWidgetIds) {
+        Intent launchBrowser = new Intent(BrowserActivity.ACTION_SHOW_BROWSER,
+                null, context, BrowserActivity.class);
+        Intent launchBookmarks = new Intent(BrowserActivity.ACTION_SHOW_BOOKMARKS,
+                null, context, BrowserActivity.class);
         // Update the widgets
         for (int appWidgetId : appWidgetIds) {
             Intent updateIntent = new Intent(context, BookmarkListWidgetService.class);
@@ -92,9 +96,10 @@
             views.setPendingIntentTemplate(R.id.bookmarks_list,
                     PendingIntent.getService(context, 0, ic,
                     PendingIntent.FLAG_UPDATE_CURRENT));
-            Intent launch = new Intent(context, BrowserActivity.class);
-            views.setOnClickPendingIntent(R.id.header, PendingIntent
-                    .getActivity(context, 0, launch, PendingIntent.FLAG_CANCEL_CURRENT));
+            views.setOnClickPendingIntent(R.id.header_browser, PendingIntent
+                    .getActivity(context, 0, launchBrowser, PendingIntent.FLAG_CANCEL_CURRENT));
+            views.setOnClickPendingIntent(R.id.header_bookmarks, PendingIntent
+                    .getActivity(context, 0, launchBookmarks, PendingIntent.FLAG_CANCEL_CURRENT));
             appWidgetManager.updateAppWidget(appWidgetId, views);
         }
     }
diff --git a/src/com/android/browser/widget/BookmarkListWidgetService.java b/src/com/android/browser/widget/BookmarkListWidgetService.java
index 8fbe807..8cf63a3 100644
--- a/src/com/android/browser/widget/BookmarkListWidgetService.java
+++ b/src/com/android/browser/widget/BookmarkListWidgetService.java
@@ -240,10 +240,10 @@
             views.setDrawableParameters(R.id.list_item, true, 0, -1, null, -1);
             if (res.mIsFolder) {
                 if (folder != null && res.mId == folder.mId) {
+                    views.setImageViewResource(R.id.thumb, R.drawable.btn_ic_back_bookmark_widget_holo_dark);
                     views.setDrawableParameters(R.id.list_item, true, 255, -1, null, -1);
-                    views.setImageViewResource(R.id.thumb, R.drawable.ic_back_normal);
                 } else {
-                    views.setImageViewResource(R.id.thumb, R.drawable.ic_folder);
+                    views.setImageViewResource(R.id.thumb, R.drawable.ic_folder_bookmark_widget_holo_dark);
                 }
             } else {
                 if (res.mBitmap != null) {