CarouselView
CarouselView copied to clipboard
Vertical carousel
Can vertical carousel functionality be implemented? I got some success in changing the direction by manipulating private void calculateItemPosition(final CarouselItemHolder child, float angleDegree) {
float scale = calculateItemScale(angleDegree);
angleDegree = angleDegree * (float)(Math.PI/180.0f);
float x = 0.0f;
float y = (float) (mCarouselDiameter / 2 * Math.sin(angleDegree)) + mCarouselDiameter / 2 - child.getWidth() / 2;
float z = mCarouselDiameter / 2 * (1.0f - (float) Math.cos(angleDegree));
child.setItemX(x);
child.setItemZ(z);
child.setItemY(y);
child.setItemScale(scale);
child.setItemAlpha(angleDegree, mCarouselOptions.getMinAlpha());
}
but the scroll direction is still horizontal I tried to change mIsHorizontalScroll to true but didn't help. Thanks.