By using resolveSize, we're clamping the size we measure to the
size of the screen, so just use our prefered size instead. Nobody
is going to otherwise limit us, so this value won't be mismatched
with the size we actually get.
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- int widthSize = resolveSize(mBitmap.getWidth(), widthMeasureSpec);
- int heightSize = resolveSize(mBitmap.getHeight(), heightMeasureSpec);
- setMeasuredDimension(widthSize, heightSize);
+ setMeasuredDimension(mBitmap.getWidth(), mBitmap.getHeight());
}
@Override