summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-09-24 17:42:27 -0700
committerYorke Lee <yorkelee@google.com>2013-09-24 17:42:27 -0700
commit2a066fed83f99c26a0e64a7c25fd72385bbc6568 (patch)
treed43544a3aed776e7ee2adb1dcff2bfe3370afcf2 /src
parent809fe8f0520e9dd609dca53b358a6bf647d53f2d (diff)
Fix some padding issues related to the top 3 favorites
Also fixed a bug that would cause Index OOB exceptions if we were to use anything other than 1 row of tiled favorites. Bug: 10888792 Change-Id: I671032f48fa054847692d28a7c58836bf67c9b29
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/list/PhoneFavoritesTileAdapter.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java
index 64387fa01..882d3c633 100644
--- a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java
+++ b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java
@@ -452,7 +452,7 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements
// Contacts that appear as rows
// The actual position of the contact in the cursor is simply total the number of
// tiled contacts + the given position
- return maxContactsInTiles + position - 1;
+ return maxContactsInTiles + position - mMaxTiledRows;
}
}
@@ -855,7 +855,8 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter implements
// Note MeasuredWidth includes the padding.
final int childWidth = child.getMeasuredWidth();
- child.layout(childLeft, 0, childLeft + childWidth, child.getMeasuredHeight());
+ child.layout(childLeft, getPaddingTop(), childLeft + childWidth,
+ getPaddingTop() + child.getMeasuredHeight());
childLeft += childWidth;
}
}