Skip to content

Vertical carousel #3

Description

@venkatadineshk

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions