Java 类com.facebook.rebound.BaseSpringSystem 实例源码

项目:RxComboDetector    文件:YOLOComboView.java   
public YOLOComboView(Context context, AttributeSet attrs, int defStyleAttr) {
    super(context, attrs, defStyleAttr);
    BaseSpringSystem springSystem = SpringSystem.create();
    mComboSpring = springSystem.createSpring();
    mComboSpring.setSpringConfig(SpringConfig.fromOrigamiTensionAndFriction(600, 9));

    mYOLOLogo = new ImageView(context);
    FrameLayout.LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
            ViewGroup.LayoutParams.WRAP_CONTENT);
    mYOLOLogo.setLayoutParams(params);
    mYOLOLogo.setImageResource(R.drawable.ic_yolo);
    addView(mYOLOLogo);

    mComboText = new TextView(context);
    params = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
            ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.RIGHT);
    params.rightMargin = 30;
    mComboText.setLayoutParams(params);
    mComboText.setTextColor(context.getResources().getColor(android.R.color.holo_red_light));
    mComboText.setTextSize(TypedValue.COMPLEX_UNIT_SP, 20);
    addView(mComboText);

    mSpringListener = new ComboSpringListener(mComboText);
    setAlpha(0);
}
项目:betwixt    文件:SpringInterpolator.java   
public SpringInterpolator() {
    steppingLooper = new SteppingLooper();
    spring = new BaseSpringSystem(steppingLooper).createSpring();
}
项目:test4XXX    文件:BallExample.java   
@Override
public void onBeforeIntegrate(BaseSpringSystem springSystem) {
}
项目:test4XXX    文件:BallExample.java   
@Override
public void onAfterIntegrate(BaseSpringSystem springSystem) {
  checkConstraints();
}
项目:AndroidPlayground    文件:CountdownAnimationTextView.java   
public CountdownAnimationTextView(Context context, AttributeSet attrs, int defStyleAttr) {
    super(context, attrs, defStyleAttr);
    BaseSpringSystem springSystem = SpringSystem.create();
    mCountdownSpring = springSystem.createSpring();
    mCountdownSpring.setSpringConfig(SpringConfig.fromOrigamiTensionAndFriction(600, 9));
}
项目:rebound    文件:BallExample.java   
@Override
public void onBeforeIntegrate(BaseSpringSystem springSystem) {
}
项目:rebound    文件:BallExample.java   
@Override
public void onAfterIntegrate(BaseSpringSystem springSystem) {
  checkConstraints();
}