Translate extends Visibility { @Override @Nullable public Animator onDisappear( @NonNull final ViewGroup sceneRoot, @NonNull final View view, @Nullable final TransitionValues startValues, @Nullable final TransitionValues endValues ) { if (startValues == null) { return null; } final int[] locationOnScreen = (int[]) startValues.values.get(PROPERTY_TRANSITION_LOCATION_ON_SCREEN); if (locationOnScreen == null) { return null; } final float startX = view.getTranslationX(); final float startY = view.getTranslationY(); final float endX = startX + DELTA_RESOLVER.resolveDeltaX(sceneRoot, view, translationXRelativity, translationXDelta); final float endY = startY + DELTA_RESOLVER.resolveDeltaY(sceneRoot, view, translationYRelativity, translationYDelta); return createAnimator( this, view, startValues, locationOnScreen[0], locationOnScreen[1], startX, startY, endX, endY ); } Translate();  Translate(@TranslateMode final int mode);  Translate(@NonNull final Context context, @Nullable final AttributeSet attrs); @SuppressWarnings("UnnecessaryLocalVariable") @Nullable static Animator createAnimator(
			@NonNull final Transition transition,
			@NonNull final View view,
			@NonNull final TransitionValues transitionValues,
			final int viewX,
			final int viewY,
			final float startX,
			final float startY,
			final float endX,
			final float endY
	); void setTranslationXDelta(final float xDelta); float getTranslationXDelta(); void setTranslationYDelta(final float yDelta); float getTranslationYDelta(); void setTranslationXRelativity(@Description.ValueRelativity final int xRelativity); @Description.ValueRelativity int getTranslationXRelativity(); void setTranslationYRelativity(@Description.ValueRelativity final int yRelativity); @Description.ValueRelativity int getTranslationYRelativity(); @Override void captureStartValues(@NonNull final TransitionValues transitionValues); @Override void captureEndValues(@NonNull final TransitionValues transitionValues); @Override @Nullable Animator onAppear(
			@NonNull final ViewGroup sceneRoot,
			@NonNull final View view,
			@Nullable final TransitionValues startValues,
			@Nullable final TransitionValues endValues
	); @Override @Nullable Animator onDisappear(
			@NonNull final ViewGroup sceneRoot,
			@NonNull final View view,
			@Nullable final TransitionValues startValues,
			@Nullable final TransitionValues endValues
	); static final TimeInterpolator INTERPOLATOR; static final DeltaResolver DELTA_RESOLVER; }
@Test public void testOnDisappear() { final View view = createViewAttachedToWindow(); final TransitionValues values = new TransitionValues(); values.view = view; values.values.put(Translate.PROPERTY_TRANSITION_LOCATION_ON_SCREEN, new int[]{0, 0}); final Translate translate = new Translate(); translate.setTranslationXDelta(100f); translate.setTranslationYDelta(100f); assertThatAnimatorForViewIsValid(translate.onDisappear(new FrameLayout(context), view, values, null), view); }
@Test public void testOnDisappearWithZeroTranslationDeltas() { final View view = new View(context); final TransitionValues values = new TransitionValues(); values.view = view; values.values.put(Translate.PROPERTY_TRANSITION_LOCATION_ON_SCREEN, new int[]{0, 0}); assertThat(new Translate().onDisappear(new FrameLayout(context), view, values, null), is(nullValue())); }
@Test public void testOnDisappearWithNullStartValues() { final Translate translate = new Translate(); assertThat(translate.onDisappear(new FrameLayout(context), new View(context), null, null), is(nullValue())); }
@Test public void testOnDisappearWithStartValuesWithoutLocationOnScreen() { final View view = new View(context); final TransitionValues values = new TransitionValues(); values.view = view; final Translate translate = new Translate(); assertThat(translate.onDisappear(new FrameLayout(context), view, values, null), is(nullValue())); }
@Test public void testOnDisappearWithViewNotAttachedToWindow() { final View view = createViewNotAttachedToWindow(); final Translate translate = new Translate(); assertThat(translate.onDisappear(new FrameLayout(context), view, null, null), is(nullValue())); }