wear/src/main/java/androidx/wear/widget/CurvingLayoutCallback.java
private void maybeSetUpCircularInitialLayout(int width, int height) {
        // The values in this function are custom to the curve we use.
        if (mCurvePathHeight != height) {
            mCurvePathHeight = height;
            mCurveBottom = -0.048f * height;
            mCurveTop = 1.048f * height;
            mLineGradient = 0.5f / 0.048f;
            mCurvePath.reset();
            mCurvePath.moveTo(0.5f * width, mCurveBottom);
            mCurvePath.lineTo(0.34f * width, 0.075f * height);
            mCurvePath.cubicTo(
                    0.22f * width, 0.17f * height, 0.13f * width, 0.32f * height, 0.13f * width,
                    height / 2);
            mCurvePath.cubicTo(
                    0.13f * width,
                    0.68f * height,
                    0.22f * width,
                    0.83f * height,
                    0.34f * width,
                    0.925f * height);
            mCurvePath.lineTo(width / 2, mCurveTop);
            mPathMeasure.setPath(mCurvePath, false);
            mPathLength = mPathMeasure.getLength();
        }
    }
/** Set up the initial layout for round screens. */
Set up the initial layout for round screens.
Set up the initial layout for round screens .
private void maybeSetUpCircularInitialLayout(int width, int height) {
        if (mCurvePathHeight != height) {
            mCurvePathHeight = height;
            mCurveBottom = -0.048f * height;
            mCurveTop = 1.048f * height;
            mLineGradient = 0.5f / 0.048f;
            mCurvePath.reset();
            mCurvePath.moveTo(0.5f * width, mCurveBottom);
            mCurvePath.lineTo(0.34f * width, 0.075f * height);
            mCurvePath.cubicTo(
                    0.22f * width, 0.17f * height, 0.13f * width, 0.32f * height, 0.13f * width,
                    height / 2);
            mCurvePath.cubicTo(
                    0.13f * width,
                    0.68f * height,
                    0.22f * width,
                    0.83f * height,
                    0.34f * width,
                    0.925f * height);
            mCurvePath.lineTo(width / 2, mCurveTop);
            mPathMeasure.setPath(mCurvePath, false);
            mPathLength = mPathMeasure.getLength();
        }
    }
private void maybeSetUpCircularInitialLayout ( int width , int height ) { if ( mCurvePathHeight != height ) { mCurvePathHeight = height ; mCurveBottom = - 0.048f * height ; mCurveTop = 1.048f * height ; mLineGradient = 0.5f / 0.048f ; mCurvePath . reset ( ) ; mCurvePath . moveTo ( 0.5f * width , mCurveBottom ) ; mCurvePath . lineTo ( 0.34f * width , 0.075f * height ) ; mCurvePath . cubicTo ( 0.22f * width , 0.17f * height , 0.13f * width , 0.32f * height , 0.13f * width , height / 2 ) ; mCurvePath . cubicTo ( 0.13f * width , 0.68f * height , 0.22f * width , 0.83f * height , 0.34f * width , 0.925f * height ) ; mCurvePath . lineTo ( width / 2 , mCurveTop ) ; mPathMeasure . setPath ( mCurvePath , false ) ; mPathLength = mPathMeasure . getLength ( ) ; } }
Set up the initial layout for round screens.
Set up the initial layout for round screens .
// The values in this function are custom to the curve we use.