new two column suggestion dropdown
http://b/issue?id=3039704
Change-Id: I8b32553682cc547c695d0089e6633ead77426869
diff --git a/res/drawable-hdpi/list_divider_vert.9.png b/res/drawable-hdpi/list_divider_vert.9.png
new file mode 100644
index 0000000..d99730a
--- /dev/null
+++ b/res/drawable-hdpi/list_divider_vert.9.png
Binary files differ
diff --git a/res/drawable-mdpi/list_divider_vert.9.png b/res/drawable-mdpi/list_divider_vert.9.png
new file mode 100644
index 0000000..d99730a
--- /dev/null
+++ b/res/drawable-mdpi/list_divider_vert.9.png
Binary files differ
diff --git a/res/layout/url_dropdown_item.xml b/res/layout/suggestion_item.xml
similarity index 87%
rename from res/layout/url_dropdown_item.xml
rename to res/layout/suggestion_item.xml
index 5e8f84c..fec5ae3 100644
--- a/res/layout/url_dropdown_item.xml
+++ b/res/layout/suggestion_item.xml
@@ -21,7 +21,7 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="56dip"
android:orientation="horizontal"
android:gravity="center_vertical"
android:baselineAligned="false">
@@ -31,17 +31,16 @@
android:id="@+id/icon1"
android:scaleType="center"
style="@style/HoloButton" />
- <TwoLineListItem
- android:paddingTop="16dip"
- android:paddingBottom="16dip"
+ <RelativeLayout
+ android:paddingTop="8dip"
+ android:paddingBottom="8dip"
android:layout_width="0dip"
android:layout_weight="1"
- android:layout_height="wrap_content"
- android:mode="twoLine">
+ android:layout_height="wrap_content" >
<TextView
android:id="@android:id/text1"
style="?android:attr/dropDownItemStyle"
- android:textAppearance="?android:attr/textAppearanceLargeInverse"
+ android:textAppearance="?android:attr/textAppearanceMediumInverse"
android:singleLine="true"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
@@ -55,7 +54,7 @@
android:layout_height="wrap_content"
android:layout_below="@android:id/text1"
android:layout_alignLeft="@android:id/text1" />
- </TwoLineListItem>
+ </RelativeLayout>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -65,4 +64,9 @@
android:src="@drawable/ic_add_string"
android:background="@drawable/browserbarbutton"
/>
+ <View
+ android:id="@+id/spacer"
+ android:layout_width="16dip"
+ android:layout_height="match_parent"
+ />
</LinearLayout>
diff --git a/res/layout/suggestion_two_column.xml b/res/layout/suggestion_two_column.xml
new file mode 100644
index 0000000..fc74140
--- /dev/null
+++ b/res/layout/suggestion_two_column.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/assets/res/any/layout/simple_spinner_item.xml
+**
+** Copyright 2010, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:gravity="center_vertical"
+ android:baselineAligned="false">
+ <include
+ android:id="@+id/suggest1"
+ layout="@layout/suggestion_item"
+ android:layout_width="0dip"
+ android:layout_weight="1"
+ />
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="56dip"
+ android:background="@drawable/list_divider_vert" />
+ <include
+ android:id="@+id/suggest2"
+ layout="@layout/suggestion_item"
+ android:layout_width="0dip"
+ android:layout_weight="1"
+ />
+</LinearLayout>
diff --git a/res/values-xlarge/styles.xml b/res/values-xlarge/styles.xml
index 0f17da3..375e3c6 100644
--- a/res/values-xlarge/styles.xml
+++ b/res/values-xlarge/styles.xml
@@ -28,7 +28,7 @@
<item name="android:actionModeBackground">@drawable/cab_bg</item>
<item name="android:actionModeCloseDrawable">@drawable/ic_menu_cab_close</item>
<item name="android:actionButtonStyle">@style/ActionButton</item>
- <item name="android:actionDropDownStyle">@style/ActionDropdown</item>
+ <item name="android:popupMenuStyle">@style/ActionDropdown</item>
<item name="android:actionOverflowButtonStyle">@style/Overflow</item>
</style>
<style name="Dialog.Holo" parent="android:Theme.Holo">
@@ -49,13 +49,14 @@
<style name="ActionBarStyle">
<item name="android:height">48dip</item>
<item name="android:padding">0dip</item>
+ <item name="android:background">@drawable/tabbar_bg</item>
<item name="android:displayOptions">hideHome</item>
</style>
<style name="ActionButton">
<item name="android:height">12dip</item>
<item name="android:background">@drawable/browserbarbutton</item>
</style>
- <style name="ActionDropdown">
+ <style name="ActionDropdown" parent="@android:style/Widget.PopupMenu">
<item name="android:background">@drawable/menu_dropdown</item>
</style>
<style name="Overflow">
diff --git a/res/values/integers.xml b/res/values/integers.xml
new file mode 100644
index 0000000..0402e90
--- /dev/null
+++ b/res/values/integers.xml
@@ -0,0 +1,19 @@
+<?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.
+-->
+<resources
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- The number of lines in the suggestions dropdown in landscape -->
+ <integer name="max_suggest_lines_landscape">6</integer>
+ <!-- The number of lines in the suggestions dropdown in portrait -->
+ <integer name="max_suggest_lines_portrait">12</integer>
+</resources>
\ No newline at end of file