android.app.Activity.finishAfterTransition()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(452)

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

Activity.finishAfterTransition介绍

暂无

代码示例

代码示例来源:origin: nickbutcher/plaid

public void onDragDismissed() {
    activity.finishAfterTransition();
  }
}

代码示例来源:origin: xinghongfei/LookLook

public void onDragDismissed() {
    if (Build.VERSION.SDK_INT>=Build.VERSION_CODES.LOLLIPOP){
      activity.finishAfterTransition();
    }else {
      activity.finish();
    }
  }
}

代码示例来源:origin: yugai/DouYu-Android

public void onDragDismissed() {
    activity.finishAfterTransition();
  }
}

代码示例来源:origin: xuningjack/RequestPermission

public static void finishAfterTransition(Activity activity) {
  activity.finishAfterTransition();
}

代码示例来源:origin: kingargyle/adt-leanback-support

public static void finishAfterTransition(Activity activity) {
  activity.finishAfterTransition();
}

代码示例来源:origin: Hu12037102/ImageCompress

@Override
  public void onPhotoTap(ImageView view, float x, float y) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
      mActivity.finishAfterTransition();
    }else {
      mActivity.finish();
    }
  }
});

代码示例来源:origin: iqiyi/Neptune

@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@Override
public void finishAfterTransition() {
  mOriginActivity.finishAfterTransition();
}

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

/**
 * Invoked whenever {@link #finishCaller(Activity)} or {@link #finishCallerDelayed(Activity, long)}
 * is called.
 * <p>
 * Default implementation finishes the caller activity either via {@link Activity#finishAfterTransition()}
 * or via {@link Activity#finish()} depending on the current API capabilities.
 *
 * @param caller The caller activity to finish.
 */
@SuppressLint("NewApi")
protected void onFinishCaller(@NonNull Activity caller) {
  if (UiConfig.MATERIALIZED) caller.finishAfterTransition();
  else caller.finish();
}

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

/**
 * Invoked whenever {@link #finishCaller(Activity)} or {@link #finishCallerDelayed(Activity, long)}
 * is called.
 * <p>
 * Default implementation finishes the caller activity either via {@link Activity#finishAfterTransition()}
 * or via {@link Activity#finish()} depending on the current API capabilities.
 *
 * @param caller The caller activity to finish.
 */
@SuppressLint("NewApi")
protected void onFinishCaller(@NonNull Activity caller) {
  if (UiConfig.MATERIALIZED) caller.finishAfterTransition();
  else caller.finish();
}

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

/**
 * Invoked whenever {@link #finish(Activity)} is called.
 * <p>
 * Default implementation finishes the given caller activity for the pre LOLLIPOP Android versions
 * via {@link Activity#finish()} and for the post LOLLIPOP via {@link Activity#finishAfterTransition()}.
 * <p>
 * Derived classes can override this method in order to run custom window transitions for the
 * pre LOLLIPOP Android versions via {@link Activity#overridePendingTransition(int, int)}.
 *
 * @param caller The activity that requested its finish via this navigational transition.
 * @see #onStart(Activity)
 */
@SuppressLint("NewApi")
protected void onFinish(@NonNull Activity caller) {
  if (UiConfig.MATERIALIZED) caller.finishAfterTransition();
  else caller.finish();
}

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

/**
 * Invoked whenever {@link #finish(Activity)} is called.
 * <p>
 * Default implementation finishes the given caller activity for the pre LOLLIPOP Android versions
 * via {@link Activity#finish()} and for the post LOLLIPOP via {@link Activity#finishAfterTransition()}.
 * <p>
 * Derived classes can override this method in order to run custom window transitions for the
 * pre LOLLIPOP Android versions via {@link Activity#overridePendingTransition(int, int)}.
 *
 * @param caller The activity that requested its finish via this navigational transition.
 * @see #onStart(Activity)
 */
@SuppressLint("NewApi")
protected void onFinish(@NonNull Activity caller) {
  if (UiConfig.MATERIALIZED) caller.finishAfterTransition();
  else caller.finish();
}

代码示例来源:origin: alexjlockwood/adp-activity-transitions

@Override
public void finishAfterTransition() {
  mIsReturning = true;
  Intent data = new Intent();
  data.putExtra(EXTRA_STARTING_ALBUM_POSITION, mStartingPosition);
  data.putExtra(EXTRA_CURRENT_ALBUM_POSITION, mCurrentPosition);
  setResult(RESULT_OK, data);
  super.finishAfterTransition();
}

代码示例来源:origin: googlesamples/android-unsplash

@Override
public void finishAfterTransition() {
  setActivityResult();
  super.finishAfterTransition();
}

相关文章

Activity类方法