本文整理汇总了Java中android.transition.TransitionSet.getTransitionCount方法的典型用法代码示例。如果您正苦于以下问题:Java TransitionSet.getTransitionCount方法的具体用法?Java TransitionSet.getTransitionCount怎么用?Java TransitionSet.getTransitionCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.transition.TransitionSet
的用法示例。
在下文中一共展示了TransitionSet.getTransitionCount方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removeTargets
import android.transition.TransitionSet; //导入方法依赖的package包/类
public static void removeTargets(Object transitionObject, ArrayList<View> views) {
Transition transition = (Transition) transitionObject;
int i;
if (transition instanceof TransitionSet) {
TransitionSet set = (TransitionSet) transition;
int numTransitions = set.getTransitionCount();
for (i = 0; i < numTransitions; i++) {
removeTargets(set.getTransitionAt(i), views);
}
} else if (!hasSimpleTarget(transition)) {
List<View> targets = transition.getTargets();
if (targets != null && targets.size() == views.size() && targets.containsAll(views)) {
for (i = views.size() - 1; i >= 0; i--) {
transition.removeTarget((View) views.get(i));
}
}
}
}
示例2: addTargets
import android.transition.TransitionSet; //导入方法依赖的package包/类
public static void addTargets(Object transitionObject, ArrayList<View> views) {
Transition transition = (Transition) transitionObject;
int i;
if (transition instanceof TransitionSet) {
TransitionSet set = (TransitionSet) transition;
int numTransitions = set.getTransitionCount();
for (i = 0; i < numTransitions; i++) {
addTargets(set.getTransitionAt(i), views);
}
} else if (!hasSimpleTarget(transition) && isNullOrEmpty(transition.getTargets())) {
int numViews = views.size();
for (i = 0; i < numViews; i++) {
transition.addTarget((View) views.get(i));
}
}
}
示例3: m219a
import android.transition.TransitionSet; //导入方法依赖的package包/类
public static void m219a(Object obj, ArrayList arrayList) {
Transition transition = (Transition) obj;
int transitionCount;
if (transition instanceof TransitionSet) {
TransitionSet transitionSet = (TransitionSet) transition;
transitionCount = transitionSet.getTransitionCount();
for (int i = 0; i < transitionCount; i++) {
ar.m219a(transitionSet.getTransitionAt(i), arrayList);
}
} else if (!ar.m223a(transition)) {
List targets = transition.getTargets();
if (targets != null && targets.size() == arrayList.size() && targets.containsAll(arrayList)) {
for (transitionCount = arrayList.size() - 1; transitionCount >= 0; transitionCount--) {
transition.removeTarget((View) arrayList.get(transitionCount));
}
}
}
}
示例4: m228b
import android.transition.TransitionSet; //导入方法依赖的package包/类
public static void m228b(Object obj, ArrayList arrayList) {
int i = 0;
Transition transition = (Transition) obj;
int transitionCount;
if (transition instanceof TransitionSet) {
TransitionSet transitionSet = (TransitionSet) transition;
transitionCount = transitionSet.getTransitionCount();
while (i < transitionCount) {
ar.m228b(transitionSet.getTransitionAt(i), arrayList);
i++;
}
} else if (!ar.m223a(transition) && ar.m224a(transition.getTargets())) {
int size = arrayList.size();
for (transitionCount = 0; transitionCount < size; transitionCount++) {
transition.addTarget((View) arrayList.get(transitionCount));
}
}
}
示例5: removeTargets
import android.transition.TransitionSet; //导入方法依赖的package包/类
/**
* This method removes the views from transitions that target ONLY those views.
* The views list should match those added in addTargets and should contain
* one view that is not in the view hierarchy (state.nonExistentView).
*/
public static void removeTargets(Object transitionObject, ArrayList<View> views) {
Transition transition = (Transition) transitionObject;
if (transition instanceof TransitionSet) {
TransitionSet set = (TransitionSet) transition;
int numTransitions = set.getTransitionCount();
for (int i = 0; i < numTransitions; i++) {
Transition child = set.getTransitionAt(i);
removeTargets(child, views);
}
} else if (!hasSimpleTarget(transition)) {
List<View> targets = transition.getTargets();
if (targets != null && targets.size() == views.size() &&
targets.containsAll(views)) {
// We have an exact match. We must have added these earlier in addTargets
for (int i = views.size() - 1; i >= 0; i--) {
transition.removeTarget(views.get(i));
}
}
}
}
示例6: addTargets
import android.transition.TransitionSet; //导入方法依赖的package包/类
/**
* This method adds views as targets to the transition, but only if the transition
* doesn't already have a target. It is best for views to contain one View object
* that does not exist in the view hierarchy (state.nonExistentView) so that
* when they are removed later, a list match will suffice to remove the targets.
* Otherwise, if you happened to have targeted the exact views for the transition,
* the removeTargets call will remove them unexpectedly.
*/
public static void addTargets(Object transitionObject, ArrayList<View> views) {
Transition transition = (Transition) transitionObject;
if (transition instanceof TransitionSet) {
TransitionSet set = (TransitionSet) transition;
int numTransitions = set.getTransitionCount();
for (int i = 0; i < numTransitions; i++) {
Transition child = set.getTransitionAt(i);
addTargets(child, views);
}
} else if (!hasSimpleTarget(transition)) {
List<View> targets = transition.getTargets();
if (isNullOrEmpty(targets)) {
// We can just add the target views
int numViews = views.size();
for (int i = 0; i < numViews; i++) {
transition.addTarget(views.get(i));
}
}
}
}
示例7: findTransition
import android.transition.TransitionSet; //导入方法依赖的package包/类
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public static
@Nullable
Transition findTransition(
@NonNull TransitionSet set, @NonNull Class<? extends Transition> clazz) {
for (int i = 0; i < set.getTransitionCount(); i++) {
Transition transition = set.getTransitionAt(i);
if (transition.getClass() == clazz) {
return transition;
}
if (transition instanceof TransitionSet) {
Transition child = findTransition((TransitionSet) transition, clazz);
if (child != null) return child;
}
}
return null;
}
示例8: findTransition
import android.transition.TransitionSet; //导入方法依赖的package包/类
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;
}
示例9: addTargets
import android.transition.TransitionSet; //导入方法依赖的package包/类
public static void addTargets(Object paramObject, ArrayList<View> paramArrayList)
{
Transition localTransition = (Transition)paramObject;
if ((localTransition instanceof TransitionSet))
{
TransitionSet localTransitionSet = (TransitionSet)localTransition;
int k = localTransitionSet.getTransitionCount();
for (int m = 0; m < k; m++) {
addTargets(localTransitionSet.getTransitionAt(m), paramArrayList);
}
}
if ((!hasSimpleTarget(localTransition)) && (isNullOrEmpty(localTransition.getTargets())))
{
int i = paramArrayList.size();
for (int j = 0; j < i; j++) {
localTransition.addTarget((View)paramArrayList.get(j));
}
}
}
示例10: removeTargets
import android.transition.TransitionSet; //导入方法依赖的package包/类
public static void removeTargets(Object paramObject, ArrayList<View> paramArrayList)
{
Transition localTransition = (Transition)paramObject;
if ((localTransition instanceof TransitionSet))
{
TransitionSet localTransitionSet = (TransitionSet)localTransition;
int j = localTransitionSet.getTransitionCount();
for (int k = 0; k < j; k++) {
removeTargets(localTransitionSet.getTransitionAt(k), paramArrayList);
}
}
if (!hasSimpleTarget(localTransition))
{
List localList = localTransition.getTargets();
if ((localList != null) && (localList.size() == paramArrayList.size()) && (localList.containsAll(paramArrayList))) {
for (int i = -1 + paramArrayList.size(); i >= 0; i--) {
localTransition.removeTarget((View)paramArrayList.get(i));
}
}
}
}
示例11: a
import android.transition.TransitionSet; //导入方法依赖的package包/类
public static void a(Object paramObject, ArrayList<View> paramArrayList)
{
Transition localTransition = (Transition)paramObject;
if ((localTransition instanceof TransitionSet))
{
TransitionSet localTransitionSet = (TransitionSet)localTransition;
int i2 = localTransitionSet.getTransitionCount();
for (int i3 = 0; i3 < i2; i3++) {
a(localTransitionSet.getTransitionAt(i3), paramArrayList);
}
}
if (!a(localTransition))
{
List localList = localTransition.getTargets();
if ((localList != null) && (localList.size() == paramArrayList.size()) && (localList.containsAll(paramArrayList))) {
for (int i1 = -1 + paramArrayList.size(); i1 >= 0; i1--) {
localTransition.removeTarget((View)paramArrayList.get(i1));
}
}
}
}
示例12: b
import android.transition.TransitionSet; //导入方法依赖的package包/类
public static void b(Object paramObject, ArrayList<View> paramArrayList)
{
int i1 = 0;
Transition localTransition = (Transition)paramObject;
if ((localTransition instanceof TransitionSet))
{
TransitionSet localTransitionSet = (TransitionSet)localTransition;
int i4 = localTransitionSet.getTransitionCount();
while (i1 < i4)
{
b(localTransitionSet.getTransitionAt(i1), paramArrayList);
i1++;
}
}
if ((!a(localTransition)) && (a(localTransition.getTargets())))
{
int i2 = paramArrayList.size();
for (int i3 = 0; i3 < i2; i3++) {
localTransition.addTarget((View)paramArrayList.get(i3));
}
}
}
示例13: applyAnimationTimeScale
import android.transition.TransitionSet; //导入方法依赖的package包/类
/**
* Applies the animation scale to the given {@code transition}.
*/
public static Transition applyAnimationTimeScale(Transition transition) {
if (transition instanceof TransitionSet) {
TransitionSet set = (TransitionSet) transition;
int count = set.getTransitionCount();
for (int i = 0; i < count; ++i) {
applyAnimationTimeScale(set.getTransitionAt(i));
}
}
if (transition.getDuration() > 0) {
transition.setDuration((long) (transition.getDuration() * ANIMATION_TIME_SCALE));
}
transition.setStartDelay((long) (transition.getStartDelay() * ANIMATION_TIME_SCALE));
return transition;
}