Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- super.onMeasure(widthMeasureSpec, heightMeasureSpec);
- Log.d("onMeasure", "...");
- Log.d("onMeasure", "...");
- int width = getMeasuredWidth();
- int height = getMeasuredHeight();
- int measureSpec = keepAspectRatioByHeight ? height : width;
- Log.d("onMeasure", "getMeasuredWidth() = " + width);
- Log.d("onMeasure", "getMeasuredHeight() = " + height);
- // ViewGroup.LayoutParams params = this.getLayoutParams();
- // params.height = measureSpec;
- // params.width = measureSpec;
- // this.setLayoutParams(params);
- setMeasuredDimension(measureSpec, measureSpec);
- // int measureSpec = keepAspectRatioByHeight ? heightMeasureSpec : widthMeasureSpec;
- // super.onMeasure(measureSpec, measureSpec);
- }
- @Override
- protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
- super.onLayout(changed, left, top, right, bottom);
- Log.d("onLayout", "...");
- Log.d("onLayout", "...");
- Log.d("onLayout", "changed = " + changed);
- Log.d("onLayout", "left = " + left);
- Log.d("onLayout", "top = " + top);
- Log.d("onLayout", "right = " + right);
- Log.d("onLayout", "bottom = " + bottom);
- Log.d("onLayout", "right - left = " + (right - left));
- Log.d("onLayout", "bottom - top = " + (bottom - top));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement