mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-13 22:43:59 +08:00
Summary:
Includes React Native and its dependencies Fresco, Metro, and Yoga. Excludes samples/examples/docs.
find: ^(?:( *)|( *(?:[\*~#]|::))( )? *)?Copyright (?:\(c\) )?(\d{4})\b.+Facebook[\s\S]+?BSD[\s\S]+?(?:this source tree|the same directory)\.$
replace: $1$2$3Copyright (c) $4-present, Facebook, Inc.\n$2\n$1$2$3This source code is licensed under the MIT license found in the\n$1$2$3LICENSE file in the root directory of this source tree.
Reviewed By: TheSavior, yungsters
Differential Revision: D7007050
fbshipit-source-id: 37dd6bf0ffec0923bfc99c260bb330683f35553e
45 lines
1.5 KiB
Java
45 lines
1.5 KiB
Java
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
package com.facebook.react.animation;
|
|
|
|
import android.view.View;
|
|
|
|
/**
|
|
* Interface used to update particular property types during animation. While animation is in
|
|
* progress {@link Animation} instance will call {@link #onUpdate} several times with a value
|
|
* representing animation progress. Normally value will be from 0..1 range, but for spring animation
|
|
* it can slightly exceed that limit due to bounce effect at the start/end of animation.
|
|
*/
|
|
public interface AnimationPropertyUpdater {
|
|
|
|
/**
|
|
* This method will be called before animation starts.
|
|
*
|
|
* @param view view that will be animated
|
|
*/
|
|
public void prepare(View view);
|
|
|
|
/**
|
|
* This method will be called for each animation frame
|
|
*
|
|
* @param view view to update property
|
|
* @param progress animation progress from 0..1 range (may slightly exceed that limit in case of
|
|
* spring engine) retrieved from {@link Animation} engine.
|
|
*/
|
|
public void onUpdate(View view, float progress);
|
|
|
|
/**
|
|
* This method will be called at the end of animation. It should be used to set the final values
|
|
* for animated properties in order to avoid floating point inaccuracy calculated in
|
|
* {@link #onUpdate} by passing value close to 1.0 or in a case some frames got dropped.
|
|
*
|
|
* @param view view to update property
|
|
*/
|
|
public void onFinish(View view);
|
|
}
|