summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorBrian Attwell <brianattwell@google.com>2014-06-10 13:25:07 -0700
committerBrian Attwell <brianattwell@google.com>2014-06-11 14:36:18 -0700
commitd28851f436c39a83f02d3b405fd91f0fb4833b2a (patch)
treecbac5cc263fa2409834739d2206a63f79af0e79e /res
parent23889ba7ca18ed4ea56248355438a734511bc0b7 (diff)
downloadpackages_apps_Contacts-d28851f436c39a83f02d3b405fd91f0fb4833b2a.tar.gz
packages_apps_Contacts-d28851f436c39a83f02d3b405fd91f0fb4833b2a.tar.bz2
packages_apps_Contacts-d28851f436c39a83f02d3b405fd91f0fb4833b2a.zip
Use Toolbar for QC
* Moved star, add and edit buttons into Toolbar * Fixed implementation of add/edit: copied the ContractDetailFragment implementation * Added unimplemented Share and Place on Home menu items * Deleted some of the quickcontact_activity.xml files * No longer handle click events on Contact photo view Change-Id: Id333b11e89d8755ace600700be15077fd47b6172
Diffstat (limited to 'res')
-rw-r--r--res/drawable-hdpi/ic_star_24dp.pngbin0 -> 469 bytes
-rw-r--r--res/drawable-hdpi/ic_star_outline_24dp.pngbin0 -> 603 bytes
-rw-r--r--res/drawable-mdpi/ic_star_24dp.pngbin0 -> 346 bytes
-rw-r--r--res/drawable-mdpi/ic_star_outline_24dp.pngbin0 -> 424 bytes
-rw-r--r--res/drawable-xhdpi/ic_star_24dp.pngbin0 -> 585 bytes
-rw-r--r--res/drawable-xhdpi/ic_star_outline_24dp.pngbin0 -> 800 bytes
-rw-r--r--res/drawable-xxhdpi/ic_star_24dp.pngbin0 -> 813 bytes
-rw-r--r--res/drawable-xxhdpi/ic_star_outline_24dp.pngbin0 -> 1147 bytes
-rw-r--r--res/drawable-xxxhdpi/ic_star_24dp.pngbin0 -> 1061 bytes
-rw-r--r--res/drawable-xxxhdpi/ic_star_outline_24dp.pngbin0 -> 1508 bytes
-rw-r--r--res/layout-land/quickcontact_activity.xml18
-rw-r--r--res/layout-sw600dp-land/quickcontact_activity.xml37
-rw-r--r--res/layout-sw600dp/quickcontact_activity.xml37
-rw-r--r--res/layout-sw720dp-land/quickcontact_activity.xml37
-rw-r--r--res/layout/quickcontact_activity.xml18
-rw-r--r--res/layout/quickcontact_photo_container.xml88
-rw-r--r--res/menu/quickcontact.xml35
-rw-r--r--res/values/strings.xml4
18 files changed, 72 insertions, 202 deletions
diff --git a/res/drawable-hdpi/ic_star_24dp.png b/res/drawable-hdpi/ic_star_24dp.png
new file mode 100644
index 000000000..d053adb87
--- /dev/null
+++ b/res/drawable-hdpi/ic_star_24dp.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_star_outline_24dp.png b/res/drawable-hdpi/ic_star_outline_24dp.png
new file mode 100644
index 000000000..809f1ee59
--- /dev/null
+++ b/res/drawable-hdpi/ic_star_outline_24dp.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_star_24dp.png b/res/drawable-mdpi/ic_star_24dp.png
new file mode 100644
index 000000000..f68b42860
--- /dev/null
+++ b/res/drawable-mdpi/ic_star_24dp.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_star_outline_24dp.png b/res/drawable-mdpi/ic_star_outline_24dp.png
new file mode 100644
index 000000000..743aaaeb5
--- /dev/null
+++ b/res/drawable-mdpi/ic_star_outline_24dp.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_star_24dp.png b/res/drawable-xhdpi/ic_star_24dp.png
new file mode 100644
index 000000000..49faab89e
--- /dev/null
+++ b/res/drawable-xhdpi/ic_star_24dp.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_star_outline_24dp.png b/res/drawable-xhdpi/ic_star_outline_24dp.png
new file mode 100644
index 000000000..0ce8d31d6
--- /dev/null
+++ b/res/drawable-xhdpi/ic_star_outline_24dp.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_star_24dp.png b/res/drawable-xxhdpi/ic_star_24dp.png
new file mode 100644
index 000000000..0aa8a2660
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_star_24dp.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_star_outline_24dp.png b/res/drawable-xxhdpi/ic_star_outline_24dp.png
new file mode 100644
index 000000000..1f9a7a256
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_star_outline_24dp.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_star_24dp.png b/res/drawable-xxxhdpi/ic_star_24dp.png
new file mode 100644
index 000000000..7477c149f
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_star_24dp.png
Binary files differ
diff --git a/res/drawable-xxxhdpi/ic_star_outline_24dp.png b/res/drawable-xxxhdpi/ic_star_outline_24dp.png
new file mode 100644
index 000000000..3ae24c724
--- /dev/null
+++ b/res/drawable-xxxhdpi/ic_star_outline_24dp.png
Binary files differ
diff --git a/res/layout-land/quickcontact_activity.xml b/res/layout-land/quickcontact_activity.xml
index 497e3dd15..552f568ea 100644
--- a/res/layout-land/quickcontact_activity.xml
+++ b/res/layout-land/quickcontact_activity.xml
@@ -27,7 +27,23 @@
android:layout_height="match_parent"
ex:ratio="1.0"
ex:direction="heightToWidth">
- <include layout="@layout/quickcontact_photo_container" />
+ <FrameLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <ImageView
+ android:id="@+id/photo"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerCrop"
+ android:contentDescription="@string/description_contact_photo" />
+ <!-- Need to set a non null background on Toolbar in order for MenuItem
+ ripples to be drawn on this view, instead of another-->
+ <Toolbar
+ android:layout_width="match_parent"
+ android:layout_height="?android:attr/actionBarSize"
+ android:background="#00000000"
+ android:id="@+id/toolbar"/>
+ </FrameLayout>
</view>
<com.android.contacts.quickcontact.ExpandingEntryCardView
style="@style/ExpandingEntryCardStyle"
diff --git a/res/layout-sw600dp-land/quickcontact_activity.xml b/res/layout-sw600dp-land/quickcontact_activity.xml
deleted file mode 100644
index 239c50c5e..000000000
--- a/res/layout-sw600dp-land/quickcontact_activity.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?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:id="@android:id/content"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:padding="32dip"
- android:orientation="horizontal">
- <FrameLayout
- android:layout_width="360dip"
- android:layout_height="360dip">
- <include layout="@layout/quickcontact_photo_container" />
- </FrameLayout>
- <com.android.contacts.quickcontact.ExpandingEntryCardView
- style="@style/ExpandingEntryCardStyle"
- android:id="@+id/communication_card"
- android:layout_marginTop="@dimen/communication_card_marginTop"
- android:visibility="gone" />
- <com.android.contacts.quickcontact.ExpandingEntryCardView
- style="@style/ExpandingEntryCardStyle"
- android:id="@+id/recent_card"
- android:visibility="gone" />
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout-sw600dp/quickcontact_activity.xml b/res/layout-sw600dp/quickcontact_activity.xml
deleted file mode 100644
index 6c275b106..000000000
--- a/res/layout-sw600dp/quickcontact_activity.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?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.
--->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@android:id/content"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:padding="32dip"
- android:orientation="vertical" >
- <FrameLayout
- android:layout_width="360dip"
- android:layout_height="@dimen/quick_contact_photo_container_height">
- <include layout="@layout/quickcontact_photo_container" />
- </FrameLayout>
- <com.android.contacts.quickcontact.ExpandingEntryCardView
- style="@style/ExpandingEntryCardStyle"
- android:id="@+id/communication_card"
- android:layout_marginTop="@dimen/communication_card_marginTop"
- android:visibility="gone" />
- <com.android.contacts.quickcontact.ExpandingEntryCardView
- style="@style/ExpandingEntryCardStyle"
- android:id="@+id/recent_card"
- android:visibility="gone" />
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout-sw720dp-land/quickcontact_activity.xml b/res/layout-sw720dp-land/quickcontact_activity.xml
deleted file mode 100644
index 239c50c5e..000000000
--- a/res/layout-sw720dp-land/quickcontact_activity.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?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:id="@android:id/content"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:padding="32dip"
- android:orientation="horizontal">
- <FrameLayout
- android:layout_width="360dip"
- android:layout_height="360dip">
- <include layout="@layout/quickcontact_photo_container" />
- </FrameLayout>
- <com.android.contacts.quickcontact.ExpandingEntryCardView
- style="@style/ExpandingEntryCardStyle"
- android:id="@+id/communication_card"
- android:layout_marginTop="@dimen/communication_card_marginTop"
- android:visibility="gone" />
- <com.android.contacts.quickcontact.ExpandingEntryCardView
- style="@style/ExpandingEntryCardStyle"
- android:id="@+id/recent_card"
- android:visibility="gone" />
-</LinearLayout> \ No newline at end of file
diff --git a/res/layout/quickcontact_activity.xml b/res/layout/quickcontact_activity.xml
index 9af107970..a7c12dd46 100644
--- a/res/layout/quickcontact_activity.xml
+++ b/res/layout/quickcontact_activity.xml
@@ -24,14 +24,28 @@
android:focusableInTouchMode="true"
android:descendantFocusability="afterDescendants" >
- <!-- Will contain ToolBar and image behind ToolBar -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="@dimen/quickcontact_maximum_header_height"
android:layout_marginTop="@dimen/quickcontact_starting_empty_height"
android:background="@color/card_margin_color"
android:id="@+id/toolbar_parent">
- <include layout="@layout/quickcontact_photo_container" />
+
+ <ImageView
+ android:id="@+id/photo"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:scaleType="centerCrop"
+ android:contentDescription="@string/description_contact_photo" />
+
+ <!-- Need to set a non null background on Toolbar in order for MenuItem
+ ripples to be drawn on this view, instead of another-->
+ <Toolbar
+ android:layout_width="match_parent"
+ android:layout_height="?android:attr/actionBarSize"
+ android:background="#00000000"
+ android:id="@+id/toolbar"/>
+
</FrameLayout>
<com.android.contacts.widget.TouchlessScrollView
diff --git a/res/layout/quickcontact_photo_container.xml b/res/layout/quickcontact_photo_container.xml
deleted file mode 100644
index 5685427c9..000000000
--- a/res/layout/quickcontact_photo_container.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?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.
--->
-<merge
- xmlns:android="http://schemas.android.com/apk/res/android">
- <RelativeLayout
- android:id="@+id/photo_container"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:gravity="center_vertical">
- <ImageView
- android:id="@+id/photo"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:scaleType="centerCrop"
- android:clickable="true"
- android:contentDescription="@string/description_contact_photo" />
- <View
- android:layout_width="match_parent"
- android:layout_height="1dip"
- android:layout_alignParentTop="true"
- android:background="#4CFFFFFF" />
- <View
- android:id="@+id/photo_text_bar"
- android:layout_width="0dip"
- android:layout_height="42dip"
- android:layout_alignBottom="@id/photo"
- android:layout_alignLeft="@id/photo"
- android:layout_alignRight="@id/photo"
- android:layout_alignStart="@id/photo"
- android:layout_alignEnd="@id/photo"
- android:background="@color/quickcontact_name_detail_background" />
- <ImageView
- android:id="@+id/contact_edit_image"
- android:src="@drawable/ic_create_24dp"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_marginRight="16dip"
- android:layout_marginEnd="16dip"
- android:layout_marginBottom="5dip"
- android:layout_alignBottom="@id/photo_text_bar"
- android:layout_alignRight="@id/photo_text_bar"
- android:layout_alignEnd="@id/photo_text_bar"
- android:clickable="true"
- android:contentDescription="@string/editContactDescription" />
- <ImageView
- android:id="@+id/quickcontact_star_button"
- android:src="@drawable/ic_favorite_off_lt"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_marginBottom="5dip"
- android:layout_marginRight="16dip"
- android:layout_marginEnd="16dip"
- android:layout_alignBottom="@id/photo_text_bar"
- android:layout_toLeftOf="@id/contact_edit_image"
- android:layout_toStartOf="@id/contact_edit_image"
- android:clickable="true"
- android:contentDescription="@string/menu_addStar" />
- <TextView
- android:id="@+id/name"
- android:layout_width="match_parent"
- android:layout_height="42dip"
- android:layout_alignBottom="@id/photo"
- android:layout_alignLeft="@id/photo"
- android:layout_alignStart="@id/photo"
- android:layout_toLeftOf="@id/quickcontact_star_button"
- android:layout_toStartOf="@id/quickcontact_star_button"
- android:gravity="center_vertical"
- android:paddingLeft="8dip"
- android:paddingStart="8dip"
- android:singleLine="true"
- android:ellipsize="end"
- android:textColor="@android:color/white"
- android:textAppearance="?android:attr/textAppearanceMedium" />
- </RelativeLayout>
-</merge>
diff --git a/res/menu/quickcontact.xml b/res/menu/quickcontact.xml
new file mode 100644
index 000000000..34a6a10b9
--- /dev/null
+++ b/res/menu/quickcontact.xml
@@ -0,0 +1,35 @@
+<?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.
+-->
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:id="@+id/menu_star"
+ android:showAsAction="always" />
+
+ <item
+ android:id="@+id/menu_edit"
+ android:icon="@drawable/ic_create_24dp"
+ android:showAsAction="always" />
+
+ <item
+ android:id="@+id/menu_share"
+ android:title="@string/menu_share"
+ android:alphabeticShortcut="s" />
+
+ <item
+ android:id="@+id/menu_create_contact_shortcut"
+ android:title="@string/menu_create_contact_shortcut" />
+</menu>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 6be304ba1..c1bd3c0c1 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -658,6 +658,10 @@
<string name="timestamp_string_yesterday">Yesterday</string>
<!-- Timestamp string for interactions from tomorrow. [CHAR LIMIT=40] -->
<string name="timestamp_string_tomorrow">Tomorrow</string>
+
<!-- Title of sms action entry. [CHAR LIMIT=60] -->
<string name="send_message">Send message</string>
+
+ <!-- Toast that appears when you are copying a directory contact into your personal contacts -->
+ <string name="toast_making_personal_copy">Creating a personal copy...</string>
</resources>