Reputation: 502
I created a custom view in which I want to draw a series of squares, the side of the square depends on the dimensions that are assigned to the view, so in my method onMeasure()
after checking mode and size, I call setMeasuredDimension (width, height).
Now it is correct to perform operations after setMeasuredDimension like
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
/*******/
setMeasuredDimension(width,height);
squareSize = width / rows;
}
Upvotes: 0
Views: 28