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); }
public SpringInterpolator() { steppingLooper = new SteppingLooper(); spring = new BaseSpringSystem(steppingLooper).createSpring(); }
@Override public void onBeforeIntegrate(BaseSpringSystem springSystem) { }
@Override public void onAfterIntegrate(BaseSpringSystem springSystem) { checkConstraints(); }
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)); }