throw new RuntimeException(detailMessage); transformation.clear(); animation = a; if (a != null) {
@Override protected boolean getChildStaticTransformation(View child, Transformation t) { t.clear(); t.setAlpha(child == mSelectedChild ? 1.0f : mUnselectedAlpha); return true; }
@Override protected boolean getChildStaticTransformation(View child, Transformation t) { t.clear(); t.setAlpha(child == mSelectedChild ? 1.0f : mUnselectedAlpha); return true; }
@Override protected boolean getChildStaticTransformation(View child, Transformation t) { t.clear(); t.setAlpha(child == mSelectedChild ? 1.0f : mUnselectedAlpha); return true; }
protected boolean getChildStaticTransformation(View child, Transformation t) { t.clear(); t.setTransformationType(Transformation.TYPE_MATRIX); final Matrix matrix = t.getMatrix(); float childCenterPos = child.getLeft() + (child.getWidth() / 2f); float center = getWidth() / 2; float diff = Math.abs(center - childCenterPos); float scale = diff / getWidth(); matrix.setScale(1 - (scale), 1 - (scale)); return true; }
protected boolean getChildStaticTransformation(View child, Transformation t) { child.invalidate(); // add this line final int childCenter = getCenterOfView(child); final int childWidth = child.getWidth(); int rotationAngle = 0; t.clear(); t.setTransformationType(Transformation.TYPE_MATRIX); if (childCenter == mCoveflowCenter) { transformImageBitmap((ImageView) child, t, 0); } else { rotationAngle = (int) (((float) (mCoveflowCenter - childCenter) / childWidth) * mMaxRotationAngle); if (Math.abs(rotationAngle) > mMaxRotationAngle) { rotationAngle = (rotationAngle < 0) ? -mMaxRotationAngle : mMaxRotationAngle; } transformImageBitmap((ImageView) child, t, rotationAngle); } return true; }
@Override protected boolean getChildStaticTransformation(View child, Transformation t) { Matrix matrix = t.getMatrix(); int centerX = (child.getWidth() / 2); int centerY = (child.getHeight() / 2); t.clear(); t.setTransformationType(Transformation.TYPE_MATRIX); mCamera.save(); if (child == getChildAt(0)) { mCamera.translate(pixels to the right,pixels to the bottom, to the z axis); mCamera.getMatrix(matrix); mCamera.restore(); matrix.preTranslate(-centerX, -centerY); matrix.postTranslate(centerX, centerY); } return true; }
protected boolean getChildStaticTransformation (View child, Transformation transformation) { transformation.clear(); transformation.setTransformationType(Transformation.TYPE_MATRIX); // Center of the item float centerX = (float)child.getWidth()/2, centerY = (float)child.getHeight()/2; // Save camera mCamera.save(); // Translate the item to it's coordinates final Matrix matrix = transformation.getMatrix(); mCamera.translate(((CarouselImageView)child).getX(), ((CarouselImageView)child).getY(), ((CarouselImageView)child).getZ()); // Align the item mCamera.getMatrix(matrix); matrix.preTranslate(-centerX, -centerY); matrix.postTranslate(centerX, centerY); // Restore camera mCamera.restore(); return true; }
protected boolean getChildStaticTransformation(final View child, final Transformation t) t.clear(); t.setTransformationType(Transformation.TYPE_MATRIX); final Matrix m = t.getMatrix();
float distance = Math.abs(childCenter - coverFlowCenter); boolean bottomOfCenter = childCenter - coverFlowCenter >= 0 ? true : false; t.clear(); mVerticalMatrix = t.getMatrix(); float w = childWidth; boolean rightOfCenter = childCenter - coverFlowCenter >= 0 ? true : false; t.clear(); mHorizontalMatrix = t.getMatrix();
t.clear(); t.setTransformationType(Transformation.TYPE_BOTH);
t.clear(); t.setTransformationType(Transformation.TYPE_BOTH);
private boolean applyTransformation() { mTransformation.clear(); mTransformation.setTransformationType(Transformation.TYPE_MATRIX); final Matrix matrix = mTransformation.getMatrix(); final int layoutHeight = getHeight(); final int currY = getScrollY(); final float effectsAmount = currY / (float) layoutHeight; if (effectsAmount == 0f) { return false; } float degrees = maxRotation * effectsAmount; final Camera camera = mCamera; camera.save(); camera.rotateX(degrees); camera.getMatrix(matrix); camera.restore(); final float centerX = getWidth() / 2; matrix.preTranslate(-centerX, 0); matrix.postTranslate(centerX, 0); return true; }
protected boolean getChildStaticTransformation(View child, Transformation transformation) { transformation.clear(); transformation.setTransformationType(Transformation.TYPE_MATRIX);
final boolean isFirstOrLast = position == 0 || (position == getAdapter().getCount() - 1); if (overscrollEffect.isOverScrolling() && isFirstOrLast) { t.clear(); t.setTransformationType(Transformation.TYPE_MATRIX);