Android Custom wheel or slot machine implementation

后端 未结 4 1364
-上瘾入骨i
-上瘾入骨i 2021-02-14 05:50

I need to implement a wheel like control (a slot machine) like in the picture.

\"enter

相关标签:
4条回答
  • 2021-02-14 06:38

    enter image description here

    Just try this, keep 6 views 5 as shown in image and one in reserve. When the view 1 goes out of scope the reserve view came in with the next image & the view 1 became the reserve view similarly you should render the cycle as many times you want.

    The width grows while it moves from bottom to center and shrinks when it rolls towards top

    0 讨论(0)
  • 2021-02-14 06:45

    I dont know how close you are to achieving your goal but you may want to skip using android classes and use a 3d engine like cocos 3d for android. Importing a model and making it clickable in the right spots and all that kind of stuff would be abstracted for you so you dont spend time messing around with other things.

    0 讨论(0)
  • 2021-02-14 06:57

    For the perspective, look at http://developer.android.com/reference/android/graphics/Camera.html

    You set the location of the camera, and then get the matrix, and use it to draw the image.It will set the skew, and scale for you.

    0 讨论(0)
  • 2021-02-14 06:57

    Have you seen this? You may be able to adjust it but it's a starting point at least https://code.google.com/p/android-wheel/

    UPDATE: the project has moved to github

    0 讨论(0)
提交回复
热议问题