本文整理了Java中android.transition.Transition.getTargetIds()
方法的一些代码示例,展示了Transition.getTargetIds()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Transition.getTargetIds()
方法的具体详情如下:
包路径:android.transition.Transition
类名称: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;
}
内容来源于网络,如有侵权,请联系作者删除!