简体   繁体   English

Facebook 时间线像列表视图

[英]Facebook timeline like listview

The Facebook timeline seems to display all the feeds in the listview vertically. Facebook 时间线似乎垂直显示列表视图中的所有提要。 When the user shares his/her multiple photos, then those photos are displayed in horizontal list view.当用户分享他/她的多张照片时,这些照片将显示在水平列表视图中。 Has anybody any idea, how this actually works.有没有人知道这实际上是如何工作的。 Because I don't think nesting a horizontal listview within vertical listview works.因为我认为在垂直列表视图中嵌套水平列表视图不起作用。 Nor does the horizontal listview functions smoothly within the vertical scrollbar.水平列表视图在垂直滚动条内也不能顺利运行。 So, if anybody has any idea about how Facebook implements its views in timeline, do share it here.因此,如果有人对 Facebook 如何在时间轴中实现其视图有任何想法,请在此处分享。

您可以在垂直列表视图中使用viewpager。演示在此链接演示项目中给出,并在此处进行了详细说明

To use a gallery for the photos check out that example: https://stackoverflow.com/a/11544447/944070要为照片使用图库,请查看该示例: https : //stackoverflow.com/a/11544447/944070

You may also need an implementation of different list items per case, so this answer would also be helpful https://stackoverflow.com/a/3515221/944070您可能还需要为每个案例实现不同的列表项,所以这个答案也会有帮助https://stackoverflow.com/a/3515221/944070

That can be done using custom list view.这可以使用自定义列表视图来完成。 Below tutorial covers facebook like feed view using volley networking library下面的教程介绍了使用 volley 网络库的 facebook like feed 视图

Android Facebook like Custom ListView Feed using Volley Android Facebook 喜欢使用 Volley 的自定义 ListView Feed

在此处输入图片说明

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

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