summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-09-25 08:21:26 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-09-25 08:21:26 -0700
commit709224a1550dfa98f45841f978ccadcecdb0043e (patch)
treed43544a3aed776e7ee2adb1dcff2bfe3370afcf2
parenta5fbe28efbb20590f63a90ef78d0a0b16bef5cd5 (diff)
parent1275f91071cc489bb7103190c07a3295784c4a51 (diff)
am 1275f910: am 2a066fed: Fix some padding issues related to the top 3 favorites
* commit '1275f91071cc489bb7103190c07a3295784c4a51': Fix some padding issues related to the top 3 favorites
-rw-r--r--res/layout/phone_favorite_tile_view.xml1
-rw-r--r--src/com/android/dialer/list/PhoneFavoritesTileAdapter.java5
2 files changed, 4 insertions, 2 deletions
diff --git a/res/layout/phone_favorite_tile_view.xml b/res/layout/phone_favorite_tile_view.xml
index 5f8733d15..1a8b2f31b 100644
--- a/res/layout/phone_favorite_tile_view.xml
+++ b/res/layout/phone_favorite_tile_view.xml
@@ -71,6 +71,7 @@
android:fontFamily="sans-serif-light"
android:singleLine="true"
android:textSize="12sp"
+ android:paddingBottom="2dp"
android:fadingEdge="horizontal"
android:fadingEdgeLength="3dip"
android:ellipsize="marquee"
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;
}
}