private void createQuadraticPathInterpolator(LinearLayout parent) {
        float controlX = 0.5f, controlY = .2f;

        LinearLayout inputContainer = new LinearLayout(this);
        inputContainer.setOrientation(LinearLayout.VERTICAL);
        final LayoutParams params = new LayoutParams(
                ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
        params.setMargins(mDefaultMargin, mDefaultMargin, mDefaultMargin, mDefaultMargin);
        inputContainer.setLayoutParams(params);

        final TextView cx1Label = new TextView(this);
        cx1Label.setLayoutParams(new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
                ViewGroup.LayoutParams.WRAP_CONTENT));
        cx1Label.setText("ControlX: " + controlX);
        final TextView cy1Label = new TextView(this);
        cy1Label.setLayoutParams(new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
                ViewGroup.LayoutParams.WRAP_CONTENT));
        cy1Label.setText("ControlY: " + controlY);

        inputContainer.addView(cx1Label);
        inputContainer.addView(cy1Label);
        parent.addView(inputContainer);

        ControlPointCallback callback = new ControlPointCallback() {
            @Override
            void onControlPoint1Moved(float cx1, float cy1) {
                cx1Label.setText("ControlX: " + String.format("%.2f", cx1));
                cy1Label.setText("ControlY: " + String.format("%.2f", cy1));
            }

            @Override
            void onControlPoint2Moved(float cx2, float cy2) {
            }
        };

        mVisualizer.setQuadraticInterpolator(controlX, controlY, callback);
    }
Creates a quadratic PathInterpolator, whose control point values can be changed
by the user dragging that handle around in the UI.
AnimationsInterpolatorPlayground/app/src/main/java/com/example/android/interpolatorplayground/MainActivity.java