int rotationAngle,int d) {
mCamera.save();
final Matrix imageMatrix = t.getMatrix();
// final int imageHeight = child.getLayoutParams().height;
// final int imageWidth = child.getLayoutParams().width;
//mCamera.translate(0.0f, 0.0f, 50.0f);
// As the angle of the vIEw gets less, zoom in
//如果是中間兩邊的圖片,設置其透明度和Z軸位置
if (Math.abs(rotationAngle) > mMaxRotationAngle) {
rotationAngle = mMaxRotationAngle * rotationAngle / Math.abs(rotationAngle);
}
//float posParam = rotation * 0.6f;
//float zoomAmount = (float) (mMaxZoom + (posParam * posParam / 4));
//mCamera.translate(0.0f, -(posParam), zoomAmount);
//((ImageVIEw) (child)).setAlpha((int) (255 - Math.abs(d) * 80));
((ImageVIEw) (child)).setAlpha((int) (2.55f * (100 - Math.abs(d) * 15)));
Log.d("test", "rotationAngle:"+rotationAngle);
mCamera.rotateY(rotationAngle);
mCamera.getMatrix(imageMatrix);
BitmapDrawable drawable = (BitmapDrawable) child.getDrawable();
drawable.setAntiAlias(true);
//imageMatrix.preTranslate(-(imageWidth / 2), -(imageHeight / 2));
//imageMatrix.postTranslate((imageWidth / 2), (imageHeight / 2));
mCamera.restore();
}