public final class ImmutableTransformer extends java.lang.Object implements CarouselView.ViewTransformer
Immutable transformer.
| Constructor and Description |
|---|
ImmutableTransformer(CarouselView.ViewTransformer transformer) |
| 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.
|
public ImmutableTransformer(CarouselView.ViewTransformer transformer)
public final void onAttach(CarouselLayoutManager layoutManager)
CarouselView.ViewTransformeronAttach in interface CarouselView.ViewTransformerCarouselLayoutManager#setDrawOrder(DrawOrder),
CarouselLayoutManager#setScroller(Scroller)public final void transform(android.view.View view,
float position)
CarouselView.ViewTransformertransform in interface CarouselView.ViewTransformerview - 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.