-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Suggest making the following modification to Coverflow.getChildStaticTransformation()
so that the center image is flattened out...
@Override
protected boolean getChildStaticTransformation(final View child, final Transformation t) {
final int childCenter = getCenterOfView(child);
final int childWidth = child.getWidth();
int rotationAngle = 0;
t.clear();
t.setTransformationType(Transformation.TYPE_MATRIX);
if (childCenter > mCoveflowCenter - (childWidth /2) && childCenter < mCoveflowCenter + (childWidth /2)) {
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;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels