Android的ListView控件一样滚动没有的ListView [英] Android ListView-like scrolling WITHOUT the ListView

查看:168
本文介绍了Android的ListView控件一样滚动没有的ListView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在谷歌搜索像疯了似的,而现在,我根本无法找到问题的任何答案:是有可能实现Android的滚动列表,而无需使用实际列表界面

I've been Googling like crazy for a while now, and I simply can't find any answers to the question: is it possible to implement the Android List scrolling, without using an actual list UI?

我试图使矩形网格 如你会发现在一个典型的游戏应用程序中的一种以同样的方式回应手指运动它确实采用Android名单(适用于边界的反弹中,甩尾效应等),但我已经找到了办法涉及过于复杂,涉及扩大名单的解决方案,定义XML布局等。

I'm trying to make a grid of rectangles such as the kind you would find in a typical game app respond to finger movement in the same way that it does using Android lists (bounce on the bounds, the 'flick' effect, etc), but all of the approaches I've found involve over-complicated solutions involving extending the list, defining XML layouts, etc.

难道是不可能的,轻易地放弃了文件高度'可视'高度的对象变量和 Y轴偏移量?我很高兴地给三角洲(MS自上次更新)的对象上的每个更新。这也将是一件好事,如果实际的互动区域也可定义的。

Would it not be possible to simply give an object variables for 'document' height, 'viewable' height and y-offset? I'm happy to give the delta (MS since last update) to the object on every update. It would also be good if the actual interactive region was also definable.

此外,在那里,而不是用我失踪ListView的强劲优势?我想回应进场,但我很愉快手动管理,在那一刻。

推荐答案

只需使用滚动型直接,假设你只需要垂直滚动。

Just use ScrollView directly, assuming you only need vertical scrolling.

这篇关于Android的ListView控件一样滚动没有的ListView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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