Updates to SWE browser's options menu

- Changed the contents of the menu
- Iconified frequently used items
- Changes to layout and menu animation
- Removed popup menu from History and Bookmarks page
-- Added buttons to these pages to replace menu items
- Updated icons used in popup menu
- Added menu option to save link to homepage
- Add bookmark icon color depicts if bookmark exists

Change-Id: I37226506737647367f71159f1a439cc3fca4ae03
diff --git a/res/layout/bookmarks.xml b/res/layout/bookmarks.xml
index 09b442e..02a5a97 100644
--- a/res/layout/bookmarks.xml
+++ b/res/layout/bookmarks.xml
@@ -13,26 +13,55 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-
-<FrameLayout
+<LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:paddingTop="@dimen/combo_paddingTop">
-    <com.android.browser.view.BookmarkExpandableView
-        android:id="@+id/grid"
+    android:orientation="vertical"
+    >
+
+    <FrameLayout
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_gravity="center_horizontal"
-        android:childDivider="@android:color/transparent"
-        android:divider="@android:color/transparent"
-        android:dividerHeight="0dp" />
-    <TextView
-        android:id="@android:id/empty"
-        android:layout_width="wrap_content"
+        android:layout_height="fill_parent"
+        android:layout_weight="90"
+        android:paddingTop="@dimen/combo_paddingTop">
+        <com.android.browser.view.BookmarkExpandableView
+            android:id="@+id/grid"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_gravity="center_horizontal"
+            android:childDivider="@android:color/transparent"
+            android:divider="@android:color/transparent"
+            android:dividerHeight="0dp" />
+        <TextView
+            android:id="@android:id/empty"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:text="@string/empty_bookmarks_folder"
+            android:visibility="gone" />
+    </FrameLayout>
+    <LinearLayout
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:textAppearance="?android:attr/textAppearanceLarge"
-        android:text="@string/empty_bookmarks_folder"
-        android:visibility="gone" />
-</FrameLayout>
+        android:layout_weight="10"
+        android:layout_alignParentBottom="true" >
+
+        <Button
+            android:id="@+id/add_bookmark_button"
+            android:text="@string/add_new_bookmark"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            />
+        <Button
+            android:id="@+id/new_bmfolder_button"
+            android:text="@string/new_folder"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            />
+    </LinearLayout>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/four_button_menu_item.xml b/res/layout/four_button_menu_item.xml
index f1b2fd6..edefb53 100644
--- a/res/layout/four_button_menu_item.xml
+++ b/res/layout/four_button_menu_item.xml
@@ -12,35 +12,45 @@
 
     <ImageButton
         android:id="@+id/button_one"
-        android:layout_width="59dp"
+        android:layout_width="0dp"
         android:layout_height="match_parent"
+        android:layout_weight="24"
+        android:paddingStart="11dp"
         android:paddingEnd="11dp"
         android:background="?android:attr/listChoiceBackgroundIndicator"
-        android:scaleType="center" />
+        android:scaleType="center"
+        />
 
     <ImageButton
         android:id="@+id/button_two"
-        android:layout_width="70dp"
+        android:layout_width="0dp"
         android:layout_height="match_parent"
+        android:layout_weight="24"
         android:paddingStart="11dp"
         android:paddingEnd="11dp"
         android:background="?android:attr/listChoiceBackgroundIndicator"
-        android:scaleType="center" />
+        android:scaleType="center"
+        />
 
     <ImageButton
         android:id="@+id/button_three"
-        android:layout_width="70dp"
+        android:layout_width="0dp"
         android:layout_height="match_parent"
+        android:layout_weight="24"
         android:paddingStart="11dp"
         android:paddingEnd="11dp"
         android:background="?android:attr/listChoiceBackgroundIndicator"
-        android:scaleType="center" />
+        android:scaleType="center"
+        />
 
     <ImageButton
         android:id="@+id/button_four"
-        android:layout_width="59dp"
+        android:layout_width="0dp"
         android:layout_height="match_parent"
+        android:layout_weight="24"
         android:paddingStart="11dp"
+        android:paddingEnd="11dp"
         android:background="?android:attr/listChoiceBackgroundIndicator"
-        android:scaleType="center" />
-</LinearLayout>
\ No newline at end of file
+        android:scaleType="center"
+        />
+</LinearLayout>
diff --git a/res/layout/history.xml b/res/layout/history.xml
index f3adb51..53f70dc 100644
--- a/res/layout/history.xml
+++ b/res/layout/history.xml
@@ -14,23 +14,44 @@
      limitations under the License.
 -->
 
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
->
+    android:orientation="vertical" >
 
-    <ExpandableListView
-        android:id="@+id/history"
-        android:layout_height="match_parent"
-        android:layout_width="match_parent" />
+    <FrameLayout
+        android:layout_width="match_parent"
+        android:layout_weight="90"
+        android:layout_height="match_parent" >
 
-    <TextView android:id="@android:id/empty"
-        android:layout_width="wrap_content"
+        <ExpandableListView
+            android:id="@+id/history"
+            android:layout_height="match_parent"
+            android:layout_width="match_parent" />
+
+        <TextView android:id="@android:id/empty"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:text="@string/empty_history"
+            android:visibility="gone"
+        />
+
+    </FrameLayout>
+    <LinearLayout
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:textAppearance="?android:attr/textAppearanceLarge"
-        android:text="@string/empty_history"
-        android:visibility="gone"
-    />
+        android:layout_weight="10"
+        android:layout_alignParentBottom="true" >
 
-</FrameLayout>
+        <Button
+            android:id="@+id/clear_history_button"
+            android:text="@string/clear_history"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            />
+    </LinearLayout>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/menu_item.xml b/res/layout/menu_item.xml
index 66bbb82..7247ee1 100644
--- a/res/layout/menu_item.xml
+++ b/res/layout/menu_item.xml
@@ -13,20 +13,30 @@
     android:background="?android:attr/listChoiceBackgroundIndicator">
     <TextView
         android:id="@+id/menu_item_text"
-        android:textAppearance="?android:attr/textAppearanceLargePopupMenu"
+        android:textAppearance="?android:attr/textAppearanceSmallPopupMenu"
         android:layout_weight="1"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
         android:layout_gravity="start"
         android:gravity="center_vertical"
         android:singleLine="true"
-        android:paddingEnd="9dp" />
+        android:paddingLeft="16dp"
+        android:paddingEnd="9dp"
+         />
     <view
-        class="org.chromium.chrome.browser.appmenu.AppMenuItemIcon"
+        class="com.android.browser.appmenu.AppMenuItemIcon"
         android:id="@+id/menu_item_icon"
         android:layout_weight="0"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
         android:layout_gravity="end"
-        android:gravity="center_vertical" />
+        android:gravity="center_vertical"
+         />
+    <CheckBox
+        android:id="@+id/menu_item_checkbox"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:tint="@color/black"
+        android:visible="false"
+        android:clickable="true" />
 </LinearLayout>
diff --git a/res/layout/one_button_plus_menu_item.xml b/res/layout/one_button_plus_menu_item.xml
new file mode 100644
index 0000000..278611c
--- /dev/null
+++ b/res/layout/one_button_plus_menu_item.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2014 The Chromium Authors. All rights reserved.
+
+     Use of this source code is governed by a BSD-style license that can be
+     found in the LICENSE file.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="?android:attr/listPreferredItemHeightSmall"
+    android:layout_gravity="top|start"
+    android:orientation="horizontal">
+
+    <ImageButton
+        android:id="@+id/button_one"
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="90"
+        android:background="?android:attr/listChoiceBackgroundIndicator"
+        android:scaleType="center"
+        />
+
+    <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"
+        />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/three_button_menu_item.xml b/res/layout/three_button_menu_item.xml
index 5fb2d78..1895e43 100644
--- a/res/layout/three_button_menu_item.xml
+++ b/res/layout/three_button_menu_item.xml
@@ -14,23 +14,26 @@
         android:id="@+id/button_one"
         android:layout_width="0dp"
         android:layout_height="match_parent"
-        android:layout_weight="1"
+        android:layout_weight="32"
         android:background="?android:attr/listChoiceBackgroundIndicator"
-        android:scaleType="center" />
+        android:scaleType="center"
+        />
 
     <ImageButton
         android:id="@+id/button_two"
         android:layout_width="0dp"
         android:layout_height="match_parent"
-        android:layout_weight="1"
+        android:layout_weight="32"
         android:background="?android:attr/listChoiceBackgroundIndicator"
-        android:scaleType="center" />
+        android:scaleType="center"
+        />
 
     <ImageButton
         android:id="@+id/button_three"
         android:layout_width="0dp"
         android:layout_height="match_parent"
-        android:layout_weight="1"
+        android:layout_weight="32"
         android:background="?android:attr/listChoiceBackgroundIndicator"
-        android:scaleType="center" />
-</LinearLayout>
\ No newline at end of file
+        android:scaleType="center"
+        />
+</LinearLayout>
diff --git a/res/layout/three_button_plus_menu_item.xml b/res/layout/three_button_plus_menu_item.xml
new file mode 100644
index 0000000..e0cc23b
--- /dev/null
+++ b/res/layout/three_button_plus_menu_item.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2014 The Chromium Authors. All rights reserved.
+
+     Use of this source code is governed by a BSD-style license that can be
+     found in the LICENSE file.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="?android:attr/listPreferredItemHeightSmall"
+    android:layout_gravity="top|start"
+    android:orientation="horizontal">
+
+    <ImageButton
+        android:id="@+id/button_one"
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="30"
+        android:paddingStart="11dp"
+        android:paddingEnd="11dp"
+        android:background="?android:attr/listChoiceBackgroundIndicator"
+        android:scaleType="center"
+        />
+
+    <ImageButton
+        android:id="@+id/button_two"
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="30"
+        android:paddingStart="11dp"
+        android:paddingEnd="11dp"
+        android:background="?android:attr/listChoiceBackgroundIndicator"
+        android:scaleType="center"
+        />
+
+    <ImageButton
+        android:id="@+id/button_three"
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="30"
+        android:paddingStart="11dp"
+        android:paddingEnd="11dp"
+        android:background="?android:attr/listChoiceBackgroundIndicator"
+        android:scaleType="center"
+        />
+
+    <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" />
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/two_button_menu_item.xml b/res/layout/two_button_menu_item.xml
new file mode 100644
index 0000000..a2fc416
--- /dev/null
+++ b/res/layout/two_button_menu_item.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2014 The Chromium Authors. All rights reserved.
+
+     Use of this source code is governed by a BSD-style license that can be
+     found in the LICENSE file.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="?android:attr/listPreferredItemHeightSmall"
+    android:layout_gravity="top|start"
+    android:orientation="horizontal">
+
+    <ImageButton
+        android:id="@+id/button_one"
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="48"
+        android:background="?android:attr/listChoiceBackgroundIndicator"
+        android:scaleType="center"
+        />
+
+    <ImageButton
+        android:id="@+id/button_two"
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="48"
+        android:background="?android:attr/listChoiceBackgroundIndicator"
+        android:scaleType="center"
+        />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/two_button_plus_menu_item.xml b/res/layout/two_button_plus_menu_item.xml
new file mode 100644
index 0000000..ae47f53
--- /dev/null
+++ b/res/layout/two_button_plus_menu_item.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2014 The Chromium Authors. All rights reserved.
+
+     Use of this source code is governed by a BSD-style license that can be
+     found in the LICENSE file.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="?android:attr/listPreferredItemHeightSmall"
+    android:layout_gravity="top|start"
+    android:orientation="horizontal">
+
+    <ImageButton
+        android:id="@+id/button_one"
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="45"
+        android:background="?android:attr/listChoiceBackgroundIndicator"
+        android:scaleType="center"
+        />
+
+    <ImageButton
+        android:id="@+id/button_two"
+        android:layout_width="0dp"
+        android:layout_height="match_parent"
+        android:layout_weight="45"
+        android:background="?android:attr/listChoiceBackgroundIndicator"
+        android:scaleType="center"
+        />
+
+    <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"
+        />
+</LinearLayout>
\ No newline at end of file