@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        DisplayMetrics metrics = getResources().getDisplayMetrics();
        mDefaultMargin = (int) (8 * metrics.density);

        final LinearLayout paramatersParent = (LinearLayout) findViewById(R.id.linearLayout);
        final LinearLayout gridParent = (LinearLayout) findViewById(R.id.linearLayout2);
        final SeekBar durationSeeker = (SeekBar) findViewById(R.id.durationSeeker);
        final TextView durationLabel = (TextView) findViewById(R.id.durationLabel);
        mTimingVisualizer = (TimingVisualizer) findViewById(R.id.timingVisualizer);
        mAnimator = ObjectAnimator.ofFloat(this, "fraction", 0, 1);

        mVisualizer = new CurveVisualizer(this);
        gridParent.addView(mVisualizer);

        final Spinner spinner = (Spinner)findViewById(R.id.spinner);
        spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
            @Override
            public void onItemSelected(AdapterView<?> adapterView, View view, int pos, long l) {
                populateParametersUI(adapterView.getItemAtPosition(pos).toString(),
                        paramatersParent);
            }

            @Override
            public void onNothingSelected(AdapterView<?> adapterView) {

            }
        });

        durationSeeker.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
            @Override
            public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
                durationLabel.setText("Duration " + progress + "ms");
                mDuration = progress;
            }

            @Override
            public void onStartTrackingTouch(SeekBar seekBar) {}
            @Override
            public void onStopTrackingTouch(SeekBar seekBar) {}
        });
    }
This activity allows the user to visualize the timing curves for
most of the standard Interpolator objects. It allows parameterized
interpolators to be changed, including manipulating the control
points of PathInterpolator to create custom curves.
AnimationsInterpolatorPlayground/app/src/main/java/com/example/android/interpolatorplayground/MainActivity.java