Skip to content

Instantly share code, notes, and snippets.

@GlebMaltsev
Created February 12, 2016 16:05
Show Gist options
  • Save GlebMaltsev/78db496b9ed52d544652 to your computer and use it in GitHub Desktop.
Save GlebMaltsev/78db496b9ed52d544652 to your computer and use it in GitHub Desktop.
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
Log.d("Layout onMeasure", "...");
Log.d("Layout onMeasure", "MeasureSpec.getSize(widthMeasureSpec) = " + MeasureSpec.getSize(widthMeasureSpec));
Log.d("Layout onMeasure", "MeasureSpec.getSize(heightMeasureSpec) = " + MeasureSpec.getSize(heightMeasureSpec));
}
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
Log.d("Layout onLayout", "...");
Log.d("Layout onLayout", "changed = " + changed);
Log.d("Layout onLayout", "left = " + l);
Log.d("Layout onLayout", "top = " + t);
Log.d("Layout onLayout", "right = " + r);
Log.d("Layout onLayout", "bottom = " + b);
Log.d("Layout onLayout", "right - left = " + (r - l));
Log.d("Layout onLayout", "bottom - top = " + (b - t));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment