How to create a horizontal carousel view in android? [closed]

孤街浪徒 提交于 2020-01-03 08:50:15

问题


In my Android application I want to implement Carousel for 7 views.

My carousel has to show like the 1st image in this link

.

I have checked out couple of links and some demo examples also like this one svn-link, but

1st of all its for even number of views, where i have only 7 views

secondly it adds all its content from attribute xml, I would prefer adding the views by code,

and I don't need a complete circular carousel, just an Arc shaped is fine with me.

Presently I have used coverflow, but experiencing too many bugs which is not so easy to solve.

Please help me with some demo, or example of carousel, simpler is better.

Or if using any other procedure I can show my list this way, any kind of ideas or hint is highly appreciated.

Thanks


回答1:


See this coverflow widget, It's works like a listView so it is very simple to use :

http://www.inter-fuser.com/2010/01/android-coverflow-widget.html

Steps :

  • Import library classes on your classpath
  • Instead of ListView, use CoverFlow;
  • Write your coverflowAdapter, here it will contains only images (see sample code from link)
  • Set the adapter to your coverflow

Hope it helps !



来源:https://stackoverflow.com/questions/21905049/how-to-create-a-horizontal-carousel-view-in-android

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!