summaryrefslogtreecommitdiffstats
path: root/res/values
diff options
context:
space:
mode:
authorBrian Attwell <brianattwell@google.com>2014-11-07 16:36:30 -0800
committerBrian Attwell <brianattwell@google.com>2014-11-10 17:50:40 -0800
commit7e67082d3f7c4ab56945040c0e4617b71c7e5f0b (patch)
tree26ea97c16e24c3a3f09854f1226ad900ee9deebe /res/values
parentfc2ad4fa3ea7a947b693b635ae3aa51e64568095 (diff)
downloadpackages_apps_Contacts-7e67082d3f7c4ab56945040c0e4617b71c7e5f0b.tar.gz
packages_apps_Contacts-7e67082d3f7c4ab56945040c0e4617b71c7e5f0b.tar.bz2
packages_apps_Contacts-7e67082d3f7c4ab56945040c0e4617b71c7e5f0b.zip
New design for photo editor
The photo editor field now looks like the mocks. It includes a RadioButton that allows users to choose which photo is primary. This RadioButton only appears if more than one raw contact has a photo inside the contact. Additional changes: -fixed non-regression that made it impossible to set some photos as primary -fixed non-regression that made it possible for multiple photos to appear as primary -I fudged with a bunch of padding values in order to compensate for View insets and paddings. This can't always be done perfectly, since some insets/paddings vary based on screen-configuration. I needed to start taking fudging with these paddings in order to make the photo editor look consistent with the other editor fields. This CL doesn't bother ensuring the readonly photo edit field looks good. This will be done in a later CL. Bug: 18004959 Change-Id: I683f3ffa8e7f8683c2c083a2b4592b2b95c58c63
Diffstat (limited to 'res/values')
-rw-r--r--res/values/dimens.xml12
-rw-r--r--res/values/strings.xml12
-rw-r--r--res/values/styles.xml5
3 files changed, 22 insertions, 7 deletions
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 53855ba05..df01b1a0a 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -58,10 +58,16 @@
<dimen name="editor_kind_icon_size">24dp</dimen>
<!-- Total width of data-kind icon, including its start and end padding -->
- <dimen name="editor_kind_icon_total_width">72dp</dimen>
+ <dimen name="editor_kind_icon_total_width">68dp</dimen>
- <!-- Padding below every editor view, such as LabeledEditorView -->
- <dimen name="editor_padding_between_editor_views">24dp</dimen>
+ <!-- Padding below every editor view, such as LabeledEditorView. This value is chosen
+ to give 32dp of apparent padding between EditText's in the Raw Contact Editor. -->
+ <dimen name="editor_padding_between_editor_views">20dp</dimen>
+
+ <!-- Padding below the photo editor. This value is larger than
+ editor_padding_between_editor_views, since ImageView's don't have space between the bottom
+ of their visual bottom, like an EditText does. -->
+ <dimen name="editor_padding_below_photo">22dp</dimen>
<!-- Width of the Type-Label in the Editor -->
<dimen name="editor_type_label_width">150dip</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index bd0391746..0ce47866b 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -373,9 +373,6 @@
<!-- String describing which account a contact came from when editing it -->
<string name="from_account_format"><xliff:g id="source" example="user@gmail.com">%1$s</xliff:g></string>
- <!-- Checkbox asking the user if they want to display a particular photo for a contact -->
- <string name="use_photo_as_primary">Use this photo</string>
-
<!-- Text used to explain that a contact cannot be edited from the People application since the data is read only [CHAR LIMIT=40] -->
<string name="contact_read_only">Not editable from this app.</string>
@@ -438,6 +435,15 @@
<!-- The button to add an organization field to a contact in the Raw Contact Editor [CHAR LIMIT=15] -->
<string name="group_edit_field_hint_text">Group name</string>
+ <!-- Button used for changing a photo in the Raw Contact Editor [CHAR LIMIT=15] -->
+ <string name="change_photo">Change</string>
+
+ <!-- Content description for the camera icon beside the photo section in the Raw Contact Editor [CHAR LIMIT=NONE] -->
+ <string name="photo_section">Photo section</string>
+
+ <!-- RadioButton that determines whether a raw contact's photo should be used for the entire contact [CHAR LIMIT=15] -->
+ <string name="primary_photo">Primary photo</string>
+
<!-- String describing the Star/Favorite checkbox
Used by AccessibilityService to announce the purpose of the view.
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 1261a7a25..06f1afe76 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -29,6 +29,7 @@
<style name="EditorActivityTheme" parent="@style/PeopleTheme">
<item name="android:listViewStyle">@style/ListViewStyle</item>
<item name="android:actionBarStyle">@style/EditorActionBarStyle</item>
+ <item name="android:colorButtonNormal">@color/background_primary</item>
</style>
<style name="Theme">
@@ -317,7 +318,9 @@
<item name="android:layout_height">24dp</item>
<item name="android:tint">@color/editor_icon_color</item>
<item name="android:layout_marginStart">16dp</item>
- <item name="android:layout_marginEnd">32dp</item>
+ <!-- We want 32dp of padding between these icon's and EditText's. Since EditText's have
+ 4dp of starting padding built in, we set this as 28dp. -->
+ <item name="android:layout_marginEnd">28dp</item>
<item name="android:layout_marginTop">@dimen/editor_kind_icon_top_margin</item>
</style>
</resources>