Bug 1011533 - Update ShapeCurve's path in onSizeChanged instead of onMeasure (r=bnicholson)

This commit is contained in:
Lucas Rocha 2014-05-19 10:55:52 +01:00
parent bfc84296e5
commit 81e12bfd41

View File

@ -53,14 +53,12 @@ public class ShapedButton extends ThemedImageButton
}
@Override
public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
protected void onSizeChanged(int width, int height, int oldWidth, int oldHeight) {
super.onSizeChanged(width, height, oldWidth, oldHeight);
if (mSide == CurveTowards.NONE)
return;
final int width = getMeasuredWidth();
final int height = getMeasuredHeight();
final int curve = (int) (height * 1.125f);
mPath.reset();