public static interface CarouselView.ViewTransformer
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.
|
void onAttach(CarouselLayoutManager layoutManager)
layoutManager
- CarouselLayoutManager#setDrawOrder(DrawOrder)
,
CarouselLayoutManager#setScroller(Scroller)
void transform(android.view.View view, float position)
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.