[英]Implementing a list that is both vertically & horizontally scrollable
I have a question related to Android app UI implementation. 我有一个与Android应用程序UI实施相关的问题。 The UI I want to implement is very similar to the Slideshare app UI, which I've attached below:
我要实现的UI与Slideshare应用程序UI非常相似,我在下面附加了该UI:
Apologies for the size of the image. 对于图片大小表示歉意。 But basically I want to implement a vertical list , and each item within the list is another horizontal list of sub-items .
但是基本上我想实现一个垂直列表 ,并且列表中的每个项目都是另一个水平的子项目列表 。
My current plan of approach is implementing a vertical RecyclerView
, and then implementing each item of the list as a horizontal RecyclerView
(basically a 2-Dimensional RecyclerView)
. 我当前的方法计划是实现一个垂直
RecyclerView
,然后将列表中的每个项目实现为一个水平RecyclerView
(基本上是一个二维RecyclerView)
。
Am I on the right track here? 我在正确的轨道上吗? I apologise I cannot provide any code because I am still in the design phase .
对不起,我无法提供任何代码,因为我仍处于设计阶段 。 I do not want any code solutions but rather a guide or small tips as to how to approach implementing such UI.
我不需要任何代码解决方案,而是想要获得有关如何实现此类UI的指南或小技巧 。
Thank you for your time reading this question. 感谢您花时间阅读此问题。 Any tips would be highly appreciated!
任何提示将不胜感激!
You can use TwoWayView library to implement this scenario for bot horizontal and vertical listviews or you can use RecyclerView. 您可以使用TwoWayView库为bot水平和垂直列表视图实现此方案,也可以使用RecyclerView。
TwoWayView Library: https://github.com/lucasr/twoway-view/ TwoWayView库: https : //github.com/lucasr/twoway-view/
TwoWayView Samples: https://github.com/lucasr/twoway-view/tree/master/sample TwoWayView示例: https : //github.com/lucasr/twoway-view/tree/master/sample
You can read a great tutorial about how to implement this on on this Github page . 您可以在Github页面上阅读有关如何实现此功能的出色教程。
You can take a look at VerticalHorizontalListView and twoway-view and of course this link might be a help, which explains how to implement Dynamic Shelfview in Android. 您可以看一下VerticalHorizontalListView和twoway-view ,当然此链接可能会有所帮助,它说明了如何在Android中实现Dynamic Shelfview。
I found this answer on SO : Horizontal ScrollView in List View Item Android which explains the issue prefectly, you can take a look at that too. 我在SO上找到了这个答案: Android的“列表视图项”中的Horizontal ScrollView可以完美地说明问题,您也可以查看一下。 I hope this links help you ;)
希望此链接对您有所帮助;)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.