Merge "Can add mulitple email and phones on compact editor again" into mnc-dev
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index f614d9c..06a96cd 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -213,7 +213,7 @@
<string name="toast_text_copied" msgid="5143776250008541719">"Kopieret tekst"</string>
<string name="cancel_confirmation_dialog_message" msgid="5885724679874403115">"Skal ændringerne slettes?"</string>
<string name="call_type_and_date" msgid="747163730039311423">"<xliff:g id="CALL_TYPE">%1$s</xliff:g> <xliff:g id="CALL_SHORT_DATE">%2$s</xliff:g>"</string>
- <string name="profile_display_name" msgid="4127389543625918771">"Opret min profil"</string>
+ <string name="profile_display_name" msgid="4127389543625918771">"Konfigurer min profil"</string>
<string name="enter_contact_name" msgid="1738391320566349924">"Indtast personens navn"</string>
<string name="group_name_hint" msgid="238359485263401293">"Gruppens navn"</string>
<string name="local_profile_title" msgid="2021416826991393684">"Min lokale profil"</string>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index f736090..c794b0c 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -141,7 +141,7 @@
<string name="add_connection_button" msgid="4861308615789601727">"Aggiungi connessione"</string>
<string name="recent" msgid="2659189233141493004">"Recenti"</string>
<string name="recent_updates" msgid="4267258535615860710">"Aggiornamenti recenti"</string>
- <string name="account_type_format" msgid="718948015590343010">"Contatto da <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+ <string name="account_type_format" msgid="718948015590343010">"Contatto <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
<!-- no translation found for from_account_format (4469138575127580203) -->
<skip />
<string name="contact_read_only" msgid="7421346527289472273">"Non modificabile da questa applicazione."</string>
@@ -269,6 +269,6 @@
<string name="content_description_recent_call" msgid="5183800406316723676">"chiamata recente. <xliff:g id="CALL_TYPE">%s</xliff:g>. <xliff:g id="PHONE_NUMBER">%s</xliff:g>. <xliff:g id="DATE">%s</xliff:g>. fai clic per richiamare"</string>
<string name="message_from_you_prefix" msgid="7180706529908434482">"Tu: <xliff:g id="SMS_BODY">%s</xliff:g>"</string>
<string name="contact_editor_hangouts_im_alert" msgid="114855385615225735">"Hangouts funziona meglio se inserisci l\'identificatore Hangouts della persona nel campo dell\'indirizzo email o del numero di telefono."</string>
- <string name="compact_editor_more_fields" msgid="2874181192382284115">"Atri campi"</string>
+ <string name="compact_editor_more_fields" msgid="2874181192382284115">"Altri campi"</string>
<string name="compact_editor_change_photo_content_description" msgid="5495487714301211540">"Cambia foto"</string>
</resources>
diff --git a/res/values-kk-rKZ/strings.xml b/res/values-kk-rKZ/strings.xml
index 89d6059..c5d8e48 100644
--- a/res/values-kk-rKZ/strings.xml
+++ b/res/values-kk-rKZ/strings.xml
@@ -88,7 +88,7 @@
<string name="photoPickerNotFoundText" product="tablet" msgid="6247290728908599701">"Планшетте ешқандай фотосуреттер жоқ."</string>
<string name="photoPickerNotFoundText" product="default" msgid="431331662154342581">"Телефонда ешқандай фотосуреттер жоқ."</string>
<string name="attach_photo_dialog_title" msgid="5599827035558557169">"Контакт фотосуреті"</string>
- <string name="customLabelPickerTitle" msgid="1081475101983255212">"Белгі атауын қалауыңызша өзгерту"</string>
+ <string name="customLabelPickerTitle" msgid="1081475101983255212">"Реттелмелі белгі атауы"</string>
<string name="send_to_voicemail_checkbox" msgid="9001686764070676353">"Қоңырауларды тікелей дауыс хабарына жіберу"</string>
<string name="removePhoto" msgid="4898105274130284565">"Фотосуретті алу"</string>
<string name="noContacts" msgid="8579310973261953559">"Ешқандай контактілер жоқ."</string>
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index e9b3715..458e325 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -269,10 +269,6 @@
if (activity.isFinishing()) {
return;
}
- if (request == EditorListener.EDITOR_FOCUS_CHANGED) {
- adjustNameFieldsHintDarkness(rawContactEditor);
- return;
- }
if (!isEditingUserProfile()) {
if (request == EditorListener.FIELD_CHANGED) {
if (!nameValuesDelta.isSuperPrimary()) {
@@ -294,23 +290,6 @@
public void onDeleteRequested(Editor removedEditor) {
}
};
- final EditorListener otherNamesListener = new EditorListener() {
-
- @Override
- public void onRequest(int request) {
- // Make sure the activity is running
- if (activity.isFinishing()) {
- return;
- }
- if (request == EditorListener.EDITOR_FOCUS_CHANGED) {
- adjustNameFieldsHintDarkness(rawContactEditor);
- }
- }
-
- @Override
- public void onDeleteRequested(Editor removedEditor) {
- }
- };
final StructuredNameEditorView nameEditor = rawContactEditor.getNameEditor();
if (mRequestFocus) {
@@ -322,22 +301,13 @@
nameEditor.setDisplayName(mDefaultDisplayName);
}
- final TextFieldsEditorView phoneticNameEditor =
- rawContactEditor.getPhoneticNameEditor();
- phoneticNameEditor.setEditorListener(otherNamesListener);
rawContactEditor.setAutoAddToDefaultGroup(mAutoAddToDefaultGroup);
- final TextFieldsEditorView nickNameEditor =
- rawContactEditor.getNickNameEditor();
- nickNameEditor.setEditorListener(otherNamesListener);
-
if (isAggregationSuggestionRawContactId(rawContactId)) {
acquireAggregationSuggestions(activity,
rawContactEditor.getNameEditor().getRawContactId(),
rawContactEditor.getNameEditor().getValues());
}
-
- adjustNameFieldsHintDarkness(rawContactEditor);
}
}
@@ -427,23 +397,6 @@
}
/**
- * Adjust how dark the hint text should be on all the names' text fields.
- *
- * @param rawContactEditor editor to update
- */
- private void adjustNameFieldsHintDarkness(RawContactEditorView rawContactEditor) {
- // Check whether fields contain focus by calling findFocus() instead of hasFocus().
- // The hasFocus() value is not necessarily up to date.
- final boolean nameFieldsAreNotFocused
- = rawContactEditor.getNameEditor().findFocus() == null
- && rawContactEditor.getPhoneticNameEditor().findFocus() == null
- && rawContactEditor.getNickNameEditor().findFocus() == null;
- rawContactEditor.getNameEditor().setHintColorDark(!nameFieldsAreNotFocused);
- rawContactEditor.getPhoneticNameEditor().setHintColorDark(!nameFieldsAreNotFocused);
- rawContactEditor.getNickNameEditor().setHintColorDark(!nameFieldsAreNotFocused);
- }
-
- /**
* Update the values in {@link #mExpandedEditors}.
*/
private void updatedExpandedEditorsMap() {
diff --git a/src/com/android/contacts/editor/LabeledEditorView.java b/src/com/android/contacts/editor/LabeledEditorView.java
index cf94d8f..e2724a1 100644
--- a/src/com/android/contacts/editor/LabeledEditorView.java
+++ b/src/com/android/contacts/editor/LabeledEditorView.java
@@ -577,14 +577,12 @@
private boolean mHasCustomSelection;
private int mTextColorHintUnfocused;
private int mTextColorDark;
- private int mTextColorSecondary;
public EditTypeAdapter(Context context) {
super(context, 0);
mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mTextColorHintUnfocused = context.getResources().getColor(
R.color.editor_disabled_text_color);
- mTextColorSecondary = context.getResources().getColor(R.color.secondary_text_color);
mTextColorDark = context.getResources().getColor(R.color.primary_text_color);
@@ -617,8 +615,6 @@
// color.
if (!LabeledEditorView.this.isEmpty()) {
view.setTextColor(mTextColorDark);
- } else if (LabeledEditorView.this.hasFocus()) {
- view.setTextColor(mTextColorSecondary);
} else {
view.setTextColor(mTextColorHintUnfocused);
}
diff --git a/src/com/android/contacts/editor/TextFieldsEditorView.java b/src/com/android/contacts/editor/TextFieldsEditorView.java
index 9345434..fe476ed 100644
--- a/src/com/android/contacts/editor/TextFieldsEditorView.java
+++ b/src/com/android/contacts/editor/TextFieldsEditorView.java
@@ -59,7 +59,6 @@
private boolean mHasShortAndLongForms;
private int mMinFieldHeight;
private int mPreviousViewHeight;
- private int mHintTextColor;
private int mHintTextColorUnfocused;
public TextFieldsEditorView(Context context) {
@@ -85,7 +84,6 @@
mMinFieldHeight = getContext().getResources().getDimensionPixelSize(
R.dimen.editor_min_line_item_height);
mFields = (ViewGroup) findViewById(R.id.editors);
- mHintTextColor = getResources().getColor(R.color.secondary_text_color);
mHintTextColorUnfocused = getResources().getColor(R.color.editor_disabled_text_color);
mExpansionView = (ImageView) findViewById(R.id.expansion_view);
mExpansionViewContainer = findViewById(R.id.expansion_view_container);
@@ -151,13 +149,12 @@
private OnFocusChangeListener mTextFocusChangeListener = new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
- // Check whether this field contains focus by calling findFocus() instead of
- // hasFocus(). The hasFocus() value is not necessarily up to date.
- final boolean foundFocus = TextFieldsEditorView.this.findFocus() != null;
- setHintColorDark(foundFocus);
if (getEditorListener() != null) {
getEditorListener().onRequest(EditorListener.EDITOR_FOCUS_CHANGED);
}
+ // Check whether this field contains focus by calling findFocus() instead of
+ // hasFocus(). The hasFocus() value is not necessarily up to date.
+ final boolean foundFocus = TextFieldsEditorView.this.findFocus() != null;
if (foundFocus && !isTypeVisible()) {
// We just got focus and the types are not visible
showType();
@@ -171,22 +168,6 @@
};
/**
- * Set the hint color. If {@param isHintDark} is TRUE, then the hint color is set to a
- * a darker color.
- */
- public void setHintColorDark(boolean isHintDark) {
- if (mFieldEditTexts != null) {
- for (EditText text : mFieldEditTexts) {
- if (isHintDark) {
- text.setHintTextColor(mHintTextColor);
- } else {
- text.setHintTextColor(mHintTextColorUnfocused);
- }
- }
- }
- }
-
- /**
* Creates or removes the type/label button. Doesn't do anything if already correctly configured
*/
private void setupExpansionView(boolean shouldExist, boolean collapsed) {