Make small tweaks to view contact card.
-Fix bug in dialing a number from the view card.
-Update the primary number asset and positioning.
-Make the sms button unfocusable.
diff --git a/res/drawable-finger/ic_default_number.png b/res/drawable-finger/ic_default_number.png
index a27685e..30ead23 100644
--- a/res/drawable-finger/ic_default_number.png
+++ b/res/drawable-finger/ic_default_number.png
Binary files differ
diff --git a/res/layout-finger/list_item_text_icons.xml b/res/layout-finger/list_item_text_icons.xml
index 8dce727..c551740 100644
--- a/res/layout-finger/list_item_text_icons.xml
+++ b/res/layout-finger/list_item_text_icons.xml
@@ -35,11 +35,12 @@
android:scaleType="centerInside"
/>
- <RelativeLayout
+ <LinearLayout
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="5dip"
+ android:orientation="vertical"
android:paddingTop="5dip"
android:paddingBottom="7dip"
android:gravity="center_vertical"
@@ -51,22 +52,29 @@
android:textAppearance="?android:attr/textAppearanceLarge"
/>
- <TextView android:id="@android:id/text2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@android:id/text1"
- android:textAppearance="?android:attr/textAppearanceSmall"
- />
-
- <ImageView android:id="@+id/primary_icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_toRightOf="@android:id/text2"
- android:layout_alignTop="@android:id/text2"
- android:src="@drawable/ic_default_number"
- />
-
- </RelativeLayout>
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ >
+
+ <TextView android:id="@android:id/text2"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ />
+
+ <ImageView android:id="@+id/primary_icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:paddingLeft="3dip"
+ android:src="@drawable/ic_default_number"
+ />
+ </LinearLayout>
+
+ </LinearLayout>
<ImageView android:id="@+id/presence_icon"
android:layout_width="32dip"
@@ -89,7 +97,7 @@
android:layout_marginLeft="5dip"
android:layout_marginRight="7dip"
android:gravity="center"
- android:scaleType="fitCenter"
+ android:scaleType="centerInside"
android:background="@drawable/list_item_secondary_button"
/>
diff --git a/src/com/android/contacts/ViewContactActivity.java b/src/com/android/contacts/ViewContactActivity.java
index 168eee3..80fb7fc 100644
--- a/src/com/android/contacts/ViewContactActivity.java
+++ b/src/com/android/contacts/ViewContactActivity.java
@@ -728,7 +728,8 @@
this, mimetype, type, label);
entry.label = buildActionString(R.string.actionCall, displayLabel, true);
entry.data = PhoneNumberUtils.stripSeparators(data);
- entry.intent = new Intent(Intent.ACTION_CALL_PRIVILEGED, entry.uri);
+ entry.intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
+ Uri.fromParts("tel", data, null));
entry.secondaryIntent = new Intent(Intent.ACTION_SENDTO,
Uri.fromParts("sms", data, null));
entry.isPrimary = isSuperPrimary;
@@ -739,18 +740,6 @@
|| mShowSmsLinksForAllPhones) {
// Add an SMS entry
entry.secondaryActionIcon = R.drawable.sym_action_sms;
-
-// ViewEntry smsEntry = new ViewEntry();
-// smsEntry.label = buildActionString(
-// R.string.actionText, displayLabel, true);
-// smsEntry.data = PhoneNumberUtils.stripSeparators(data);
-// smsEntry.id = id;
-// smsEntry.uri = uri;
-// smsEntry.intent = entry.secondaryIntent;
-// smsEntry.mimetype = FastTrackWindow.MIME_SMS_ADDRESS;
-// smsEntry.type = type;
-// smsEntry.actionIcon = R.drawable.sym_action_sms;
-// mSmsEntries.add(smsEntry);
}
// Build email entries
} else if (mimetype.equals(CommonDataKinds.Email.CONTENT_ITEM_TYPE)) {