Turned the "copy local" command into a button under the contact detail view
Change-Id: Ic2878d71f2812420191ea00a0a7b1f935b0eda74
diff --git a/res/drawable-hdpi/ic_menu_copy_contact.png b/res/drawable-hdpi/ic_menu_copy_contact.png
deleted file mode 100644
index e6be48b..0000000
--- a/res/drawable-hdpi/ic_menu_copy_contact.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_copy_contact.png b/res/drawable-mdpi/ic_menu_copy_contact.png
deleted file mode 100644
index 750db62..0000000
--- a/res/drawable-mdpi/ic_menu_copy_contact.png
+++ /dev/null
Binary files differ
diff --git a/res/layout-xlarge/contact_detail_fragment.xml b/res/layout-xlarge/contact_detail_fragment.xml
index 66c7eed..034d1ce 100644
--- a/res/layout-xlarge/contact_detail_fragment.xml
+++ b/res/layout-xlarge/contact_detail_fragment.xml
@@ -14,68 +14,76 @@
limitations under the License.
-->
-<FrameLayout
+<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
+ android:id="@+id/contact_detail"
+ android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/panel_message">
- <LinearLayout
- android:id="@+id/contact_detail"
- android:orientation="vertical"
+
+ <!-- Header View (including social status) -->
+ <com.android.contacts.widget.InterpolatingLayout
android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <!-- Header View (including social status) -->
- <com.android.contacts.widget.InterpolatingLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
- <com.android.contacts.views.detail.ContactDetailHeaderView
- android:id="@+id/contact_header_widget"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- ex:layout_wideParentWidth="800dip"
- ex:layout_wideLeftMargin="80dip"
- ex:layout_narrowParentWidth="500dip"
- ex:layout_narrowLeftMargin="15dip"
- />
- </com.android.contacts.widget.InterpolatingLayout>
-
- <!-- Placeholder for empty list -->
- <com.android.contacts.widget.InterpolatingLayout
- android:id="@android:id/empty"
+ android:layout_height="wrap_content">
+ <com.android.contacts.views.detail.ContactDetailHeaderView
+ android:id="@+id/contact_header_widget"
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_wideLeftMargin="144dip"
- ex:layout_narrowParentWidth="500dip"
- ex:layout_narrowLeftMargin="42dip"
- android:paddingTop="10dip"
- android:lineSpacingMultiplier="0.92"
- />
- </com.android.contacts.widget.InterpolatingLayout>
+ ex:layout_wideParentWidth="800dip"
+ ex:layout_wideLeftMargin="80dip"
+ ex:layout_narrowParentWidth="500dip"
+ ex:layout_narrowLeftMargin="15dip"
+ />
+ </com.android.contacts.widget.InterpolatingLayout>
- <!-- Real list -->
- <com.android.contacts.widget.InterpolatingLayout
+ <!-- Placeholder for empty list -->
+ <com.android.contacts.widget.InterpolatingLayout
+ 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_wideLeftMargin="144dip"
+ ex:layout_narrowParentWidth="500dip"
+ ex:layout_narrowLeftMargin="42dip"
+ android:paddingTop="10dip"
+ android:lineSpacingMultiplier="0.92"
+ />
+ </com.android.contacts.widget.InterpolatingLayout>
+
+ <!-- Real list -->
+ <com.android.contacts.widget.InterpolatingLayout
+ android:layout_width="match_parent"
+ android:layout_height="0px"
+ android:layout_weight="1">
+ <ListView android:id="@android:id/list"
android:layout_width="match_parent"
- android:layout_height="0px"
- android:layout_weight="1">
- <ListView android:id="@android:id/list"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- ex:layout_wideParentWidth="800dip"
- ex:layout_wideLeftMargin="144dip"
- ex:layout_narrowParentWidth="500dip"
- ex:layout_narrowLeftMargin="42dip"
- android:cacheColorHint="#00000000"
- />
- </com.android.contacts.widget.InterpolatingLayout>
- </LinearLayout>
-</FrameLayout>
\ No newline at end of file
+ android:layout_height="match_parent"
+ ex:layout_wideParentWidth="800dip"
+ ex:layout_wideLeftMargin="144dip"
+ ex:layout_narrowParentWidth="500dip"
+ ex:layout_narrowLeftMargin="42dip"
+ android:cacheColorHint="#00000000"
+ />
+ </com.android.contacts.widget.InterpolatingLayout>
+
+ <!-- "Copy to my contacts"- button -->
+ <Button
+ android:id="@+id/copyLocal"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/menu_copyContact"
+ android:visibility="gone"
+ android:layout_gravity="right"
+ android:layout_marginRight="40dip"
+ android:layout_marginTop="20dip"
+ android:layout_marginBottom="20dip" />
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout/contact_detail_fragment.xml b/res/layout/contact_detail_fragment.xml
index 180114b..a3ca198 100644
--- a/res/layout/contact_detail_fragment.xml
+++ b/res/layout/contact_detail_fragment.xml
@@ -50,5 +50,17 @@
android:lineSpacingMultiplier="0.92"
/>
</ScrollView>
+
+ <!-- "Copy to my contacts"- button -->
+ <Button
+ android:id="@+id/copyLocal"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/menu_copyContact"
+ android:visibility="gone"
+ android:layout_gravity="right"
+ android:layout_marginRight="40dip"
+ android:layout_marginTop="20dip"
+ android:layout_marginBottom="20dip" />
</LinearLayout>
diff --git a/res/menu/view.xml b/res/menu/view.xml
index ea8fe7f..0bd1477 100644
--- a/res/menu/view.xml
+++ b/res/menu/view.xml
@@ -37,9 +37,4 @@
android:id="@+id/menu_delete"
android:icon="@android:drawable/ic_menu_delete"
android:title="@string/menu_deleteContact" />
-
- <item
- android:id="@+id/menu_copy"
- android:icon="@drawable/ic_menu_copy_contact"
- android:title="@string/menu_copyContact" />
</menu>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 98537b6..9cf4398 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1322,7 +1322,7 @@
<string name="visualScrollerAlphabet">A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z</string>
<!-- The menu item (or button) that creates a local copy of a corporate contact. [CHAR LIMIT=40]-->
- <string name="menu_copyContact">Make personal copy</string>
+ <string name="menu_copyContact">Copy to my contacts</string>
<!-- The description of the directory where the contact was found [CHAR LIMIT=100]-->
<string name="contact_directory_description">from <xliff:g id="type" example="Corporate Directory">%1$s</xliff:g></string>