@Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { // Layout the shutter button. int shutterButtonWidth = mShutterButton.getMeasuredWidth(); int shutterButtonHeight = mShutterButton.getMeasuredHeight(); mCenterX = right - left - Util.dpToPixel(FULL_WHEEL_RADIUS); mCenterY = (bottom - top) / 2; mShutterButton.layout( right - left - shutterButtonWidth, mCenterY - shutterButtonHeight / 2, right - left, mCenterY + shutterButtonHeight - shutterButtonHeight / 2); // Layout the control wheel. mIndicatorControlWheel.layout(0, 0, right - left, bottom - top); mZoomControlWheel.layout(0, 0, right - left, bottom - top); }