Merge "Removing menu items when no contact loaded"
diff --git a/res/drawable-hdpi/edit_button_field_background.9.png b/res/drawable-hdpi/edit_button_field_background.9.png
deleted file mode 100644
index 1292ebf..0000000
--- a/res/drawable-hdpi/edit_button_field_background.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/edit_button_field_background.9.png b/res/drawable-mdpi/edit_button_field_background.9.png
deleted file mode 100644
index 36003cf..0000000
--- a/res/drawable-mdpi/edit_button_field_background.9.png
+++ /dev/null
Binary files differ
diff --git a/res/layout-xlarge/item_group_membership.xml b/res/layout-xlarge/item_group_membership.xml
index c61cc93..b20db2f 100644
--- a/res/layout-xlarge/item_group_membership.xml
+++ b/res/layout-xlarge/item_group_membership.xml
@@ -33,12 +33,12 @@
android:ellipsize="marquee" />
<TextView
+ style="?android:attr/dropDownSpinnerStyle"
android:id="@+id/group_list"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceMedium"
- android:background="@drawable/edit_button_field_background"
android:gravity="left"
android:ellipsize="end"
/>
diff --git a/src/com/android/contacts/views/editor/EventFieldEditorView.java b/src/com/android/contacts/views/editor/EventFieldEditorView.java
index a8c01b6..a64fd51 100644
--- a/src/com/android/contacts/views/editor/EventFieldEditorView.java
+++ b/src/com/android/contacts/views/editor/EventFieldEditorView.java
@@ -70,14 +70,13 @@
int l1 = getPaddingLeft();
int t1 = getPaddingTop();
int r1 = getMeasuredWidth() - getPaddingRight();
- int b1 = getMeasuredHeight() - getPaddingBottom();
// Fields
// Subtract buttons left and right if necessary
final int labelWidth = (getLabel() != null) ? getLabel().getMeasuredWidth() : 0;
final int deleteWidth = (getDelete() != null) ? getDelete().getMeasuredWidth() : 0;
final int r2 = r1 - deleteWidth - labelWidth;
- if (mDateView != null) mDateView.layout(l1, t1, r2, b1);
+ if (mDateView != null) mDateView.layout(l1, t1, r2, t1 + mDateView.getMeasuredHeight());
}
@Override
@@ -104,9 +103,8 @@
super.setValues(kind, entry, state, readOnly, vig);
if (mDateView == null) {
- mDateView = new TextView(getContext(), null, android.R.attr.textAppearanceMedium);
+ mDateView = new TextView(getContext(), null, android.R.attr.dropDownSpinnerStyle);
mDateView.setFocusable(true);
- mDateView.setBackgroundResource(R.drawable.edit_button_field_background);
mDateView.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,
LayoutParams.WRAP_CONTENT));
mDateView.setEnabled(!readOnly);
diff --git a/src/com/android/contacts/views/editor/GroupMembershipView.java b/src/com/android/contacts/views/editor/GroupMembershipView.java
index 206f7b5..60c6962 100644
--- a/src/com/android/contacts/views/editor/GroupMembershipView.java
+++ b/src/com/android/contacts/views/editor/GroupMembershipView.java
@@ -165,7 +165,7 @@
if (mGroupList == null) {
mGroupList = (TextView) findViewById(R.id.group_list);
- setOnClickListener(this);
+ mGroupList.setOnClickListener(this);
}
mGroupList.setText(sb);