Merge "Stack header account information in Groups tab" into jb-dev
diff --git a/res/layout-sw580dp-w940dp/group_browse_list_account_header.xml b/res/layout-sw580dp-w940dp/group_browse_list_account_header.xml
new file mode 100644
index 0000000..af60c79
--- /dev/null
+++ b/res/layout-sw580dp-w940dp/group_browse_list_account_header.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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="vertical">
+
+    <!-- Only visible when it is the first element in the list. -->
+    <View
+        android:id="@+id/header_extra_top_padding"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/list_header_extra_top_padding" />
+
+    <include layout="@layout/group_account_header_horizontal" />
+
+</LinearLayout>
diff --git a/res/layout-sw580dp/group_browse_list_account_header.xml b/res/layout-sw580dp/group_browse_list_account_header.xml
new file mode 100644
index 0000000..cca6ed9
--- /dev/null
+++ b/res/layout-sw580dp/group_browse_list_account_header.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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="vertical">
+
+    <!-- Only visible when it is the first element in the list. -->
+    <View
+        android:id="@+id/header_extra_top_padding"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/list_header_extra_top_padding" />
+
+    <include layout="@layout/group_account_header_vertical" />
+
+</LinearLayout>
diff --git a/res/layout-sw680dp/group_browse_list_account_header.xml b/res/layout-sw680dp/group_browse_list_account_header.xml
new file mode 100644
index 0000000..af60c79
--- /dev/null
+++ b/res/layout-sw680dp/group_browse_list_account_header.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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="vertical">
+
+    <!-- Only visible when it is the first element in the list. -->
+    <View
+        android:id="@+id/header_extra_top_padding"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/list_header_extra_top_padding" />
+
+    <include layout="@layout/group_account_header_horizontal" />
+
+</LinearLayout>
diff --git a/res/layout/group_account_header_horizontal.xml b/res/layout/group_account_header_horizontal.xml
new file mode 100644
index 0000000..5043f25
--- /dev/null
+++ b/res/layout/group_account_header_horizontal.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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:minHeight="?attr/list_item_header_height"
+    android:layout_marginLeft="?attr/list_item_padding_left"
+    android:layout_marginRight="?attr/list_item_padding_right"
+    android:background="@drawable/list_section_divider_holo_custom"
+    android:orientation="horizontal">
+
+    <TextView
+        android:id="@+id/account_type"
+        android:layout_width="0px"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:layout_gravity="center_vertical"
+        android:paddingLeft="?attr/list_item_header_text_indent"
+        android:textAppearance="?android:attr/textAppearanceSmall"
+        android:textColor="@color/people_app_theme_color"
+        android:textStyle="bold"
+        android:textAllCaps="true"
+        android:singleLine="true"/>
+
+    <!-- TODO: Should use correct color with a correct name (content should be same).
+         can use "?android:attr/textColorTertiary" -->
+    <TextView
+        android:id="@+id/account_name"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical"
+        android:textColor="@color/contact_count_text_color"
+        android:textSize="12sp"
+        android:singleLine="true"
+        android:ellipsize="middle" />
+</LinearLayout>
diff --git a/res/layout/group_account_header_vertical.xml b/res/layout/group_account_header_vertical.xml
new file mode 100644
index 0000000..8edbb8b
--- /dev/null
+++ b/res/layout/group_account_header_vertical.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012 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:minHeight="?attr/list_item_header_height"
+    android:layout_marginLeft="?attr/list_item_padding_left"
+    android:layout_marginRight="?attr/list_item_padding_right"
+    android:paddingBottom="4dip"
+    android:background="@drawable/list_section_divider_holo_custom"
+    android:orientation="vertical">
+
+    <TextView
+        android:id="@+id/account_type"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical"
+        android:paddingLeft="?attr/list_item_header_text_indent"
+        android:textAppearance="?android:attr/textAppearanceSmall"
+        android:textColor="@color/people_app_theme_color"
+        android:textStyle="bold"
+        android:textAllCaps="true"
+        android:singleLine="true"/>
+
+    <!-- TODO: Should use correct color with a correct name (content should be same).
+         can use "?android:attr/textColorTertiary" -->
+    <TextView
+        android:id="@+id/account_name"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical"
+        android:paddingLeft="?attr/list_item_header_text_indent"
+        android:textColor="@color/contact_count_text_color"
+        android:textSize="12sp"
+        android:singleLine="true"
+        android:ellipsize="middle" />
+</LinearLayout>
diff --git a/res/layout/group_browse_list_account_header.xml b/res/layout/group_browse_list_account_header.xml
index 78e0639..7bfbd07 100644
--- a/res/layout/group_browse_list_account_header.xml
+++ b/res/layout/group_browse_list_account_header.xml
@@ -26,39 +26,6 @@
         android:layout_width="match_parent"
         android:layout_height="@dimen/list_header_extra_top_padding" />
 
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:minHeight="?attr/list_item_header_height"
-        android:layout_marginLeft="?attr/list_item_padding_left"
-        android:layout_marginRight="?attr/list_item_padding_right"
-        android:background="@drawable/list_section_divider_holo_custom"
-        android:orientation="horizontal">
-
-        <TextView
-            android:id="@+id/account_type"
-            android:layout_width="0px"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:layout_gravity="center_vertical"
-            android:paddingLeft="?attr/list_item_header_text_indent"
-            android:textAppearance="?android:attr/textAppearanceSmall"
-            android:textColor="@color/people_app_theme_color"
-            android:textStyle="bold"
-            android:textAllCaps="true"
-            android:singleLine="true"/>
-
-        <!-- TODO: Shold use correct color with a correct name (content should be same).
-             can use "?android:attr/textColorTertiary" -->
-        <TextView
-            android:id="@+id/account_name"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
-            android:textColor="@color/contact_count_text_color"
-            android:textSize="12sp"
-            android:singleLine="true"
-            android:ellipsize="middle" />
-    </LinearLayout>
+    <include layout="@layout/group_account_header_horizontal" />
 
 </LinearLayout>