===============eoeAndroid社区推荐:======================= 使用Android自带Gallery组件实现CoverFlow,源码+解析 http://www.eoeandroid.com/thread-39709-1-1.html 代码仓库 会员贡献索引贴 http://www.eoeandroid.com/thread-21964-1-1.html Android Gallery3D源码分析(一) http://www.eoeandroid.com/thread-83537-1-1.html ===============帖子正文============================== 在android 实现显示文字的Gallery和Android修改Gallery页面布局的基础上,利用Gallery实现了CoverFlow效果,如下: 项目代码结构如下: layout_gallery.xml是Gallery的布局文件: android:spacing="-60px" 图片之间的间距。ActivityMain主要代码如下: 其中: 实现了图片的倒影效果,参见:android实现图片的倒影效果。GalleryFlow实现了图片的3D旋转效果:下边的方法是根据传入的角度,做图片的旋转:实现根据图片的不同位置,确定旋转角度: 整体效果还不是很好,并不是真正的CoverFlow,需要进一步改进。源码见: android-coverflow.rar |
Android自定义Gallery,实现CoverFlow效果
最新推荐文章于 2024-08-21 09:01:55 发布