wear/src/main/java/androidx/wear/widget/ConfirmationOverlay.java
@MainThread
    @VisibleForTesting
    @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public void hide() {
        Animation fadeOut =
                AnimationUtils.loadAnimation(mOverlayView.getContext(), android.R.anim.fade_out);
        fadeOut.setAnimationListener(
                new AnimationListener() {
                    @Override
                    public void onAnimationStart(Animation animation) {
                        mOverlayView.clearAnimation();
                    }

                    @Override
                    public void onAnimationEnd(Animation animation) {
                        ((ViewGroup) mOverlayView.getParent()).removeView(mOverlayView);
                        mIsShowing = false;
                        if (mListener != null) {
                            mListener.onAnimationFinished();
                        }
                    }

                    @Override
                    public void onAnimationRepeat(Animation animation) {
                    }
                });
        mOverlayView.startAnimation(fadeOut);
    }
/**
     * Starts a fadeout animation and removes the view once finished. This is invoked by {@link
     * #mHideRunnable} after {@link #mDurationMillis} milliseconds.
     *
     * @hide
     */
Starts a fadeout animation and removes the view once finished. This is invoked by {@link
#mHideRunnable} after  #mDurationMillis milliseconds.

@hide
Starts a fadeout animation and removes the view once finished . This is invoked by { @link #mHideRunnable } after #mDurationMillis milliseconds . @hide
@MainThread
    @VisibleForTesting
    @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public void hide() {
        Animation fadeOut =
                AnimationUtils.loadAnimation(mOverlayView.getContext(), android.R.anim.fade_out);
        fadeOut.setAnimationListener(
                new AnimationListener() {
                    @Override
                    public void onAnimationStart(Animation animation) {
                        mOverlayView.clearAnimation();
                    }
                    @Override
                    public void onAnimationEnd(Animation animation) {
                        ((ViewGroup) mOverlayView.getParent()).removeView(mOverlayView);
                        mIsShowing = false;
                        if (mListener != null) {
                            mListener.onAnimationFinished();
                        }
                    }
                    @Override
                    public void onAnimationRepeat(Animation animation) {
                    }
                });
        mOverlayView.startAnimation(fadeOut);
    }
@ MainThread @ VisibleForTesting @ RestrictTo ( RestrictTo . Scope . LIBRARY_GROUP ) public void hide ( ) { Animation fadeOut = AnimationUtils . loadAnimation ( mOverlayView . getContext ( ) , android . R . anim . fade_out ) ; fadeOut . setAnimationListener ( new AnimationListener ( ) { @ Override public void onAnimationStart ( Animation animation ) { mOverlayView . clearAnimation ( ) ; } @ Override public void onAnimationEnd ( Animation animation ) { ( ( ViewGroup ) mOverlayView . getParent ( ) ) . removeView ( mOverlayView ) ; mIsShowing = false ; if ( mListener != null ) { mListener . onAnimationFinished ( ) ; } } @ Override public void onAnimationRepeat ( Animation animation ) { } } ) ; mOverlayView . startAnimation ( fadeOut ) ; }
Starts a fadeout animation and removes the view once finished.
Starts a fadeout animation and removes the view once finished .