Java 类com.facebook.react.animation.Animation 实例源码

项目:RNLearn_Project1    文件:UIViewOperationQueue.java   
@Override
public void execute() {
  Animation animation = mAnimationRegistry.getAnimation(mAnimationID);
  if (animation != null) {
    mNativeViewHierarchyManager.startAnimationForNativeView(
        mReactTag,
        animation,
        mSuccessCallback);
  } else {
    // node or animation not found
    // TODO(5712813): cleanup callback in JS callbacks table in case of an error
    throw new IllegalViewOperationException("Animation with id " + mAnimationID
        + " was not found");
  }
}
项目:RNLearn_Project1    文件:UIViewOperationQueue.java   
@Override
public void execute() {
  Animation animation = mAnimationRegistry.getAnimation(mAnimationID);
  if (animation != null) {
    animation.cancel();
  }
}
项目:RNLearn_Project1    文件:UIManagerModuleTest.java   
@Test
public void testAddAndRemoveAnimation() {
  UIManagerModule uiManagerModule = getUIManagerModule();
  TestMoveDeleteHierarchy hierarchy = createMoveDeleteHierarchy(uiManagerModule);

  AnimationPropertyUpdater mockPropertyUpdater = mock(AnimationPropertyUpdater.class);
  Animation mockAnimation = spy(new AnimationStub(1000, mockPropertyUpdater));
  Callback callbackMock = mock(Callback.class);

  int rootTag = hierarchy.rootView;
  uiManagerModule.createView(
      hierarchy.rootView,
      ReactViewManager.REACT_CLASS,
      rootTag,
      JavaOnlyMap.of("collapsable", false));

  uiManagerModule.registerAnimation(mockAnimation);
  uiManagerModule.addAnimation(hierarchy.rootView, 1000, callbackMock);
  uiManagerModule.removeAnimation(hierarchy.rootView, 1000);

  uiManagerModule.onBatchComplete();
  executePendingFrameCallbacks();

  verify(callbackMock, times(1)).invoke(false);
  verify(mockAnimation).run();
  verify(mockAnimation).cancel();
}
项目:RNLearn_Project1    文件:UIViewOperationQueue.java   
@Override
public void execute() {
  Animation animation = mAnimationRegistry.getAnimation(mAnimationID);
  if (animation != null) {
    mNativeViewHierarchyManager.startAnimationForNativeView(
        mReactTag,
        animation,
        mSuccessCallback);
  } else {
    // node or animation not found
    // TODO(5712813): cleanup callback in JS callbacks table in case of an error
    throw new IllegalViewOperationException("Animation with id " + mAnimationID
        + " was not found");
  }
}
项目:RNLearn_Project1    文件:UIViewOperationQueue.java   
@Override
public void execute() {
  Animation animation = mAnimationRegistry.getAnimation(mAnimationID);
  if (animation != null) {
    animation.cancel();
  }
}
项目:RNLearn_Project1    文件:UIManagerModuleTest.java   
@Test
public void testAddAndRemoveAnimation() {
  UIManagerModule uiManagerModule = getUIManagerModule();
  TestMoveDeleteHierarchy hierarchy = createMoveDeleteHierarchy(uiManagerModule);

  AnimationPropertyUpdater mockPropertyUpdater = mock(AnimationPropertyUpdater.class);
  Animation mockAnimation = spy(new AnimationStub(1000, mockPropertyUpdater));
  Callback callbackMock = mock(Callback.class);

  int rootTag = hierarchy.rootView;
  uiManagerModule.createView(
      hierarchy.rootView,
      ReactViewManager.REACT_CLASS,
      rootTag,
      JavaOnlyMap.of("collapsable", false));

  uiManagerModule.registerAnimation(mockAnimation);
  uiManagerModule.addAnimation(hierarchy.rootView, 1000, callbackMock);
  uiManagerModule.removeAnimation(hierarchy.rootView, 1000);

  uiManagerModule.onBatchComplete();
  executePendingFrameCallbacks();

  verify(callbackMock, times(1)).invoke(false);
  verify(mockAnimation).run();
  verify(mockAnimation).cancel();
}
项目:ReactNativeSignatureExample    文件:UIViewOperationQueue.java   
@Override
public void execute() {
  Animation animation = mAnimationRegistry.getAnimation(mAnimationID);
  if (animation != null) {
    mNativeViewHierarchyManager.startAnimationForNativeView(
        mReactTag,
        animation,
        mSuccessCallback);
  } else {
    // node or animation not found
    // TODO(5712813): cleanup callback in JS callbacks table in case of an error
    throw new IllegalViewOperationException("Animation with id " + mAnimationID
        + " was not found");
  }
}
项目:ReactNativeSignatureExample    文件:UIViewOperationQueue.java   
@Override
public void execute() {
  Animation animation = mAnimationRegistry.getAnimation(mAnimationID);
  if (animation != null) {
    animation.cancel();
  }
}
项目:ReactNativeSignatureExample    文件:UIManagerModuleTest.java   
@Test
public void testAddAndRemoveAnimation() {
  UIManagerModule uiManagerModule = getUIManagerModule();
  TestMoveDeleteHierarchy hierarchy = createMoveDeleteHierarchy(uiManagerModule);

  AnimationPropertyUpdater mockPropertyUpdater = mock(AnimationPropertyUpdater.class);
  Animation mockAnimation = spy(new AnimationStub(1000, mockPropertyUpdater));
  Callback callbackMock = mock(Callback.class);

  int rootTag = hierarchy.rootView;
  uiManagerModule.createView(
      hierarchy.rootView,
      ReactViewManager.REACT_CLASS,
      rootTag,
      JavaOnlyMap.of("collapsable", false));

  uiManagerModule.registerAnimation(mockAnimation);
  uiManagerModule.addAnimation(hierarchy.rootView, 1000, callbackMock);
  uiManagerModule.removeAnimation(hierarchy.rootView, 1000);

  uiManagerModule.onBatchComplete();
  executePendingChoreographerCallbacks();

  verify(callbackMock, times(1)).invoke(false);
  verify(mockAnimation).run();
  verify(mockAnimation).cancel();
}
项目:react-native-ibeacon-android    文件:UIViewOperationQueue.java   
@Override
public void execute() {
  Animation animation = mAnimationRegistry.getAnimation(mAnimationID);
  if (animation != null) {
    mNativeViewHierarchyManager.startAnimationForNativeView(
        mReactTag,
        animation,
        mSuccessCallback);
  } else {
    // node or animation not found
    // TODO(5712813): cleanup callback in JS callbacks table in case of an error
    throw new IllegalViewOperationException("Animation with id " + mAnimationID
        + " was not found");
  }
}
项目:react-native-ibeacon-android    文件:UIViewOperationQueue.java   
@Override
public void execute() {
  Animation animation = mAnimationRegistry.getAnimation(mAnimationID);
  if (animation != null) {
    animation.cancel();
  }
}
项目:react-native-ibeacon-android    文件:UIManagerModuleTest.java   
@Test
public void testAddAndRemoveAnimation() {
  UIManagerModule uiManagerModule = getUIManagerModule();
  TestMoveDeleteHierarchy hierarchy = createMoveDeleteHierarchy(uiManagerModule);

  AnimationPropertyUpdater mockPropertyUpdater = mock(AnimationPropertyUpdater.class);
  Animation mockAnimation = spy(new AnimationStub(1000, mockPropertyUpdater));
  Callback callbackMock = mock(Callback.class);

  int rootTag = hierarchy.rootView;
  uiManagerModule.createView(
      hierarchy.rootView,
      ReactViewManager.REACT_CLASS,
      rootTag,
      JavaOnlyMap.of("collapsable", false));

  uiManagerModule.registerAnimation(mockAnimation);
  uiManagerModule.addAnimation(hierarchy.rootView, 1000, callbackMock);
  uiManagerModule.removeAnimation(hierarchy.rootView, 1000);

  uiManagerModule.onBatchComplete();
  executePendingChoreographerCallbacks();

  verify(callbackMock, times(1)).invoke(false);
  verify(mockAnimation).run();
  verify(mockAnimation).cancel();
}
项目:react-native-box-loaders    文件:UIViewOperationQueue.java   
@Override
public void execute() {
  Animation animation = mAnimationRegistry.getAnimation(mAnimationID);
  if (animation != null) {
    mNativeViewHierarchyManager.startAnimationForNativeView(
        mReactTag,
        animation,
        mSuccessCallback);
  } else {
    // node or animation not found
    // TODO(5712813): cleanup callback in JS callbacks table in case of an error
    throw new IllegalViewOperationException("Animation with id " + mAnimationID
        + " was not found");
  }
}
项目:react-native-box-loaders    文件:UIViewOperationQueue.java   
@Override
public void execute() {
  Animation animation = mAnimationRegistry.getAnimation(mAnimationID);
  if (animation != null) {
    animation.cancel();
  }
}
项目:react-native-box-loaders    文件:UIManagerModuleTest.java   
@Test
public void testAddAndRemoveAnimation() {
  UIManagerModule uiManagerModule = getUIManagerModule();
  TestMoveDeleteHierarchy hierarchy = createMoveDeleteHierarchy(uiManagerModule);

  AnimationPropertyUpdater mockPropertyUpdater = mock(AnimationPropertyUpdater.class);
  Animation mockAnimation = spy(new AnimationStub(1000, mockPropertyUpdater));
  Callback callbackMock = mock(Callback.class);

  int rootTag = hierarchy.rootView;
  uiManagerModule.createView(
      hierarchy.rootView,
      ReactViewManager.REACT_CLASS,
      rootTag,
      JavaOnlyMap.of("collapsable", false));

  uiManagerModule.registerAnimation(mockAnimation);
  uiManagerModule.addAnimation(hierarchy.rootView, 1000, callbackMock);
  uiManagerModule.removeAnimation(hierarchy.rootView, 1000);

  uiManagerModule.onBatchComplete();
  executePendingChoreographerCallbacks();

  verify(callbackMock, times(1)).invoke(false);
  verify(mockAnimation).run();
  verify(mockAnimation).cancel();
}
项目:Ironman    文件:UIViewOperationQueue.java   
@Override
public void execute() {
  Animation animation = mAnimationRegistry.getAnimation(mAnimationID);
  if (animation != null) {
    mNativeViewHierarchyManager.startAnimationForNativeView(
        mReactTag,
        animation,
        mSuccessCallback);
  } else {
    // node or animation not found
    // TODO(5712813): cleanup callback in JS callbacks table in case of an error
    throw new IllegalViewOperationException("Animation with id " + mAnimationID
        + " was not found");
  }
}
项目:Ironman    文件:UIViewOperationQueue.java   
@Override
public void execute() {
  Animation animation = mAnimationRegistry.getAnimation(mAnimationID);
  if (animation != null) {
    animation.cancel();
  }
}
项目:Ironman    文件:UIManagerModuleTest.java   
@Test
public void testAddAndRemoveAnimation() {
  UIManagerModule uiManagerModule = getUIManagerModule();
  TestMoveDeleteHierarchy hierarchy = createMoveDeleteHierarchy(uiManagerModule);

  AnimationPropertyUpdater mockPropertyUpdater = mock(AnimationPropertyUpdater.class);
  Animation mockAnimation = spy(new AnimationStub(1000, mockPropertyUpdater));
  Callback callbackMock = mock(Callback.class);

  int rootTag = hierarchy.rootView;
  uiManagerModule.createView(
      hierarchy.rootView,
      ReactViewManager.REACT_CLASS,
      rootTag,
      JavaOnlyMap.of("collapsable", false));

  uiManagerModule.registerAnimation(mockAnimation);
  uiManagerModule.addAnimation(hierarchy.rootView, 1000, callbackMock);
  uiManagerModule.removeAnimation(hierarchy.rootView, 1000);

  uiManagerModule.onBatchComplete();
  executePendingChoreographerCallbacks();

  verify(callbackMock, times(1)).invoke(false);
  verify(mockAnimation).run();
  verify(mockAnimation).cancel();
}
项目:RNLearn_Project1    文件:UIViewOperationQueue.java   
private RegisterAnimationOperation(Animation animation) {
  super(animation.getAnimationID());
  mAnimation = animation;
}
项目:RNLearn_Project1    文件:UIViewOperationQueue.java   
public void enqueueRegisterAnimation(Animation animation) {
  mOperations.add(new RegisterAnimationOperation(animation));
}
项目:RNLearn_Project1    文件:UIImplementation.java   
/**
 * Registers a new Animation that can then be added to a View using {@link #addAnimation}.
 */
public void registerAnimation(Animation animation) {
  mOperationsQueue.enqueueRegisterAnimation(animation);
}
项目:RNLearn_Project1    文件:UIManagerModule.java   
/**
 * Registers a new Animation that can then be added to a View using {@link #addAnimation}.
 */
public void registerAnimation(Animation animation) {
  mUIImplementation.registerAnimation(animation);
}
项目:RNLearn_Project1    文件:UIViewOperationQueue.java   
private RegisterAnimationOperation(Animation animation) {
  super(animation.getAnimationID());
  mAnimation = animation;
}
项目:RNLearn_Project1    文件:UIViewOperationQueue.java   
public void enqueueRegisterAnimation(Animation animation) {
  mOperations.add(new RegisterAnimationOperation(animation));
}
项目:RNLearn_Project1    文件:UIImplementation.java   
/**
 * Registers a new Animation that can then be added to a View using {@link #addAnimation}.
 */
public void registerAnimation(Animation animation) {
  mOperationsQueue.enqueueRegisterAnimation(animation);
}
项目:RNLearn_Project1    文件:UIManagerModule.java   
/**
 * Registers a new Animation that can then be added to a View using {@link #addAnimation}.
 */
public void registerAnimation(Animation animation) {
  mUIImplementation.registerAnimation(animation);
}
项目:ReactNativeSignatureExample    文件:UIViewOperationQueue.java   
private RegisterAnimationOperation(Animation animation) {
  super(animation.getAnimationID());
  mAnimation = animation;
}
项目:ReactNativeSignatureExample    文件:UIViewOperationQueue.java   
public void enqueueRegisterAnimation(Animation animation) {
  mOperations.add(new RegisterAnimationOperation(animation));
}
项目:ReactNativeSignatureExample    文件:UIImplementation.java   
/**
 * Registers a new Animation that can then be added to a View using {@link #addAnimation}.
 */
public void registerAnimation(Animation animation) {
  mOperationsQueue.enqueueRegisterAnimation(animation);
}
项目:ReactNativeSignatureExample    文件:UIManagerModule.java   
/**
 * Registers a new Animation that can then be added to a View using {@link #addAnimation}.
 */
public void registerAnimation(Animation animation) {
  mUIImplementation.registerAnimation(animation);
}
项目:react-native-ibeacon-android    文件:UIViewOperationQueue.java   
private RegisterAnimationOperation(Animation animation) {
  super(animation.getAnimationID());
  mAnimation = animation;
}
项目:react-native-ibeacon-android    文件:UIViewOperationQueue.java   
public void enqueueRegisterAnimation(Animation animation) {
  mOperations.add(new RegisterAnimationOperation(animation));
}
项目:react-native-ibeacon-android    文件:UIImplementation.java   
/**
 * Registers a new Animation that can then be added to a View using {@link #addAnimation}.
 */
public void registerAnimation(Animation animation) {
  mOperationsQueue.enqueueRegisterAnimation(animation);
}
项目:react-native-ibeacon-android    文件:UIManagerModule.java   
/**
 * Registers a new Animation that can then be added to a View using {@link #addAnimation}.
 */
public void registerAnimation(Animation animation) {
  mUIImplementation.registerAnimation(animation);
}
项目:react-native-box-loaders    文件:UIViewOperationQueue.java   
private RegisterAnimationOperation(Animation animation) {
  super(animation.getAnimationID());
  mAnimation = animation;
}
项目:react-native-box-loaders    文件:UIViewOperationQueue.java   
public void enqueueRegisterAnimation(Animation animation) {
  mOperations.add(new RegisterAnimationOperation(animation));
}
项目:react-native-box-loaders    文件:UIImplementation.java   
/**
 * Registers a new Animation that can then be added to a View using {@link #addAnimation}.
 */
public void registerAnimation(Animation animation) {
  mOperationsQueue.enqueueRegisterAnimation(animation);
}
项目:react-native-box-loaders    文件:UIManagerModule.java   
/**
 * Registers a new Animation that can then be added to a View using {@link #addAnimation}.
 */
public void registerAnimation(Animation animation) {
  mUIImplementation.registerAnimation(animation);
}
项目:Ironman    文件:UIViewOperationQueue.java   
private RegisterAnimationOperation(Animation animation) {
  super(animation.getAnimationID());
  mAnimation = animation;
}
项目:Ironman    文件:UIViewOperationQueue.java   
public void enqueueRegisterAnimation(Animation animation) {
  mOperations.add(new RegisterAnimationOperation(animation));
}