I\'ve been playing around with Android development and one of the things I\'d like to be able to do is dynamically create a background image for my windows, similar to the one b
Use View.MeasureSpec.getSize method in onMeasure override.
@Override
protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)
{
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
int width = MeasureSpec.getSize(widthMeasureSpec);
int height = MeasureSpec.getSize(heightMeasureSpec);
...
}