public void onSizeChanged(int width,int height){
  mWidth=width;
  mHeight=height;
  mViewRadius=(float)Math.sqrt(mWidth * mWidth / 4 + mHeight * mHeight / 4);
}

public void onSizeChanged ( int width , int height ) { mWidth = width ; mHeight = height ; mViewRadius = ( float ) Math . sqrt ( mWidth * mWidth / 4 + mHeight * mHeight / 4 ) ; }
called when view size changed .
