public class TimeMachineViewTransformer extends java.lang.Object implements CarouselView.ViewTransformer
Modifier and Type | Field and Description |
---|---|
protected static float |
translationXRate |
Constructor and Description |
---|
TimeMachineViewTransformer() |
Modifier and Type | Method and Description |
---|---|
void |
onAttach(CarouselLayoutManager layoutManager)
Called when attaching the transformer to a CarouselLayoutManager.
|
void |
transform(android.view.View view,
float position)
Transform a given item view based on position.
|
protected static final float translationXRate
public void onAttach(CarouselLayoutManager layoutManager)
CarouselView.ViewTransformer
onAttach
in interface CarouselView.ViewTransformer
CarouselLayoutManager#setDrawOrder(DrawOrder)
,
CarouselLayoutManager#setScroller(Scroller)
public void transform(android.view.View view, float position)
CarouselView.ViewTransformer
transform
in interface CarouselView.ViewTransformer
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.