[英]How to replicate Facebook Album Gallery (android)
I was wondering how can I replicate the sideways gallery like the facebook mobile app but being able to scroll down the feed anytime I want. 我想知道如何像Facebook移动应用程序那样复制侧向画廊,但是我可以随时向下滚动提要。
I was thinking about "listening" for side-swypes and replacing the current ImageView but that doesn't sound like an elegant solution. 我当时正在考虑“侦听”侧扫,并替换当前的ImageView,但这听起来并不是一个优雅的解决方案。
I searched for awhile and didn't find any library worth using 我搜索了一段时间,没有找到值得使用的图书馆
Is there any library or do you have any idea how to do it? 有图书馆吗,或者您不知道该怎么做?
You could use the ViewPager
component. 您可以使用
ViewPager
组件。 Reference: http://developer.android.com/reference/android/support/v4/view/ViewPager.html 参考: http : //developer.android.com/reference/android/support/v4/view/ViewPager.html
Here are some tutorial that can help you get started: 以下是一些可以帮助您入门的教程:
1) http://androidtrainningcenter.blogspot.sg/2012/10/viewpager-example-in-android.html 1) http://androidtrainningcenter.blogspot.sg/2012/10/viewpager-example-in-android.html
2) http://manishkpr.webheavens.com/android-viewpager-as-image-slide-gallery-swipe-gallery/ 2) http://manishkpr.webheavens.com/android-viewpager-as-image-slide-gallery-swipe-gallery/
Take a look at: similar question ! 看看: 类似的问题 !
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.