Fixes TouchDelegate bug in QCA
bug: 16460824
Change-Id: I0357cec8ad1899137174bae23c0d494bd290190d
diff --git a/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java b/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java
index b9603e5..e4770d8 100644
--- a/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java
+++ b/src/com/android/contacts/quickcontact/ExpandingEntryCardView.java
@@ -455,7 +455,6 @@
}
}
- // TODO add accessibility content descriptions
private View createEntryView(LayoutInflater layoutInflater, Entry entry) {
final View view = layoutInflater.inflate(
R.layout.expanding_entry_card_item, this, false);
@@ -518,22 +517,20 @@
alternateIcon.setVisibility(View.VISIBLE);
alternateIcon.setContentDescription(entry.getAlternateContentDescription());
- // Expand the clickable area for alternate icon to be top to bottom and to right edge
+ // Expand the clickable area for alternate icon to be top to bottom and to end edge
// of the entry view
view.post(new Runnable() {
@Override
public void run() {
- final Rect entryRect = new Rect();
- view.getHitRect(entryRect);
-
final Rect alternateIconRect = new Rect();
alternateIcon.getHitRect(alternateIconRect);
- alternateIconRect.bottom = entryRect.bottom;
- alternateIconRect.top = entryRect.top;
+
+ alternateIconRect.bottom = view.getHeight();
+ alternateIconRect.top = 0;
if (getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) {
- alternateIconRect.left = entryRect.left;
+ alternateIconRect.left = 0;
} else {
- alternateIconRect.right = entryRect.right;
+ alternateIconRect.right = view.getWidth();
}
final TouchDelegate touchDelegate =
new TouchDelegate(alternateIconRect, alternateIcon);