Use framework style for section headers and visual tweaks
- Use list separator style from framework for the blue headers
in our app (frequent header, recent header, kind type headers)
--> this allows us to get reduce the number of views in our
view tree because the divider is now an asset and part of the
TextView background.
- Adjust padding so it lines up with the new headers now
- Minor visual tweaks
Bug: 5136189
Change-Id: I7b10cc7e608b809d1a97ad8d8c59e31ab9d77e11
diff --git a/res/layout/contact_detail_kind_title_entry_view.xml b/res/layout/contact_detail_kind_title_entry_view.xml
deleted file mode 100644
index 37b73ea..0000000
--- a/res/layout/contact_detail_kind_title_entry_view.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 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:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingLeft="@dimen/detail_item_side_margin"
- android:paddingRight="@dimen/detail_item_side_margin"
- android:orientation="vertical">
-
- <TextView
- android:id="@+id/kind"
- android:layout_width="wrap_content"
- android:layout_height="24dip"
- android:textColor="@color/detail_kind_title_color"
- android:textStyle="bold"
- android:singleLine="true"
- android:ellipsize="end"
- android:paddingLeft="8dip"
- android:paddingTop="5dip"
- android:paddingBottom="2dip" />
-
- <View
- android:id="@+id/kind_divider"
- android:layout_width="match_parent"
- android:layout_height="2dip"
- android:background="@color/detail_kind_title_color"/>
-
-</LinearLayout>
diff --git a/res/layout/contact_detail_list_item.xml b/res/layout/contact_detail_list_item.xml
index 4d6ed5f..99f027f 100644
--- a/res/layout/contact_detail_list_item.xml
+++ b/res/layout/contact_detail_list_item.xml
@@ -47,12 +47,6 @@
android:gravity="center_vertical">
<TextView
- android:id="@+id/kind"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:visibility="gone" />
-
- <TextView
android:id="@+id/data"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -121,7 +115,8 @@
<ImageView
android:id="@+id/secondary_action_button"
android:layout_width="32dip"
- android:layout_height="match_parent"
+ android:layout_height="32dip"
+ android:layout_gravity="center_vertical"
android:duplicateParentState="false" />
</FrameLayout>
</LinearLayout>
diff --git a/res/layout/contact_detail_tab_carousel.xml b/res/layout/contact_detail_tab_carousel.xml
index fb60f17..28463a2 100644
--- a/res/layout/contact_detail_tab_carousel.xml
+++ b/res/layout/contact_detail_tab_carousel.xml
@@ -35,7 +35,7 @@
<!-- Vertical divider -->
<View
- android:layout_width="2dip"
+ android:layout_width="1dip"
android:layout_height="match_parent"
android:background="@android:color/white"/>
diff --git a/res/layout/edit_kind_title.xml b/res/layout/edit_kind_title.xml
index 8901d5b..f178876 100644
--- a/res/layout/edit_kind_title.xml
+++ b/res/layout/edit_kind_title.xml
@@ -17,34 +17,23 @@
*/
-->
-<LinearLayout
+<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:minHeight="24dip"
+ android:layout_height="32dip"
android:paddingLeft="8dip"
android:paddingRight="8dip"
- android:paddingBottom="4dip"
- android:orientation="vertical">
+ android:focusable="false">
<TextView
android:id="@+id/kind_title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="@dimen/editor_kind_title_left_padding"
- android:textAppearance="?android:attr/textAppearanceSmall"
+ style="?android:attr/listSeparatorTextViewStyle"
+ android:paddingLeft="8dip"
+ android:paddingRight="8dip"
+ android:background="@drawable/list_section_divider_holo_custom"
android:textColor="@color/people_app_theme_color"
- android:textStyle="bold"
android:textAllCaps="true"
android:singleLine="true"
- android:ellipsize="end"
- android:layout_gravity="center_vertical" />
+ android:ellipsize="end" />
- <ImageView
- android:id="@+id/divider"
- android:layout_width="match_parent"
- android:layout_height="2dip"
- android:scaleType="fitXY"
- android:src="@color/people_app_theme_color"/>
-
-</LinearLayout>
+</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/group_browse_list_item.xml b/res/layout/group_browse_list_item.xml
index 88ff575..cc388f7 100644
--- a/res/layout/group_browse_list_item.xml
+++ b/res/layout/group_browse_list_item.xml
@@ -51,6 +51,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dip"
+ android:paddingLeft="8dip"
android:paddingBottom="8dip"
android:duplicateParentState="true"
android:background="@drawable/group_list_item_background"
diff --git a/res/layout/list_separator.xml b/res/layout/list_separator.xml
index 39de1da..2aeb1ba 100644
--- a/res/layout/list_separator.xml
+++ b/res/layout/list_separator.xml
@@ -14,31 +14,23 @@
limitations under the License.
-->
-<!-- Layout used for list separators. -->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:orientation="vertical"
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
android:layout_height="32dip"
- android:divider="?android:attr/dividerVertical"
android:paddingLeft="16dip"
- android:paddingRight="16dip">
+ android:paddingRight="16dip"
+ android:focusable="false">
<TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingTop="8dip"
+ android:id="@+id/title"
+ style="?android:attr/listSeparatorTextViewStyle"
android:paddingLeft="8dip"
- android:textStyle="bold"
+ android:paddingRight="8dip"
+ android:background="@drawable/list_section_divider_holo_custom"
+ android:textColor="@color/people_app_theme_color"
android:textAllCaps="true"
android:singleLine="true"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="@color/people_app_theme_color"
- android:gravity="left|center_vertical"
- android:id="@+id/header_text" />
+ android:ellipsize="end" />
- <View
- android:layout_width="match_parent"
- android:layout_height="1dip"
- android:background="@color/people_app_theme_color" />
-
-</LinearLayout>
\ No newline at end of file
+</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/updates_title.xml b/res/layout/updates_title.xml
deleted file mode 100644
index 995a3b9..0000000
--- a/res/layout/updates_title.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 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:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingLeft="@dimen/detail_item_side_margin"
- android:paddingRight="@dimen/detail_item_side_margin"
- android:orientation="vertical">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="24dip"
- android:text="@string/recent_updates"
- android:textColor="@color/detail_kind_title_color"
- android:textStyle="bold"
- android:textAllCaps="true"
- android:singleLine="true"
- android:ellipsize="end"
- style="@style/UpdatesTitleStyle"/>
-
- <View
- android:layout_width="match_parent"
- android:layout_height="2dip"
- android:background="@color/detail_kind_title_color"/>
-
-</LinearLayout>