Update the appearance of the title bar in the browser.

Change the title bar to use the look of the search bar.  Remove
the new tab button, which is now a part of the updated menu.  Make
the title bar for each WebView span the width of the screen.  Make
the title bar appear when pressing the menu button.

Change-Id: I7ad1c955412d422be0fc6f26ec8d286172a0a99a
diff --git a/res/layout/title_bar.xml b/res/layout/title_bar.xml
index 3cc25ac..7245a9b 100644
--- a/res/layout/title_bar.xml
+++ b/res/layout/title_bar.xml
@@ -1,96 +1,71 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 The Android Open Source Project
+<!--
+   Copyright 2009, The Android Open Source Project
 
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
 
-          http://www.apache.org/licenses/LICENSE-2.0
+       http://www.apache.org/licenses/LICENSE-2.0
 
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
 -->
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:fitsSystemWindows="true"
-    android:orientation="horizontal"
+    android:id="@+id/search_plate"
     android:layout_width="fill_parent"
-    android:background="@drawable/tab_selected"
-    android:layout_height="45dip">
-    <ImageView android:id="@+id/favicon"
-        android:layout_height="20dip"
-        android:layout_width="20dip"
-        android:layout_marginLeft="6dip"
-        android:layout_marginRight="6dip"
-        android:layout_gravity="center_vertical"
+    android:layout_height="wrap_content"
+    android:orientation="vertical"
+    android:paddingLeft="12dip"
+    android:paddingRight="12dip"
+    android:paddingTop="0dip"
+    android:paddingBottom="16dip"
+    android:background="@*android:drawable/search_plate_global" >
+
+    <ProgressBar android:id="@+id/progress_horizontal"
+        style="?android:attr/progressBarStyleHorizontal"
+        android:layout_width="fill_parent"
+        android:layout_height="5dip"
+        android:max="100"
         />
-    <!-- layout which contains the title, progress bar, and url -->
+
     <LinearLayout
-        android:orientation="vertical"
-        android:layout_width="0dip"
-        android:layout_weight="1"
-        android:layout_height="wrap_content">
-        <!-- This part contains the favicon and the progress bar -->
-        <LinearLayout
-            android:orientation="vertical"
-            android:layout_marginTop="0dip"
-            android:layout_height="wrap_content"
-            android:layout_width="fill_parent"
-            >
-            <!-- need to make this no wider than the horizontal progress bar -->
-            <TextView android:id="@+id/title"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:layout_marginLeft="6dip"
-                android:layout_marginTop="0dip"
-                android:textSize="14dip"
-                android:textColor="@color/white"
-                android:textStyle="bold"
-                android:singleLine="true"
-                android:padding="0dip"
-                />
-            <LinearLayout
-                android:orientation="horizontal"
-                android:layout_width="fill_parent"
-                android:layout_height="wrap_content">
-                <TextView android:id="@+id/url"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginLeft="6dip"
-                    android:textSize="11dip"
-                    android:padding="0dip"
-                    android:textColor="@color/white"
-                    android:singleLine="true"
-                    />
-                <ProgressBar android:id="@+id/progress_circular"
-                    style="?android:attr/progressBarStyleSmallTitle"
-                    android:layout_marginLeft="3dip"
-                    android:layout_gravity="center_vertical"
-                    android:max="100"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content" />
-            <ImageView android:id="@+id/lock_icon"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:layout_alignBottom="@id/title"
-                android:layout_alignParentRight="true"
-                android:visibility="gone"/>
-            </LinearLayout>
-            <ProgressBar android:id="@+id/progress_horizontal"
-                style="?android:attr/progressBarStyleHorizontal"
-                android:layout_width="fill_parent"
-                android:layout_weight="1"
-                android:layout_height="5dip"
-                android:max="100" />
-        </LinearLayout>
-    </LinearLayout>
-    <!-- This buttons will change look/functionality -->
-    <ImageView android:id="@+id/rt_button"
-        android:layout_width="52dip"
+        android:id="@+id/search_edit_frame"
+        android:layout_width="fill_parent"
         android:layout_height="wrap_content"
-        android:layout_gravity="center_vertical"
-        android:src="@drawable/ic_close_tab"/>
+        android:layout_marginTop="3dip"
+        android:orientation="horizontal">
+
+        <TextView
+            android:id="@+id/title"
+            android:background="@*android:drawable/textfield_search"
+            android:layout_height="40dip"
+            android:layout_width="0dip"
+            android:layout_weight="1.0"
+            android:paddingLeft="8dip"
+            android:paddingRight="6dip"
+            android:singleLine="true"
+            android:ellipsize="end"
+        />
+        <ProgressBar android:id="@+id/progress_circular"
+            style="?android:attr/progressBarStyleSmallTitle"
+            android:layout_width="40dip"
+            android:layout_height="40dip"
+            android:layout_marginLeft="3dip"
+            android:max="100"
+            />
+        <ImageView
+            android:id="@+id/rt_btn"
+            android:layout_width="40dip"
+            android:layout_height="40dip"
+            android:layout_marginLeft="8dip"
+            android:scaleType="fitXY"
+            android:background="@*android:drawable/btn_search_dialog_voice"
+            android:src="@drawable/ic_menu_bookmark"
+        />
+    </LinearLayout>
 </LinearLayout>
diff --git a/res/menu/browser.xml b/res/menu/browser.xml
index c2f80d6..e7478f0 100644
--- a/res/menu/browser.xml
+++ b/res/menu/browser.xml
@@ -16,23 +16,22 @@
 
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
     <group android:id="@+id/MAIN_MENU">
-        <item android:id="@+id/goto_menu_id"
-            android:title="@string/goto_dot" 
-            android:alphabeticShortcut="l" 
-            android:icon="@android:drawable/ic_menu_search"/>
         <item android:id="@+id/stop_reload_menu_id"
             android:alphabeticShortcut="r" />
-        <item android:id="@+id/add_bookmark_menu_id"
-            android:title="@string/save_to_bookmarks"
-            android:icon="@drawable/ic_menu_bookmark" />
-        <item android:id="@+id/back_menu_id"
-            android:title="@string/back"
-            android:drawable="@*android:drawable/ic_menu_back"
-            android:alphabeticShortcut="j" />
+        <item android:id="@+id/new_tab_menu_id"
+            android:title="@string/new_tab"
+            android:icon="@drawable/ic_add_tab" />
+        <item android:id="@+id/close_menu_id"
+            android:icon="@drawable/ic_btn_close_panel"
+            android:title="@string/tab_picker_remove_tab"
+            android:alphabeticShortcut="w" />
         <item android:id="@+id/forward_menu_id"
             android:title="@string/forward" 
             android:alphabeticShortcut="k"
             android:icon="@*android:drawable/ic_menu_forward" />
+        <item android:id="@+id/add_bookmark_menu_id"
+            android:title="@string/save_to_bookmarks"
+            android:icon="@drawable/ic_menu_bookmark" />
         <item android:id="@+id/find_menu_id"
             android:title="@string/find_dot" 
             android:alphabeticShortcut="f" />
@@ -55,8 +54,6 @@
             android:visible="false" />
     </group>
     <group android:id="@+id/MAIN_SHORTCUT_MENU" android:visible="false">
-        <item android:id="@+id/close_menu_id"
-            android:alphabeticShortcut="w" />
         <item android:id="@+id/homepage_menu_id"
             android:alphabeticShortcut="&#32;" />
         <item android:id="@+id/classic_history_menu_id"
@@ -81,15 +78,23 @@
             android:alphabeticShortcut="7" />
         <item android:id="@+id/window_eight_menu_id"
             android:alphabeticShortcut="8" />
+        <item android:id="@+id/back_menu_id"
+            android:title="@string/back"
+            android:drawable="@*android:drawable/ic_menu_back"
+            android:alphabeticShortcut="j" />
+        <item android:id="@+id/goto_menu_id"
+            android:title="@string/goto_dot"
+            android:alphabeticShortcut="l"
+            android:icon="@android:drawable/ic_menu_search"/>
     </group>
     <!-- these items are toggled in and out of @+id/stop_reload_menu_id -->
     <item android:id="@+id/stop_menu_id"
-        android:title="@string/stop" 
+        android:title="@string/stop"
         android:icon="@*android:drawable/ic_menu_stop"
         android:visible="false" />
     <item android:id="@+id/reload_menu_id"
-        android:title="@string/reload" 
-        android:icon="@*android:drawable/ic_menu_refresh" 
+        android:title="@string/reload"
+        android:icon="@*android:drawable/ic_menu_refresh"
         android:visible="false" />
 </menu>
  
diff --git a/res/values/strings.xml b/res/values/strings.xml
index c0d1429..b224517 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -18,6 +18,8 @@
     <!-- The name of the application. -->
     <string name="application_name">Browser</string>
 
+    <!-- Name of menu item of a new tab.  Also used in the title bar when displaying a new tab -->
+    <string name="new_tab">New tab</string>
     <!-- Name of tab containing bookmarks -->
     <string name="tab_bookmarks">Bookmarks</string>
     <!-- Name of tab containing the user's most visited websites, organized by number of visits -->