public class CoverFlowViewTransformer extends ParameterizableViewTransformer
Simulates effect of cover flow.
Available parameters:setOffsetXPercent(float)
linear X-axis translation rate. Default 0.8setScaleYFactor(float)
linear Y-axis scale rate. Default -0.2setYProjection(double)
Y-axis rotation degree when position = 2. Default 60EPS, mMaxScaleX, mMaxScaleY, mMinScaleX, mMinScaleY, mOffsetXPercent, mOffsetYPercent, mRotateDegree, mRotateDistFactor, mScaleLargestAtCenter, mScaleXFactor, mScaleXOffset, mScaleYFactor, mScaleYOffset
Constructor and Description |
---|
CoverFlowViewTransformer() |
Modifier and Type | Method and Description |
---|---|
float |
getOffsetXPercent() |
float |
getScaleYFactor() |
double |
getYProjection() |
void |
onAttach(CarouselLayoutManager layoutManager)
Called when attaching the transformer to a CarouselLayoutManager.
|
void |
setOffsetXPercent(float offsetXPercent) |
void |
setScaleYFactor(float scaleYFactor) |
void |
setYProjection(double yProjectionDegree) |
void |
transform(android.view.View view,
float position)
Transform a given item view based on position.
|
getMaxScaleX, getMaxScaleY, getMinScaleX, getMinScaleY, getOffsetYPercent, getRotateDegree, getScaleXFactor, getScaleXOffset, getScaleYOffset, isScaleLargestAtCenter, setMaxScaleX, setMaxScaleY, setMinScaleX, setMinScaleY, setOffsetYPercent, setRotateDegree, setScaleLargestAtCenter, setScaleXFactor, setScaleXOffset, setScaleYOffset
public void onAttach(CarouselLayoutManager layoutManager)
CarouselView.ViewTransformer
onAttach
in interface CarouselView.ViewTransformer
onAttach
in class ParameterizableViewTransformer
CarouselLayoutManager#setDrawOrder(DrawOrder)
,
CarouselLayoutManager#setScroller(Scroller)
public void setOffsetXPercent(float offsetXPercent)
setOffsetXPercent
in class ParameterizableViewTransformer
public float getOffsetXPercent()
getOffsetXPercent
in class ParameterizableViewTransformer
public float getScaleYFactor()
getScaleYFactor
in class ParameterizableViewTransformer
public void setScaleYFactor(float scaleYFactor)
setScaleYFactor
in class ParameterizableViewTransformer
public double getYProjection()
public void setYProjection(double yProjectionDegree)
public void transform(android.view.View view, float position)
CarouselView.ViewTransformer
transform
in interface CarouselView.ViewTransformer
transform
in class ParameterizableViewTransformer
view
- Item viewposition
- For example, 0 for the current center-most item at a stable position;
4 for 4-th item at the right to the current item;
-3 for 3-rd item at the left to the current item;
0.1 for the current item with 10% offset right to its stable position.