Beispiel #1
0
  /*
   * interpolatedTime 动画从0开始到1结束 t 动画的属性
   */
  @Override
  protected void applyTransformation(float interpolatedTime, Transformation t) {

    Matrix m = t.getMatrix();
    m.setTranslate((float) (Math.sin(interpolatedTime * 10) * 15), 0);
    if (state == 0) {
      t.setAlpha(interpolatedTime);
    } else {
      t.setAlpha(1 - interpolatedTime);
    }

    super.applyTransformation(interpolatedTime, t);
  }
 protected void applyTransformation(float interpolatedTime, Transformation t) {
   View view = mView.get();
   if (view != null) {
     t.setAlpha(mAlpha);
     transformMatrix(t.getMatrix(), view);
   }
 }
Beispiel #3
0
  // CHECKSTYLE:OFF unchanged method
  @Override
  protected boolean getChildStaticTransformation(final View child, final Transformation t) {

    t.clear();
    t.setAlpha(child == mSelectedChild ? 1.0f : mUnselectedAlpha);

    return true;
  }