Configure resource folders for different device sizes
- This CL purely ports over changes from HC MR2 for 7" support
over to master (no new changes).
https://android-git.corp.google.com/g/#change,110633
https://android-git.corp.google.com/g/#change,110840
- In general:
* phone layouts should go into the regular layout and values folders
* 7" and tablet layouts should go into the sw580dp folders
(meaning that the layouts only apply to devices with at least a
minimum width in both orientations of 580dp)
* if you want to exclude portrait on a 7" but include landscape on
a 7", portrait and landscape on a 10" tablet, the layout
should go into the sw580dp-w720dp (minimum screen width of 580dp
with the current orientation being > 720dp)
* if you only want landscape on a 10" tablet, then layouts should
go into sw580dp-w1000dp (minimum screen width of 580dp with
current orientation > 1000dp)
- TODO: Still need extensive testing in all the diff device sizes and
specific tweaks (i.e. to the action bar), but having the right folders
will help us be able to make UI changes isolated to one screen size
Bug: 4689448
Change-Id: I32f8df14854d68ab2fc98e21b7a18fc8f0df0000
diff --git a/res/drawable-xlarge-nodpi/divider_vertical_dark.9.png b/res/drawable-sw580dp-nodpi/divider_vertical_dark.9.png
similarity index 100%
rename from res/drawable-xlarge-nodpi/divider_vertical_dark.9.png
rename to res/drawable-sw580dp-nodpi/divider_vertical_dark.9.png
Binary files differ
diff --git a/res/layout-sw580dp-w1000dp/contact_detail_empty.xml b/res/layout-sw580dp-w1000dp/contact_detail_empty.xml
new file mode 100644
index 0000000..e12dd39
--- /dev/null
+++ b/res/layout-sw580dp-w1000dp/contact_detail_empty.xml
@@ -0,0 +1,36 @@
+<?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.
+-->
+
+<!-- Placeholder for empty details for a contact -->
+
+<com.android.contacts.widget.InterpolatingLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+ <TextView android:id="@+id/emptyText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/no_contact_details"
+ android:textSize="20sp"
+ android:textColor="?android:attr/textColorSecondary"
+ ex:layout_wideParentWidth="800dip"
+ ex:layout_wideMarginLeft="80dip"
+ ex:layout_narrowParentWidth="500dip"
+ ex:layout_narrowMarginLeft="44dip"
+ android:paddingTop="10dip"
+ android:lineSpacingMultiplier="0.92"/>
+</com.android.contacts.widget.InterpolatingLayout>
\ No newline at end of file
diff --git a/res/layout-xlarge-land/contact_detail_header_view.xml b/res/layout-sw580dp-w1000dp/contact_detail_header_view.xml
similarity index 87%
rename from res/layout-xlarge-land/contact_detail_header_view.xml
rename to res/layout-sw580dp-w1000dp/contact_detail_header_view.xml
index fb57202..82432a0 100644
--- a/res/layout-xlarge-land/contact_detail_header_view.xml
+++ b/res/layout-sw580dp-w1000dp/contact_detail_header_view.xml
@@ -25,7 +25,7 @@
<TextView
android:id="@+id/attribution"
android:layout_width="match_parent"
- android:layout_height="56dip"
+ android:layout_height="@dimen/detail_header_attribution_height"
android:paddingRight="16dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorTertiary"
@@ -60,7 +60,7 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="16dip"
- android:layout_marginLeft="16dip">
+ android:layout_marginLeft="@dimen/detail_header_view_margin">
<!-- Star -->
<CheckBox
@@ -77,33 +77,24 @@
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:paddingLeft="16dip"
+ android:paddingLeft="@dimen/detail_header_view_margin"
android:orientation="vertical">
<TextView
android:id="@+id/name"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:ellipsize="end"
+ style="@style/ContactDetailHeaderTextView"
android:textSize="@dimen/contact_name_text_size" />
<TextView
android:id="@+id/phonetic_name"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ style="@style/ContactDetailHeaderTextView"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:singleLine="true"
- android:ellipsize="end"
android:layout_marginTop="-2dip"
android:visibility="gone" />
<TextView
android:id="@+id/organization"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:ellipsize="end"
+ style="@style/ContactDetailHeaderTextView"
android:layout_marginTop="-2dip"
android:visibility="gone"
android:textAppearance="?android:attr/textAppearanceMedium"
diff --git a/res/layout-xlarge-land/contact_detail_list_item.xml b/res/layout-sw580dp-w1000dp/contact_detail_list_item.xml
similarity index 100%
rename from res/layout-xlarge-land/contact_detail_list_item.xml
rename to res/layout-sw580dp-w1000dp/contact_detail_list_item.xml
diff --git a/res/layout-xlarge/account_selector_list_item.xml b/res/layout-sw580dp/account_selector_list_item.xml
similarity index 100%
rename from res/layout-xlarge/account_selector_list_item.xml
rename to res/layout-sw580dp/account_selector_list_item.xml
diff --git a/res/layout-xlarge/aggregation_suggestions.xml b/res/layout-sw580dp/aggregation_suggestions.xml
similarity index 100%
rename from res/layout-xlarge/aggregation_suggestions.xml
rename to res/layout-sw580dp/aggregation_suggestions.xml
diff --git a/res/layout-xlarge/aggregation_suggestions_item.xml b/res/layout-sw580dp/aggregation_suggestions_item.xml
similarity index 100%
rename from res/layout-xlarge/aggregation_suggestions_item.xml
rename to res/layout-sw580dp/aggregation_suggestions_item.xml
diff --git a/res/layout-xlarge/contact_detail_fragment.xml b/res/layout-sw580dp/contact_detail_fragment.xml
similarity index 70%
rename from res/layout-xlarge/contact_detail_fragment.xml
rename to res/layout-sw580dp/contact_detail_fragment.xml
index 4d6a900..3849277 100644
--- a/res/layout-xlarge/contact_detail_fragment.xml
+++ b/res/layout-sw580dp/contact_detail_fragment.xml
@@ -24,25 +24,10 @@
android:background="@drawable/panel_content">
<!-- Placeholder for empty list -->
- <com.android.contacts.widget.InterpolatingLayout
+ <include
android:id="@android:id/empty"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:visibility="gone">
- <TextView android:id="@+id/emptyText"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/no_contact_details"
- android:textSize="20sp"
- android:textColor="?android:attr/textColorSecondary"
- ex:layout_wideParentWidth="800dip"
- ex:layout_wideMarginLeft="64dip"
- ex:layout_narrowParentWidth="500dip"
- ex:layout_narrowMarginLeft="42dip"
- android:paddingTop="10dip"
- android:lineSpacingMultiplier="0.92"
- />
- </com.android.contacts.widget.InterpolatingLayout>
+ layout="@layout/contact_detail_empty"
+ android:visibility="gone" />
<!-- Real list -->
<com.android.contacts.widget.InterpolatingLayout
@@ -55,8 +40,8 @@
ex:layout_wideParentWidth="800dip"
ex:layout_wideMarginLeft="64dip"
ex:layout_widePaddingRight="48dip"
- ex:layout_narrowParentWidth="500dip"
- ex:layout_narrowMarginLeft="32dip"
+ ex:layout_narrowParentWidth="300dip"
+ ex:layout_narrowMarginLeft="5dip"
ex:layout_narrowPaddingRight="16dip"
android:cacheColorHint="#00000000"
android:divider="@null"
diff --git a/res/layout-large/contact_detail_header_view.xml b/res/layout-sw580dp/contact_detail_header_view.xml
similarity index 87%
rename from res/layout-large/contact_detail_header_view.xml
rename to res/layout-sw580dp/contact_detail_header_view.xml
index 19132dd..95a5617 100644
--- a/res/layout-large/contact_detail_header_view.xml
+++ b/res/layout-sw580dp/contact_detail_header_view.xml
@@ -25,7 +25,7 @@
<TextView
android:id="@+id/attribution"
android:layout_width="match_parent"
- android:layout_height="56dip"
+ android:layout_height="@dimen/detail_header_attribution_height"
android:paddingRight="24dip"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorTertiary"
@@ -39,7 +39,7 @@
<ImageView
android:id="@+id/photo"
- android:layout_marginLeft="16dip"
+ android:layout_marginLeft="@dimen/detail_header_view_margin"
android:layout_width="96dip"
android:layout_height="96dip" />
@@ -60,7 +60,7 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="16dip"
- android:layout_marginLeft="16dip">
+ android:layout_marginLeft="@dimen/detail_header_view_margin">>
<!-- Star -->
<CheckBox
@@ -77,31 +77,24 @@
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:paddingLeft="16dip"
+ android:paddingLeft="@dimen/detail_header_view_margin"
android:orientation="vertical">
<TextView
android:id="@+id/name"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:ellipsize="end"
+ style="@style/ContactDetailHeaderTextView"
android:textSize="@dimen/contact_name_text_size" />
<TextView
android:id="@+id/phonetic_name"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ style="@style/ContactDetailHeaderTextView"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:singleLine="true"
- android:ellipsize="end"
android:layout_marginTop="-2dip"
android:visibility="gone" />
<TextView
android:id="@+id/organization"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ style="@style/ContactDetailHeaderTextView"
android:layout_marginTop="-2dip"
android:visibility="gone"
android:textAppearance="?android:attr/textAppearanceMedium"
diff --git a/res/layout-xlarge/contact_editor_activity.xml b/res/layout-sw580dp/contact_editor_activity.xml
similarity index 100%
rename from res/layout-xlarge/contact_editor_activity.xml
rename to res/layout-sw580dp/contact_editor_activity.xml
diff --git a/res/layout-xlarge/contact_editor_fragment.xml b/res/layout-sw580dp/contact_editor_fragment.xml
similarity index 100%
rename from res/layout-xlarge/contact_editor_fragment.xml
rename to res/layout-sw580dp/contact_editor_fragment.xml
diff --git a/res/layout-xlarge/contact_picker_content.xml b/res/layout-sw580dp/contact_picker_content.xml
similarity index 100%
rename from res/layout-xlarge/contact_picker_content.xml
rename to res/layout-sw580dp/contact_picker_content.xml
diff --git a/res/layout-xlarge/edit_spinner.xml b/res/layout-sw580dp/edit_spinner.xml
similarity index 100%
rename from res/layout-xlarge/edit_spinner.xml
rename to res/layout-sw580dp/edit_spinner.xml
diff --git a/res/layout-xlarge/event_field_editor_view.xml b/res/layout-sw580dp/event_field_editor_view.xml
similarity index 100%
rename from res/layout-xlarge/event_field_editor_view.xml
rename to res/layout-sw580dp/event_field_editor_view.xml
diff --git a/res/layout-xlarge/external_raw_contact_editor_view.xml b/res/layout-sw580dp/external_raw_contact_editor_view.xml
similarity index 92%
rename from res/layout-xlarge/external_raw_contact_editor_view.xml
rename to res/layout-sw580dp/external_raw_contact_editor_view.xml
index 0304c48..b185c8a 100644
--- a/res/layout-xlarge/external_raw_contact_editor_view.xml
+++ b/res/layout-sw580dp/external_raw_contact_editor_view.xml
@@ -43,7 +43,7 @@
android:layout_gravity="top|left"
ex:layout_wideParentWidth="960dip"
ex:layout_wideMarginLeft="96dip"
- ex:layout_narrowParentWidth="800dip"
+ ex:layout_narrowParentWidth="@dimen/editor_interpolator_narrow_width"
ex:layout_narrowMarginLeft="15dip">
<include
@@ -58,7 +58,7 @@
android:layout_gravity="top"
ex:layout_wideParentWidth="960dip"
ex:layout_wideMarginRight="48dip"
- ex:layout_narrowParentWidth="800dip"
+ ex:layout_narrowParentWidth="@dimen/editor_interpolator_narrow_width"
ex:layout_narrowMarginRight="15dip"
android:orientation="vertical">
@@ -71,7 +71,7 @@
android:id="@+id/read_only_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginLeft="64dip"
+ android:layout_marginLeft="@dimen/editor_name_text_field_left_margin"
android:layout_marginRight="48dip"
android:layout_marginTop="6dip"
android:layout_marginBottom="4dip"
@@ -91,7 +91,7 @@
ex:layout_wideParentWidth="960dip"
ex:layout_wideMarginLeft="96dip"
ex:layout_wideMarginRight="96dip"
- ex:layout_narrowParentWidth="800dip"
+ ex:layout_narrowParentWidth="@dimen/editor_interpolator_narrow_width"
ex:layout_narrowMarginLeft="15dip"
ex:layout_narrowMarginRight="15dip">
@@ -132,7 +132,7 @@
ex:layout_wideParentWidth="960dip"
ex:layout_wideMarginLeft="246dip"
ex:layout_wideMarginRight="156dip"
- ex:layout_narrowParentWidth="800dip"
+ ex:layout_narrowParentWidth="@dimen/editor_interpolator_narrow_width"
ex:layout_narrowMarginLeft="165dip"
ex:layout_narrowMarginRight="121dip"
android:layout_width="match_parent"
diff --git a/res/layout-xlarge/group_detail_fragment.xml b/res/layout-sw580dp/group_detail_fragment.xml
similarity index 100%
rename from res/layout-xlarge/group_detail_fragment.xml
rename to res/layout-sw580dp/group_detail_fragment.xml
diff --git a/res/layout-xlarge/item_group_membership.xml b/res/layout-sw580dp/item_group_membership.xml
similarity index 97%
rename from res/layout-xlarge/item_group_membership.xml
rename to res/layout-sw580dp/item_group_membership.xml
index 41d77b7..985b7ae 100644
--- a/res/layout-xlarge/item_group_membership.xml
+++ b/res/layout-sw580dp/item_group_membership.xml
@@ -24,7 +24,7 @@
<TextView
android:id="@+id/kind_title"
- android:layout_width="150dip"
+ android:layout_width="@dimen/editor_title_label_width"
android:layout_height="@dimen/editor_min_line_item_height"
android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceSmall"
diff --git a/res/layout-xlarge/item_kind_section.xml b/res/layout-sw580dp/item_kind_section.xml
similarity index 100%
rename from res/layout-xlarge/item_kind_section.xml
rename to res/layout-sw580dp/item_kind_section.xml
diff --git a/res/layout-xlarge/people_activity.xml b/res/layout-sw580dp/people_activity.xml
similarity index 100%
rename from res/layout-xlarge/people_activity.xml
rename to res/layout-sw580dp/people_activity.xml
diff --git a/res/layout-xlarge/phonetic_name_editor_view.xml b/res/layout-sw580dp/phonetic_name_editor_view.xml
similarity index 96%
rename from res/layout-xlarge/phonetic_name_editor_view.xml
rename to res/layout-sw580dp/phonetic_name_editor_view.xml
index c3fa6a3..f27c1fc 100644
--- a/res/layout-xlarge/phonetic_name_editor_view.xml
+++ b/res/layout-sw580dp/phonetic_name_editor_view.xml
@@ -21,7 +21,7 @@
android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="vertical"
android:paddingRight="?android:attr/scrollbarSize"
- android:layout_marginLeft="52dip"
+ android:layout_marginLeft="@dimen/editor_name_text_field_left_margin"
android:layout_marginRight="48dip"
android:layout_marginTop="6dip"
android:layout_marginBottom="4dip">
diff --git a/res/layout-xlarge/raw_contact_editor_header.xml b/res/layout-sw580dp/raw_contact_editor_header.xml
similarity index 100%
rename from res/layout-xlarge/raw_contact_editor_header.xml
rename to res/layout-sw580dp/raw_contact_editor_header.xml
diff --git a/res/layout-xlarge/raw_contact_editor_view.xml b/res/layout-sw580dp/raw_contact_editor_view.xml
similarity index 87%
rename from res/layout-xlarge/raw_contact_editor_view.xml
rename to res/layout-sw580dp/raw_contact_editor_view.xml
index 0e3d227..9c3f708 100644
--- a/res/layout-xlarge/raw_contact_editor_view.xml
+++ b/res/layout-sw580dp/raw_contact_editor_view.xml
@@ -48,8 +48,8 @@
android:layout_gravity="top|left"
ex:layout_wideParentWidth="960dip"
ex:layout_wideMarginLeft="96dip"
- ex:layout_narrowParentWidth="800dip"
- ex:layout_narrowMarginLeft="15dip">
+ ex:layout_narrowParentWidth="@dimen/editor_interpolator_narrow_width"
+ ex:layout_narrowMarginLeft="20dip">
<include
android:id="@+id/edit_photo"
@@ -63,8 +63,10 @@
android:layout_gravity="top"
ex:layout_wideParentWidth="960dip"
ex:layout_wideMarginRight="48dip"
- ex:layout_narrowParentWidth="800dip"
+ ex:layout_wideMarginLeft="10dip"
+ ex:layout_narrowParentWidth="@dimen/editor_interpolator_narrow_width"
ex:layout_narrowMarginRight="15dip"
+ ex:layout_narrowMarginLeft="5dip"
android:orientation="vertical">
<View
@@ -83,7 +85,7 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginLeft="52dip"
+ android:layout_marginLeft="@dimen/editor_name_text_field_left_margin"
android:layout_marginRight="48dip">
<ViewStub
android:id="@+id/aggregation_suggestion_stub"
@@ -106,16 +108,16 @@
ex:layout_wideParentWidth="960dip"
ex:layout_wideMarginLeft="96dip"
ex:layout_wideMarginRight="48dip"
- ex:layout_narrowParentWidth="800dip"
- ex:layout_narrowMarginLeft="15dip"
- ex:layout_narrowMarginRight="15dip">
+ ex:layout_narrowParentWidth="@dimen/editor_interpolator_narrow_width"
+ ex:layout_narrowMarginLeft="25dip"
+ ex:layout_narrowMarginRight="10dip">
<LinearLayout
android:id="@+id/sect_fields"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:paddingRight="?android:attr/scrollbarSize" />
+ android:paddingRight="@dimen/editor_name_text_field_right_margin" />
</LinearLayout>
</com.android.contacts.widget.InterpolatingLayout>
@@ -130,7 +132,7 @@
ex:layout_wideParentWidth="960dip"
ex:layout_wideMarginLeft="246dip"
ex:layout_wideMarginRight="156dip"
- ex:layout_narrowParentWidth="800dip"
+ ex:layout_narrowParentWidth="@dimen/editor_interpolator_narrow_width"
ex:layout_narrowMarginLeft="165dip"
ex:layout_narrowMarginRight="121dip"
android:layout_width="match_parent"
diff --git a/res/layout-xlarge/search_header.xml b/res/layout-sw580dp/search_header.xml
similarity index 100%
rename from res/layout-xlarge/search_header.xml
rename to res/layout-sw580dp/search_header.xml
diff --git a/res/layout-xlarge/structured_name_editor_view.xml b/res/layout-sw580dp/structured_name_editor_view.xml
similarity index 96%
rename from res/layout-xlarge/structured_name_editor_view.xml
rename to res/layout-sw580dp/structured_name_editor_view.xml
index 37b5536..97e222e 100644
--- a/res/layout-xlarge/structured_name_editor_view.xml
+++ b/res/layout-sw580dp/structured_name_editor_view.xml
@@ -21,7 +21,7 @@
android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="vertical"
android:paddingRight="?android:attr/scrollbarSize"
- android:layout_marginLeft="52dip"
+ android:layout_marginLeft="@dimen/editor_name_text_field_left_margin"
android:layout_marginRight="48dip"
android:layout_marginTop="6dip"
android:layout_marginBottom="4dip">
diff --git a/res/layout-xlarge/text_fields_editor_view.xml b/res/layout-sw580dp/text_fields_editor_view.xml
similarity index 100%
rename from res/layout-xlarge/text_fields_editor_view.xml
rename to res/layout-sw580dp/text_fields_editor_view.xml
diff --git a/res/layout-xlarge/total_contacts.xml b/res/layout-sw580dp/total_contacts.xml
similarity index 100%
rename from res/layout-xlarge/total_contacts.xml
rename to res/layout-sw580dp/total_contacts.xml
diff --git a/res/layout/contact_detail_empty.xml b/res/layout/contact_detail_empty.xml
new file mode 100644
index 0000000..755c069
--- /dev/null
+++ b/res/layout/contact_detail_empty.xml
@@ -0,0 +1,28 @@
+<?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.
+-->
+
+<!-- Placeholder for empty details for a contact -->
+
+<TextView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/no_contact_details"
+ android:textSize="20sp"
+ android:textColor="?android:attr/textColorSecondary"
+ android:layout_marginLeft="15dip"
+ android:paddingTop="10dip"
+ android:lineSpacingMultiplier="0.92"/>
\ No newline at end of file
diff --git a/res/menu-xlarge/actions.xml b/res/menu-sw580dp-w720dp/actions.xml
similarity index 100%
rename from res/menu-xlarge/actions.xml
rename to res/menu-sw580dp-w720dp/actions.xml
diff --git a/res/menu-xlarge/view_contact.xml b/res/menu-sw580dp-w720dp/view_contact.xml
similarity index 100%
rename from res/menu-xlarge/view_contact.xml
rename to res/menu-sw580dp-w720dp/view_contact.xml
diff --git a/res/menu-xlarge/view_group.xml b/res/menu-sw580dp-w720dp/view_group.xml
similarity index 100%
rename from res/menu-xlarge/view_group.xml
rename to res/menu-sw580dp-w720dp/view_group.xml
diff --git a/res/menu-sw580dp/actions.xml b/res/menu-sw580dp/actions.xml
new file mode 100644
index 0000000..4fe669a
--- /dev/null
+++ b/res/menu-sw580dp/actions.xml
@@ -0,0 +1,54 @@
+<?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.
+-->
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:id="@+id/menu_search"
+ android:showAsAction="always"
+ android:actionViewClass="android.widget.SearchView" />
+
+ <item
+ android:id="@+id/menu_add_contact"
+ android:icon="@drawable/ic_menu_add_contact_holo_light"
+ android:title="@string/menu_new_contact_action_bar"
+ android:showAsAction="withText" />
+
+ <item
+ android:id="@+id/menu_add_group"
+ android:icon="@drawable/ic_menu_display_all_holo_light"
+ android:title="@string/menu_new_contact_action_bar"
+ android:showAsAction="withText" />
+
+ <item
+ android:id="@+id/menu_contacts_filter"
+ android:icon="@drawable/ic_menu_settings_holo_light"
+ android:title="@string/menu_contacts_filter" />
+
+ <item
+ android:id="@+id/menu_settings"
+ android:icon="@drawable/ic_menu_settings_holo_light"
+ android:title="@string/menu_settings" />
+
+ <item
+ android:id="@+id/menu_accounts"
+ android:icon="@drawable/ic_menu_accounts_holo_light"
+ android:title="@string/menu_accounts" />
+
+ <item
+ android:id="@+id/menu_import_export"
+ android:icon="@drawable/ic_menu_import_export_holo_light"
+ android:title="@string/menu_import_export" />
+
+</menu>
diff --git a/res/menu-sw580dp/view_contact.xml b/res/menu-sw580dp/view_contact.xml
new file mode 100644
index 0000000..542cfe3
--- /dev/null
+++ b/res/menu-sw580dp/view_contact.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:id="@+id/menu_edit"
+ android:icon="@drawable/ic_menu_compose_holo_light"
+ android:title="@string/menu_editContact"
+ android:alphabeticShortcut="e" />
+
+ <item
+ android:id="@+id/menu_share"
+ android:icon="@drawable/ic_menu_share_holo_light"
+ android:title="@string/menu_share"
+ android:alphabeticShortcut="s" />
+
+ <item
+ android:id="@+id/menu_options"
+ android:icon="@drawable/ic_menu_mark"
+ android:title="@string/menu_contactOptions" />
+
+ <item
+ android:id="@+id/menu_delete"
+ android:icon="@drawable/ic_menu_trash_holo_light"
+ android:title="@string/menu_deleteContact" />
+</menu>
diff --git a/res/menu-sw580dp/view_group.xml b/res/menu-sw580dp/view_group.xml
new file mode 100644
index 0000000..3ff6ac6
--- /dev/null
+++ b/res/menu-sw580dp/view_group.xml
@@ -0,0 +1,33 @@
+<?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.
+-->
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:id="@+id/menu_edit_group"
+ android:icon="@drawable/ic_menu_compose_holo_light"
+ android:title="@string/menu_editGroup"
+ android:alphabeticShortcut="e" />
+
+ <item
+ android:id="@+id/menu_rename_group"
+ android:icon="@drawable/ic_menu_settings_holo_light"
+ android:title="@string/menu_renameGroup" />
+
+ <item
+ android:id="@+id/menu_delete_group"
+ android:icon="@drawable/ic_menu_trash_holo_light"
+ android:title="@string/menu_deleteGroup" />
+</menu>
diff --git a/res/values-xlarge-land/dimens.xml b/res/values-sw580dp-w1000dp/dimens.xml
similarity index 88%
rename from res/values-xlarge-land/dimens.xml
rename to res/values-sw580dp-w1000dp/dimens.xml
index 52c521e..45da0a8 100644
--- a/res/values-xlarge-land/dimens.xml
+++ b/res/values-sw580dp-w1000dp/dimens.xml
@@ -19,4 +19,6 @@
<dimen name="action_bar_filter_max_width">300dip</dimen>
<dimen name="action_bar_search_max_width">336dip</dimen>
<dimen name="action_bar_search_spacing">32dip</dimen>
+ <dimen name="detail_header_view_margin">16dip</dimen>
+ <dimen name="detail_header_attribution_height">56dip</dimen>
</resources>
diff --git a/res/values-sw580dp-w720dp/dimens.xml b/res/values-sw580dp-w720dp/dimens.xml
new file mode 100644
index 0000000..a8aedb8
--- /dev/null
+++ b/res/values-sw580dp-w720dp/dimens.xml
@@ -0,0 +1,24 @@
+<?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>
+ <dimen name="editor_type_label_width">180dip</dimen>
+ <dimen name="editor_round_button_padding_left">8dip</dimen>
+ <dimen name="editor_round_button_padding_right">8dip</dimen>
+ <dimen name="editor_name_text_field_left_margin">52dip</dimen>
+ <dimen name="editor_title_label_width">150dip</dimen>
+ <dimen name="editor_interpolator_narrow_width">800dip</dimen>
+ <dimen name="editor_name_text_field_right_margin">10dip</dimen>
+</resources>
\ No newline at end of file
diff --git a/res/values-sw580dp-w720dp/styles.xml b/res/values-sw580dp-w720dp/styles.xml
new file mode 100644
index 0000000..3b7ed4e
--- /dev/null
+++ b/res/values-sw580dp-w720dp/styles.xml
@@ -0,0 +1,49 @@
+<?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.
+-->
+<resources>
+ <style name="PeopleTheme" parent="@android:Theme.Holo.Light">
+ <item name="list_item_height">66dip</item>
+ <item name="activated_background">@drawable/list_item_activated_background</item>
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:actionBarStyle">@style/TransparentActionBarStyle</item>
+ <item name="section_header_background">@drawable/list_title_holo</item>
+ <item name="list_item_divider">?android:attr/listDivider</item>
+ <item name="list_item_padding_top">0dip</item>
+ <item name="list_item_padding_right">24dip</item>
+ <item name="list_item_padding_bottom">0dip</item>
+ <item name="list_item_padding_left">0dip</item>
+ <item name="list_item_gap_between_image_and_text">16dip</item>
+ <item name="list_item_gap_between_label_and_data">5dip</item>
+ <item name="list_item_call_button_padding">14dip</item>
+ <item name="list_item_vertical_divider_margin">5dip</item>
+ <item name="list_item_presence_icon_margin">30dip</item>
+ <item name="list_item_photo_size">64dip</item>
+ <item name="list_item_profile_photo_size">80dip</item>
+ <item name="list_item_prefix_highlight_color">#729a27</item>
+ <item name="list_item_header_text_indent">77dip</item>
+ <item name="list_item_header_text_color">?color/section_header_text_color</item>
+ <item name="list_item_header_text_size">14sp</item>
+ <item name="contact_filter_popup_width">320dip</item>
+ <item name="show_home_icon">true</item>
+ </style>
+
+ <style name="ContactDetailHeaderTextView">
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:singleLine">true</item>
+ <item name="android:ellipsize">end</item>
+ </style>
+</resources>
\ No newline at end of file
diff --git a/res/values-xlarge/colors.xml b/res/values-sw580dp/colors.xml
similarity index 100%
rename from res/values-xlarge/colors.xml
rename to res/values-sw580dp/colors.xml
diff --git a/res/values-xlarge/dimens.xml b/res/values-sw580dp/dimens.xml
similarity index 100%
rename from res/values-xlarge/dimens.xml
rename to res/values-sw580dp/dimens.xml
diff --git a/res/values-xlarge/donottranslate_config.xml b/res/values-sw580dp/donottranslate_config.xml
similarity index 100%
rename from res/values-xlarge/donottranslate_config.xml
rename to res/values-sw580dp/donottranslate_config.xml
diff --git a/res/values-xlarge/styles.xml b/res/values-sw580dp/styles.xml
similarity index 95%
rename from res/values-xlarge/styles.xml
rename to res/values-sw580dp/styles.xml
index cbef91a..b34efcc 100644
--- a/res/values-xlarge/styles.xml
+++ b/res/values-sw580dp/styles.xml
@@ -22,14 +22,14 @@
<item name="section_header_background">@drawable/list_title_holo</item>
<item name="list_item_divider">?android:attr/listDivider</item>
<item name="list_item_padding_top">0dip</item>
- <item name="list_item_padding_right">24dip</item>
+ <item name="list_item_padding_right">20dip</item>
<item name="list_item_padding_bottom">0dip</item>
<item name="list_item_padding_left">0dip</item>
- <item name="list_item_gap_between_image_and_text">16dip</item>
+ <item name="list_item_gap_between_image_and_text">8dip</item>
<item name="list_item_gap_between_label_and_data">5dip</item>
<item name="list_item_call_button_padding">14dip</item>
<item name="list_item_vertical_divider_margin">5dip</item>
- <item name="list_item_presence_icon_margin">30dip</item>
+ <item name="list_item_presence_icon_margin">18dip</item>
<item name="list_item_photo_size">64dip</item>
<item name="list_item_profile_photo_size">80dip</item>
<item name="list_item_prefix_highlight_color">#729a27</item>
@@ -65,7 +65,7 @@
<style name="CustomContactListFilterView" parent="CustomContactListFilterTheme">
<item name="android:layout_width">400dip</item>
- <item name="android:layout_height">600dip</item>
+ <item name="android:layout_height">400dip</item>
</style>
<style name="ContactPickerLayout" parent="ContactPickerTheme">
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 9525f54..e55ec34 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -38,8 +38,8 @@
<dimen name="quick_contact_width">352dip</dimen>
<!-- Padding of the rounded plus/minus/expand/collapse buttons in the editor -->
- <dimen name="editor_round_button_padding_left">4dip</dimen>
- <dimen name="editor_round_button_padding_right">4dip</dimen>
+ <dimen name="editor_round_button_padding_left">2dip</dimen>
+ <dimen name="editor_round_button_padding_right">2dip</dimen>
<dimen name="editor_round_button_padding_top">8dip</dimen>
<dimen name="editor_round_button_padding_bottom">8dip</dimen>
@@ -70,6 +70,24 @@
<!-- Font size for the entries in a spinner in the contact editor. -->
<dimen name="editor_field_spinner_text_size">10sp</dimen>
+ <!-- Left margin of the name text input fields and the photo in the contact editor -->
+ <dimen name="editor_name_text_field_left_margin">25dip</dimen>
+
+ <!-- Right margin of the text input fields in the contact editor -->
+ <dimen name="editor_name_text_field_right_margin">0dip</dimen>
+
+ <!-- Width of the title labels in the contact editor -->
+ <dimen name="editor_title_label_width">120dip</dimen>
+
+ <!-- Interpolator layout narrow width value of the contact editor -->
+ <dimen name="editor_interpolator_narrow_width">600dip</dimen>
+
+ <!-- Height of the attribution text view in the contact detail header view -->
+ <dimen name="detail_header_attribution_height">40dip</dimen>
+
+ <!-- Margin between the photo, the star, and text in the contact detail header view -->
+ <dimen name="detail_header_view_margin">8dip</dimen>
+
<!-- Height of the tab carousel on the contact detail page -->
<dimen name="detail_tab_carousel_height">150dip</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 8fd42b7..51d8a0d 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -268,6 +268,11 @@
<item name="android:layout_width">match_parent</item>
</style>
+ <style name="ContactDetailHeaderTextView">
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">wrap_content</item>
+ </style>
+
<style name="ContactDetailItemType">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>