Slide 31
Slide 31 text
LAYOUT
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b)
{
int currentTop = paddingTop;
layoutView(mProfileImage, paddingLeft, currentTop,
mProfileImage.getMeasuredWidth(),
mProfileImage.getMeasuredHeight());
final int contentLeft =
getWidthWithMargins(mProfileImage) + paddingLeft;
final int contentWidth = r - l - contentLeft - getPaddingRight();
layoutView(mAuthorText, contentLeft, currentTop, contentWidth,
mAuthorText.getMeasuredHeight());
currentTop += getHeightWithMargins(mAuthorText);
layoutView(mMessageText, contentLeft, currentTop,
contentWidth, mMessageText.getMeasuredHeight());
currentTop += getHeightWithMargins(mMessageText);
...
}