13

I want to implement vertical carousel in android.I have searched lot of things about it,Finally i found that horizontal carousel example here. Can any body know that how to convert this horizontal carousel into vertical carousel.

And also i have tried this .Link .This 3d listview gives rotation of the each element but i want to implement whole list should be in 3d. Can any body give suggestions please...

Ramesh Akula
  • 5,720
  • 4
  • 43
  • 67

2 Answers2

11

If you want a vertical pager, try that library written by Jake Warthon. It's perfectly coded and completely up to date with Android SDK.

The best way to work with 3d is to work with renderscript. I won't be really helpful on that topic.

Romain Piel
  • 11,017
  • 15
  • 71
  • 106
2

This following code is used to display the carousel in vertical view. I just modified code in this url. http://www.codeproject.com/Articles/146145/Android-3D-Carousel .This is works fine for nexus-landscpape. And also i used this LINK to get view as vertical.

private void Calculate3DPosition(CarouselItem child, int diameter,
            float angleOffset) {
        angleOffset = angleOffset * (float) (Math.PI / 180.0f);
        float y = (float) (diameter / 2 * Math.sin(angleOffset)) + diameter / 2
                - child.getWidth() / 2;
        float z = diameter / 2 * (1.0f - (float) Math.cos(angleOffset));
        float x = (float) (-   diameter / 2 * Math.cos(angleOffset) * 0.5);
        child.setX(x + 250);
        child.setZ(z);
        child.setY(y - 150);
    }
Ramesh Akula
  • 5,720
  • 4
  • 43
  • 67
  • LINK to get view as vertical is not working can you please post the code. – zaiff Aug 31 '12 at 10:36
  • can you please tell how you set view as vertical. – zaiff Aug 31 '12 at 13:44
  • Hello, Ramesh i am using same link which you have listed in your question. i want to create vertical carousel animation in portrait but it will not good. so can you send me code please ? – Hasmukh Sep 24 '13 at 05:22
  • this is the which i get this animation but it is horizontal http://horribile.blogspot.in/2011/11/android-3d-carousel.html i want this in vertical way, i tried to modify Calculate3DPosition method but it is not work correctly, need your help. – Hasmukh Sep 24 '13 at 05:25