Postal address in one field
Change-Id: I590371b87aaa62d8918e7d10a7aeaa812f91c704
diff --git a/res/values/strings.xml b/res/values/strings.xml
index ecfe5c8..2458d80 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1088,6 +1088,8 @@
<!-- Generic action string for starting an IM chat -->
<string name="chat">Chat</string>
+ <!-- Field title for the full postal address of a contact [CHAR LIMIT=64]-->
+ <string name="postal_address">Address</string>
<!-- Field title for the street of a structured postal address of a contact -->
<string name="postal_street">Street</string>
<!-- Field title for the PO box of a structured postal address of a contact -->
diff --git a/src/com/android/contacts/model/FallbackSource.java b/src/com/android/contacts/model/FallbackSource.java
index a685e6d..b99a5f7 100644
--- a/src/com/android/contacts/model/FallbackSource.java
+++ b/src/com/android/contacts/model/FallbackSource.java
@@ -17,6 +17,7 @@
package com.android.contacts.model;
import com.android.contacts.R;
+import com.android.contacts.ui.widget.StructuredPostalEditorView;
import com.google.android.collect.Lists;
import android.content.ContentValues;
@@ -263,8 +264,6 @@
}
if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
- final boolean useJapaneseOrder =
- Locale.JAPANESE.getLanguage().equals(Locale.getDefault().getLanguage());
kind.typeColumn = StructuredPostal.TYPE;
kind.typeList = Lists.newArrayList();
kind.typeList.add(buildPostalType(StructuredPostal.TYPE_HOME));
@@ -274,38 +273,9 @@
.setCustomColumn(StructuredPostal.LABEL));
kind.fieldList = Lists.newArrayList();
-
- if (useJapaneseOrder) {
- kind.fieldList.add(new EditField(StructuredPostal.COUNTRY,
- R.string.postal_country, FLAGS_POSTAL).setOptional(true));
- kind.fieldList.add(new EditField(StructuredPostal.POSTCODE,
- R.string.postal_postcode, FLAGS_POSTAL));
- kind.fieldList.add(new EditField(StructuredPostal.REGION,
- R.string.postal_region, FLAGS_POSTAL));
- kind.fieldList.add(new EditField(StructuredPostal.CITY,
- R.string.postal_city, FLAGS_POSTAL));
- kind.fieldList.add(new EditField(StructuredPostal.NEIGHBORHOOD,
- R.string.postal_neighborhood, FLAGS_POSTAL).setOptional(true));
- kind.fieldList.add(new EditField(StructuredPostal.STREET,
- R.string.postal_street, FLAGS_POSTAL));
- kind.fieldList.add(new EditField(StructuredPostal.POBOX,
- R.string.postal_pobox, FLAGS_POSTAL).setOptional(true));
- } else {
- kind.fieldList.add(new EditField(StructuredPostal.STREET,
- R.string.postal_street, FLAGS_POSTAL));
- kind.fieldList.add(new EditField(StructuredPostal.POBOX,
- R.string.postal_pobox, FLAGS_POSTAL).setOptional(true));
- kind.fieldList.add(new EditField(StructuredPostal.NEIGHBORHOOD,
- R.string.postal_neighborhood, FLAGS_POSTAL).setOptional(true));
- kind.fieldList.add(new EditField(StructuredPostal.CITY,
- R.string.postal_city, FLAGS_POSTAL));
- kind.fieldList.add(new EditField(StructuredPostal.REGION,
- R.string.postal_region, FLAGS_POSTAL));
- kind.fieldList.add(new EditField(StructuredPostal.POSTCODE,
- R.string.postal_postcode, FLAGS_POSTAL));
- kind.fieldList.add(new EditField(StructuredPostal.COUNTRY,
- R.string.postal_country, FLAGS_POSTAL).setOptional(true));
- }
+ kind.fieldList.add(
+ new EditField(StructuredPostal.FORMATTED_ADDRESS, R.string.postal_address,
+ FLAGS_POSTAL).setMinLines(3));
}
return kind;