Additional ui changes for quick contact.

More fixes to bug:5233213 Quick contacts still needs some UI fixes
These changes:
1) shorten the max height of a list of contact pts
2) add borders to the top of the image and bottom of the list
3) move the content of the quick contact down
4) make the dividers narrower.
5) make the first line of text for everything except a postal address
1 line max and ellipsized at the end.
Change-Id: I7fce4db1a18d1b68814e55805fe4fe7c51cbd648
diff --git a/res/drawable/list_divider.xml b/res/drawable/list_divider.xml
new file mode 100644
index 0000000..81df0f5
--- /dev/null
+++ b/res/drawable/list_divider.xml
@@ -0,0 +1,20 @@
+<?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.
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <solid
+        android:color="@color/quickcontact_list_divider"/>
+</shape>
\ No newline at end of file
diff --git a/res/drawable/quickcontact_list_item_divider.xml b/res/drawable/quickcontact_list_item_divider.xml
new file mode 100644
index 0000000..99882c4
--- /dev/null
+++ b/res/drawable/quickcontact_list_item_divider.xml
@@ -0,0 +1,19 @@
+<?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.
+-->
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+    android:drawable="@drawable/list_divider"
+    android:insetRight="16dp"
+    android:insetLeft="16dp" />
\ No newline at end of file
diff --git a/res/layout-land/quickcontact_list_fragment_bottom.xml b/res/layout-land/quickcontact_list_fragment_bottom.xml
new file mode 100755
index 0000000..957ec53
--- /dev/null
+++ b/res/layout-land/quickcontact_list_fragment_bottom.xml
@@ -0,0 +1,18 @@
+<?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.
+-->
+<View xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_alignParentBottom="true"
+    style="@style/QuickContactListBottomStyle"/>
diff --git a/res/layout-sw580dp-w1000dp/quickcontact_list_fragment_bottom.xml b/res/layout-sw580dp-w1000dp/quickcontact_list_fragment_bottom.xml
new file mode 100755
index 0000000..e08b3aa
--- /dev/null
+++ b/res/layout-sw580dp-w1000dp/quickcontact_list_fragment_bottom.xml
@@ -0,0 +1,18 @@
+<?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.
+-->
+<View xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_alignBottom="@+id/list"
+    style="@style/QuickContactListBottomStyle"/>
diff --git a/res/layout/quickcontact_activity.xml b/res/layout/quickcontact_activity.xml
index c8d0ad4..c1759bf 100644
--- a/res/layout/quickcontact_activity.xml
+++ b/res/layout/quickcontact_activity.xml
@@ -29,6 +29,7 @@
         android:layout_height="wrap_content"
         android:paddingLeft="15dip"
         android:paddingRight="15dip"
+        android:paddingTop="8dip"
         android:orientation="vertical">
         <view
             class="com.android.contacts.widget.ProportionalLayout"
@@ -47,6 +48,6 @@
         <android.support.v4.view.ViewPager
             android:id="@+id/item_list_pager"
             android:layout_width="match_parent"
-            android:layout_height="180dip" />
+            android:layout_height="156dip" />
     </LinearLayout>
 </view>
diff --git a/res/layout/quickcontact_list_fragment.xml b/res/layout/quickcontact_list_fragment.xml
index 8c62c4c..5ade104 100755
--- a/res/layout/quickcontact_list_fragment.xml
+++ b/res/layout/quickcontact_list_fragment.xml
@@ -24,12 +24,18 @@
         android:layout_width="match_parent"
         android:layout_height="1dip"
         android:background="@color/quickcontact_list_divider" />
-    <ListView
-        android:id="@+id/list"
+    <RelativeLayout
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:divider="@color/quickcontact_list_divider"
-        android:dividerHeight="1dip"
-        android:background="@color/quickcontact_list_background"
-        android:cacheColorHint="@null" />
+        android:layout_height="wrap_content">
+        <ListView
+            android:id="@+id/list"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:divider="@drawable/quickcontact_list_item_divider"
+            android:dividerHeight="1dip"
+            android:background="@color/quickcontact_list_background"
+            android:cacheColorHint="@null"
+            android:layout_alignParentTop="true" />
+        <include layout="@layout/quickcontact_list_fragment_bottom"/>
+    </RelativeLayout>
 </LinearLayout>
diff --git a/res/layout/quickcontact_list_fragment_bottom.xml b/res/layout/quickcontact_list_fragment_bottom.xml
new file mode 100755
index 0000000..e08b3aa
--- /dev/null
+++ b/res/layout/quickcontact_list_fragment_bottom.xml
@@ -0,0 +1,18 @@
+<?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.
+-->
+<View xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_alignBottom="@+id/list"
+    style="@style/QuickContactListBottomStyle"/>
diff --git a/res/layout/quickcontact_list_item.xml b/res/layout/quickcontact_list_item.xml
index ac258de..ee3a89f 100755
--- a/res/layout/quickcontact_list_item.xml
+++ b/res/layout/quickcontact_list_item.xml
@@ -13,7 +13,6 @@
      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:id="@+id/actions_view_container"
@@ -25,7 +24,9 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:textColor="@color/primary_text_color"
-            android:textAppearance="?android:attr/textAppearanceMedium" />
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:singleLine="true"
+            android:ellipsize="end" />
         <TextView
             android:id="@android:id/text2"
             android:layout_width="wrap_content"
diff --git a/res/layout/quickcontact_list_item_email.xml b/res/layout/quickcontact_list_item_address.xml
similarity index 93%
rename from res/layout/quickcontact_list_item_email.xml
rename to res/layout/quickcontact_list_item_address.xml
index 1524eab..9773b10 100755
--- a/res/layout/quickcontact_list_item_email.xml
+++ b/res/layout/quickcontact_list_item_address.xml
@@ -19,15 +19,15 @@
     android:id="@+id/actions_view_container"
     android:nextFocusRight="@+id/secondary_action_button"
     style="@style/QuickContactListItemStyle">
-    <LinearLayout style="@style/QuickContactListItemTextWrapperStyle">
+    <LinearLayout style="@style/QuickContactListItemTextWrapperStyle"
+        android:layout_marginTop="12dip"
+        android:layout_marginBottom="12dip">
         <TextView
             android:id="@android:id/text1"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:textColor="@color/primary_text_color"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:singleLine="true"
-            android:ellipsize="middle" />
+            android:textAppearance="?android:attr/textAppearanceMedium" />
         <TextView
             android:id="@android:id/text2"
             android:layout_width="wrap_content"
diff --git a/res/layout/quickcontact_list_item_base.xml b/res/layout/quickcontact_list_item_base.xml
index 84fc104..329df78 100644
--- a/res/layout/quickcontact_list_item_base.xml
+++ b/res/layout/quickcontact_list_item_base.xml
@@ -27,11 +27,11 @@
         android:id="@+id/secondary_action_button"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
-        android:paddingLeft="@dimen/detail_item_icon_margin"
-        android:paddingRight="@dimen/detail_item_icon_margin"
+        android:paddingLeft="8dip"
+        android:paddingRight="14dip"
         android:background="?android:attr/selectableItemBackground"
         android:duplicateParentState="false"
-        android:nextFocusLeft="@id/actions_view_container" />
+        android:nextFocusLeft="@id/actions_view_container"/>
     <View
         android:id="@+id/vertical_divider"
         android:layout_width="1dip"
diff --git a/res/layout/quickcontact_list_item_website.xml b/res/layout/quickcontact_list_item_website.xml
deleted file mode 100755
index 3b1ccb1..0000000
--- a/res/layout/quickcontact_list_item_website.xml
+++ /dev/null
@@ -1,33 +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.
--->
-
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/actions_view_container"
-    android:nextFocusRight="@+id/secondary_action_button"
-    style="@style/QuickContactListItemStyle">
-    <LinearLayout style="@style/QuickContactListItemTextWrapperStyle">
-        <TextView
-            android:id="@android:id/text1"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:textColor="@color/primary_text_color"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:ellipsize="middle"
-            android:singleLine="true" />
-    </LinearLayout>
-    <include layout="@layout/quickcontact_list_item_base"/>
-</LinearLayout>
diff --git a/res/layout/quickcontact_photo_container.xml b/res/layout/quickcontact_photo_container.xml
index ffaf12f..1ba939a 100644
--- a/res/layout/quickcontact_photo_container.xml
+++ b/res/layout/quickcontact_photo_container.xml
@@ -26,6 +26,11 @@
             android:layout_height="match_parent"
             android:scaleType="centerCrop" />
         <View
+            android:layout_width="match_parent"
+            android:layout_height="1dip"
+            android:layout_alignParentTop="true"
+            android:background="#4CFFFFFF" />
+        <View
             android:id="@+id/photo_text_bar"
             android:layout_width="0dip"
             android:layout_height="42dip"
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 343d42c..f33f2a6 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -280,7 +280,11 @@
         <item name="android:paddingRight">16dip</item>
         <item name="android:gravity">center_vertical</item>
         <item name="android:orientation">vertical</item>
-        <item name="android:layout_marginTop">12dip</item>
-        <item name="android:layout_marginBottom">12dip</item>
+    </style>
+
+    <style name="QuickContactListBottomStyle">
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_height">2dip</item>
+        <item name="android:background">@color/quickcontact_tab_indicator</item>
     </style>
 </resources>