Skip to content

Instantly share code, notes, and snippets.

@muthuraj57
Created December 7, 2016 19:09
Show Gist options
  • Save muthuraj57/bf3d0aff14947009387f19d8e712f0b6 to your computer and use it in GitHub Desktop.
Save muthuraj57/bf3d0aff14947009387f19d8e712f0b6 to your computer and use it in GitHub Desktop.
/*
* Set the canvas bounds here
* */
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
int screenWidth = MeasureSpec.getSize(widthMeasureSpec);
int screenHeight = MeasureSpec.getSize(heightMeasureSpec);
rectF.set(0, 0, screenWidth, screenHeight);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment