android.view.Window.setSharedElementReenterTransition()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(143)

本文整理了Java中android.view.Window.setSharedElementReenterTransition()方法的一些代码示例,展示了Window.setSharedElementReenterTransition()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.setSharedElementReenterTransition()方法的具体详情如下:
包路径:android.view.Window
类名称:Window
方法名:setSharedElementReenterTransition

Window.setSharedElementReenterTransition介绍

暂无

代码示例

代码示例来源:origin: mohak1712/UberUX

private void setupWindowAnimations() {
  ChangeBounds exitTransition = new ChangeBounds();
  exitTransition.setDuration(1000);
  exitTransition.addListener(exitListener);
  getWindow().setSharedElementExitTransition(exitTransition);
  ChangeBounds reenterTransition = new ChangeBounds();
  reenterTransition.setDuration(1000);
  reenterTransition.addListener(reenterListener);
  reenterTransition.setInterpolator(new DecelerateInterpolator(4));
  getWindow().setSharedElementReenterTransition(reenterTransition);
}

代码示例来源:origin: com.albedinsky.android/ui

/**
 * Attaches all transitions for shared elements specified for this navigational transition to
 * the given <var>window</var>.
 * <p>
 * This will attach only transitions of which particular flags are contained within {@link #mTransitions}
 * flags.
 *
 * @param window The window to which should be transitions attached.
 */
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void attachSharedElementTransitions(Window window) {
  if ((mTransitions & TRANSITION_SHARED_ELEMENT_ENTER) != 0)
    window.setSharedElementEnterTransition(mSharedElementEnterTransition);
  if ((mTransitions & TRANSITION_SHARED_ELEMENT_REENTER) != 0)
    window.setSharedElementReenterTransition(mSharedElementReenterTransition);
  if ((mTransitions & TRANSITION_SHARED_ELEMENT_RETURN) != 0)
    window.setSharedElementReturnTransition(mSharedElementReturnTransition);
  if ((mTransitions & TRANSITION_SHARED_ELEMENT_EXIT) != 0)
    window.setSharedElementExitTransition(mSharedElementExitTransition);
}

代码示例来源:origin: com.albedinsky.android/ui-transition

/**
 * Attaches all transitions for shared elements specified for this navigational transition to
 * the given <var>window</var>.
 * <p>
 * This will attach only transitions of which particular flags are contained within {@link #mTransitions}
 * flags.
 *
 * @param window The window to which should be transitions attached.
 */
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void attachSharedElementTransitions(Window window) {
  if ((mTransitions & TRANSITION_SHARED_ELEMENT_ENTER) != 0)
    window.setSharedElementEnterTransition(mSharedElementEnterTransition);
  if ((mTransitions & TRANSITION_SHARED_ELEMENT_REENTER) != 0)
    window.setSharedElementReenterTransition(mSharedElementReenterTransition);
  if ((mTransitions & TRANSITION_SHARED_ELEMENT_RETURN) != 0)
    window.setSharedElementReturnTransition(mSharedElementReturnTransition);
  if ((mTransitions & TRANSITION_SHARED_ELEMENT_EXIT) != 0)
    window.setSharedElementExitTransition(mSharedElementExitTransition);
}

代码示例来源:origin: DingMouRen/DingDingMap

mRootLayout.post(()-> revealAnimatorUtil.startRevealAnimator(false,animatorX,animatorY));
getWindow().setSharedElementExitTransition(new ChangeImageTransform());
getWindow().setSharedElementReenterTransition(new ChangeImageTransform());

代码示例来源:origin: DingMouRen/DingDingMusic

private void setupWindowAnimation() {
  Explode explode = new Explode();
  explode.setDuration(1000);
  Fade fade = new Fade();
  fade.setDuration(500);
  getWindow().setReenterTransition(fade);
  getWindow().setExitTransition(explode);
  getWindow().setSharedElementExitTransition(new ChangeImageTransform());
  getWindow().setSharedElementReenterTransition(new ChangeImageTransform());
}

代码示例来源:origin: lianghuiyong/AndroidBase

getWindow().setSharedElementReenterTransition(new ChangeBounds());
getWindow().setSharedElementReturnTransition(new ChangeBounds());
getWindow().setSharedElementReenterTransition(new ChangeClipBounds());
getWindow().setSharedElementReturnTransition(new ChangeClipBounds());
getWindow().setSharedElementReenterTransition(new ChangeTransform());
getWindow().setSharedElementReturnTransition(new ChangeTransform());
break;
getWindow().setSharedElementReenterTransition(new ChangeImageTransform());
getWindow().setSharedElementReturnTransition(new ChangeImageTransform());
break;

相关文章

Window类方法