封面流:做无限循环(像启动器,当到达最后一项时可以回到第一项)
CoverFlow is an implementation of gallery widget.
CoverFlow是gallery小部件的实现。
picture : http://4.bp.blogspot.com/_UW2f-eaiXZs/S4lCNH-wpyI/AAAAAAAAAJE/0Ce8jGe8fSA/s200/coverflowv2.png
图片:http://4.bp.blogspot.com/_UW2f-eaiXZs/S4lCNH-wpyI/AAAAAAAAAJE/0Ce8jGe8fSA/s200/coverflowv2.png
It works like album cover when you are using music player in android or iOS.
当您在Android或iOS中使用音乐播放器时,它就像专辑封面一样。
Based on this url > http://www.inter-fuser.com/2010/02/android-coverflow-widget-v2.html , I implement coverflow for my project as a main menu UI and I'm having issues on how to make the item loop back to the first item when reached last item.
基于这个网址> http://www.inter-fuser.com/2010/02/android-coverflow-widget-v2.html,我将我的项目的coverflow实现为主菜单UI,我遇到了如何问题到达最后一个项目时,使项目循环回第一个项目。
What i mean by infinite loop is, for example : if coverflow has 5 item, then when the app start, the centre of screen would show the item #3. when I swipe to right 2 times, i will find the last item is on the right and cannot swipe to the right anymore because no more item is provided. what i want is it able to loop back to item #1 and so on.
无限循环的意思是,例如:如果coverflow有5个项目,那么当应用程序启动时,屏幕中心将显示项目#3。当我向右滑动2次时,我会发现最后一项是在右边,不能再向右滑动,因为没有提供更多的项目。我想要的是它能够循环回到项目#1等等。
Example, here we have five item[1] [2] [3] [4] [5]
例如,这里我们有五个项目[1] [2] [3] [4] [5]
Illustration (the items - Please imagine it shows on the sceen): When The first start, the UI shown will be
插图(项目 - 请想象它在场景中显示):当第一次启动时,显示的UI将是
2] [3] [4 -- (5 is waiting to be shown)
2] [3] [4 - (5等待显示)
When I swipe to the right once, it will show
当我向右滑动一次时,它会显示出来
3] [4] [5 -- (no other item to be shown after 5)
3] [4] [5 - (5之后没有其他项目显示)
When I swipe to right once more :
当我再次向右滑动时:
4] [5] -- (no item more so it will display blank after 5)
4] [5] - (没有项目,所以5后会显示空白)
What I want is :
我想要的是:
4] [5] [1 -- (2 is waiting)
4] [5] [1 - (2正在等待)
5] [1] [2 -- (3 is waiting
5] [1] [2 - (3正在等待
I want it to work both ways (move right : last item to first item, move left : first item to last item). Really need an idea to work on this. Any suggestion will be appreciated.
我希望它可以双向工作(向右移动:最后一项到第一项,向左移动:第一项到最后一项)。真的需要一个想法来解决这个问题。任何建议将不胜感激。
Thank you.
1 个解决方案
#1
0
Check out the answer to How to create a closed (circular) ListView?. You can probably use a similar concept with the adapter feeding your coverflow view.
查看如何创建一个封闭(循环)ListView的答案?您可以使用与适配器相似的概念来提供Coverflow视图。
更多相关文章
- Proguard可以对Android库项目(APKLIB)进行模糊处理吗?
- listview中的Android listview适配器(json子程序)
- 最近一年做Android项目过程中,对其的一些注意事项(优化)以及问题
- Android小项目之六 apk下载
- Say Hello To Android(解析Android项目目录结构)
- linux android 如何把android项目打成jar包
- 删除Listview中第一个项目顶部的行
- 【边做项目边学Android】手机安全卫士04_02:从服务器下载并安装新
- 给自己的项目做极光推送的步骤