Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a066fed authored by Yorke Lee's avatar Yorke Lee
Browse files

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
parent 809fe8f0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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"
+3 −2
Original line number Diff line number Diff line
@@ -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;
            }
        }