Merge "Fixed no contacts layout on nexus 7." into lmp-dev
diff --git a/res/layout-sw600dp-land/contacts_unavailable_fragment.xml b/res/layout-sw600dp-land/contacts_unavailable_fragment.xml
new file mode 100644
index 0000000..eb3e5f2
--- /dev/null
+++ b/res/layout-sw600dp-land/contacts_unavailable_fragment.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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.
+-->
+
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingBottom="?attr/favorites_padding_bottom">
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="horizontal">
+ <View
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="@integer/people_activity_land_space_layout_weight"
+ android:background="@color/background_primary"/>
+ <View
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:background="@color/contact_favorites_list_background_color"
+ android:layout_weight="@integer/people_activity_land_list_view_layout_weight"
+ android:elevation="@dimen/people_activity_card_elevation"/>
+ <View
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="@integer/people_activity_land_space_layout_weight"
+ android:background="@color/background_primary"/>
+ </LinearLayout>
+ <ScrollView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:fillViewport="true">
+ <include layout="@layout/contacts_unavailable_fragment_content"/>
+ </ScrollView>
+</FrameLayout>
diff --git a/res/layout/contacts_unavailable_fragment.xml b/res/layout/contacts_unavailable_fragment.xml
index d0edc26..239693c 100644
--- a/res/layout/contacts_unavailable_fragment.xml
+++ b/res/layout/contacts_unavailable_fragment.xml
@@ -17,79 +17,7 @@
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:fillViewport="true">
- <LinearLayout
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center_horizontal"
- android:background="@drawable/panel_message">
- <TextView
- android:id="@+id/message"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="48dip"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textColor="?android:attr/textColorSecondary" />
-
- <TextView
- android:id="@+id/secondary_message"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="?android:attr/textColorSecondary"
- android:layout_gravity="center_horizontal"
- android:layout_marginBottom="@dimen/no_accounts_message_margin" />
-
- <LinearLayout
- android:orientation="vertical"
- android:layout_marginLeft="48dip"
- android:layout_marginRight="48dip"
- android:layout_marginStart="48dip"
- android:layout_marginEnd="48dip"
- android:layout_width="wrap_content"
- android:layout_height="match_parent">
- <Button
- android:id="@+id/create_contact_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="15dip"
- android:text="@string/contacts_unavailable_create_contact" />
-
- <Button
- android:id="@+id/add_account_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="15dip"
- android:text="@string/contacts_unavailable_add_account" />
-
- <Button
- android:id="@+id/import_contacts_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="15dip"
- android:text="@string/contacts_unavailable_import_contacts" />
-
- <Button
- android:id="@+id/import_failure_uninstall_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="15dip"
- android:text="@string/upgrade_out_of_memory_uninstall" />
-
- <Button
- android:id="@+id/import_failure_retry_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="15dip"
- android:text="@string/upgrade_out_of_memory_retry" />
-
- <ProgressBar
- android:id="@+id/progress"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_marginBottom="15dip" />
- </LinearLayout>
- </LinearLayout>
-</ScrollView>
\ No newline at end of file
+ android:fillViewport="true"
+ android:background="@color/background_primary">
+ <include layout="@layout/contacts_unavailable_fragment_content"/>
+</ScrollView>
diff --git a/res/layout/contacts_unavailable_fragment_content.xml b/res/layout/contacts_unavailable_fragment_content.xml
new file mode 100644
index 0000000..c36d038
--- /dev/null
+++ b/res/layout/contacts_unavailable_fragment_content.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_horizontal">
+ <TextView
+ android:id="@+id/message"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="48dip"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textColor="?android:attr/textColorSecondary" />
+
+ <TextView
+ android:id="@+id/secondary_message"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="?android:attr/textColorSecondary"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginBottom="@dimen/no_accounts_message_margin" />
+
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_marginLeft="48dip"
+ android:layout_marginRight="48dip"
+ android:layout_marginStart="48dip"
+ android:layout_marginEnd="48dip"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent">
+ <Button
+ android:id="@+id/create_contact_button"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="15dip"
+ android:text="@string/contacts_unavailable_create_contact" />
+
+ <Button
+ android:id="@+id/add_account_button"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="15dip"
+ android:text="@string/contacts_unavailable_add_account" />
+
+ <Button
+ android:id="@+id/import_contacts_button"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="15dip"
+ android:text="@string/contacts_unavailable_import_contacts" />
+
+ <Button
+ android:id="@+id/import_failure_uninstall_button"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="15dip"
+ android:text="@string/upgrade_out_of_memory_uninstall" />
+
+ <Button
+ android:id="@+id/import_failure_retry_button"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="15dip"
+ android:text="@string/upgrade_out_of_memory_retry" />
+
+ <ProgressBar
+ android:id="@+id/progress"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:layout_marginBottom="15dip" />
+ </LinearLayout>
+</LinearLayout>