android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@*android:drawable/title_bar_medium"
- android:padding="5dip"
+ android:paddingLeft="5dip"
+ android:paddingRight="5dip"
android:gravity="center_vertical"
>
<ImageView
android:layout_width="48dip"
android:layout_height="48dip"
- android:src="@drawable/ic_menu_merge"
+ android:src="@drawable/ic_join"
android:gravity="center"
android:scaleType="fitCenter"
/>
android:textAppearance="?android:attr/textAppearanceMedium"
/>
<TextView
+ android:id="@+id/join_contact_blurb"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:text="@string/blurbJoinContactDataWith"
+ android:layout_marginTop="-2dip"
+ android:maxLines="2"
android:textAppearance="?android:attr/textAppearanceSmall"
/>
</LinearLayout>
<string name="titleJoinContactDataWith">Join contacts</string>
<!-- Info blurb on the Join Contact screen -->
- <string name="blurbJoinContactDataWith">Contact data will be combined with
- another contact selected from the list.</string>
+ <string name="blurbJoinContactDataWith">Select the contact you want to join with <xliff:g id="name">%s</xliff:g>.</string>
<!-- List separator for the Join Contact list: Suggestions -->
<string name="separatorJoinAggregateSuggestions">Suggestions</string>
*/
public static final String EXTRA_AGGREGATE_ID =
"com.android.contacts.action.AGGREGATE_ID";
+ /**
+ * Used with {@link #JOIN_AGGREGATE} to give it the name of the aggregation target.
+ * <p>
+ * Type: STRING
+ */
+ public static final String EXTRA_AGGREGATE_NAME =
+ "com.android.contacts.action.AGGREGATE_NAME";
+
public static final String AUTHORITIES_FILTER_KEY = "authorities";
if (mMode == MODE_JOIN_CONTACT) {
setContentView(R.layout.contacts_list_content_join);
+ TextView blurbView = (TextView)findViewById(R.id.join_contact_blurb);
+ String contactName = intent.getStringExtra(EXTRA_AGGREGATE_NAME);
+ if (contactName == null) {
+ contactName = "";
+ }
+
+ String blurb = getString(R.string.blurbJoinContactDataWith, contactName);
+ blurbView.setText(blurb);
+
} else {
setContentView(R.layout.contacts_list_content);
}
* Shows a list of aggregates that can be joined into the currently viewed aggregate.
*/
public void showJoinAggregateActivity() {
+ String displayName = null;
+ if (mCursor.moveToFirst()) {
+ displayName = mCursor.getString(0);
+ }
Intent intent = new Intent(ContactsListActivity.JOIN_AGGREGATE);
intent.putExtra(ContactsListActivity.EXTRA_AGGREGATE_ID, ContentUris.parseId(mUri));
+ if (displayName != null) {
+ intent.putExtra(ContactsListActivity.EXTRA_AGGREGATE_NAME, displayName);
+ }
startActivityForResult(intent, REQUEST_JOIN_CONTACT);
}