简体   繁体   English

我如何在 Android 中实现类似垂直 ViewPager 的功能?

[英]How can i achieve something like a vertical ViewPager in Android?

It may not be a great question but i am asking for some help.这可能不是一个好问题,但我正在寻求帮助。 I am not a pro so please if anything is unclear post a comment and i will try to explain.我不是专业人士,所以如果有任何不清楚的地方请发表评论,我会尽力解释。 I have an activity where i have a full screen ImageView where over it i have a couple of texts and an other overlayed imageview, i want when i swipe up to send the whole view upwards and to show from below a simillar view but with different image, i don't need to detect swipe gesture, i need the view to track my finger's Y (vertical value) , and as i have my images into an array , how can i create the same view for each image ?我有一个活动,我有一个全屏 ImageView,在它上面我有几个文本和一个其他叠加的 imageview,我想当我向上滑动以向上发送整个视图并从下面显示一个类似的视图但具有不同的图像,我不需要检测滑动手势,我需要视图来跟踪我手指的 Y(垂直值),并且由于我将图像放入数组中,我如何为每个图像创建相同的视图? I am not using adapter and as i know adapters works only with gridview and listviews, please if someone knows help me !我没有使用适配器,因为我知道适配器仅适用于 gridview 和 listviews,如果有人知道请帮助我!

尝试使用 RecyclerView 我认为它可以做你想做的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM