android.transition.Transition.getTargetIds()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(166)

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

Transition.getTargetIds介绍

暂无

代码示例

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

public static @Nullable Transition findTransition(
    @NonNull TransitionSet set,
    @NonNull Class<? extends Transition> clazz,
    @IdRes int targetId) {
  for (int i = 0; i < set.getTransitionCount(); i++) {
    Transition transition = set.getTransitionAt(i);
    if (transition.getClass() == clazz) {
      if (transition.getTargetIds().contains(targetId)) {
        return transition;
      }
    }
    if (transition instanceof TransitionSet) {
      Transition child = findTransition((TransitionSet) transition, clazz, targetId);
      if (child != null) return child;
    }
  }
  return null;
}

代码示例来源:origin: bluelinelabs/Conductor

public static boolean hasSimpleTarget(@NonNull Transition transition) {
  return !isNullOrEmpty(transition.getTargetIds())
      || !isNullOrEmpty(transition.getTargetNames())
      || !isNullOrEmpty(transition.getTargetTypes());
}

代码示例来源:origin: r7v/Tweetz

public static @Nullable Transition findTransition(
    @NonNull TransitionSet set,
    @NonNull Class<? extends Transition> clazz,
    @IdRes int targetId) {
  for (int i = 0; i < set.getTransitionCount(); i++) {
    Transition transition = set.getTransitionAt(i);
    if (transition.getClass() == clazz) {
      if (transition.getTargetIds().contains(targetId)) {
        return transition;
      }
    }
    if (transition instanceof TransitionSet) {
      Transition child = findTransition((TransitionSet) transition, clazz, targetId);
      if (child != null) return child;
    }
  }
  return null;
}

相关文章