[英]How to implement autoscroll horizontal listView (or view) supports onClick() (or onItemClick()) on each item (or view)
I need a widget like a horizontal images slider that scroll from right to left automatically. 我需要一个像水平图像滑块这样的小部件,它会自动从右向左滚动。 When I click on a image (an item) I retrieve full-size activity contains the image. 当我单击图像(项目)时,我检索包含图像的全尺寸活动。
Customizing Android UI widgets/APIs is interesting and hard for me. 自定义Android UI小部件/ API对我来说很有趣并且很难。
Can you give me the implementation and I use it as "black-box"? 能否给我实现并将其用作“黑匣子”?
尝试使用Gallery或ViewSwitcher类,它使您的案子更容易完成。
Try RecyclerView 试试RecyclerView
It has horizontal scroll 它具有水平滚动
https://github.com/googlesamples/android-RecyclerView https://github.com/googlesamples/android-RecyclerView
https://developer.android.com/training/material/lists-cards.html https://developer.android.com/training/material/lists-cards.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.