Pinterest的网格状Android中 [英] Pinterest like Grid in Android

查看:76
本文介绍了Pinterest的网格状Android中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立像在Pinterest的应用程序在Android上的网格。

I want to build a grid like the one in Pinterest app on Android.

我开始延伸的适配器视图< ListAdapter> ,但我不能做很多事情的工作(例如overscroll效果),因此,放弃这个想法后,延长 AbsListView ,现在我开始以为这是更好地扩展的ListView 并覆盖 layoutChildren()方法。

I started extending an AdapterView<ListAdapter> but I cannot make many things working (for example the overscroll effect) so, after abandoning the idea to extend AbsListView, now I am starting thinking it is better to extend a ListView and override the layoutChildren() method.

你怎么看?

感谢

推荐答案

我已经通过复制和更新Android的StaggeredGridView解决了这个。 <一href="https://github.com/maurycyw/StaggeredGridView">https://github.com/maurycyw/StaggeredGridView 。好像创造你正在寻找的影响工作的伟大。在此之前,我去了复制Android的源代码,以独立的库(这是我得到的工作)的兔子洞,直到我看到了现在的实验StaggeredGridView。它比我老BrickView库项目要简单得多,所以我取代了它。

I have solved this by copying and updating Android's StaggeredGridView. https://github.com/maurycyw/StaggeredGridView . Seems to work great for creating the effect you are looking for. Before this I went down the rabbit hole of copying Android's source to a separate library (which I got working) until I saw the now experimental StaggeredGridView. It is much simpler than my old "BrickView" library project so I replaced it.

这篇关于Pinterest的网格状Android中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆