CarouselView icon indicating copy to clipboard operation
CarouselView copied to clipboard

Vertical carousel

Open venkatadineshk opened this issue 8 years ago • 0 comments

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.

venkatadineshk avatar Aug 05 '16 06:08 venkatadineshk