Android - 如何锁定(冻结)图库组件?
我有一个画廊和它下面的列表视图。
当用户浏览图库时,会从 Internet 下载新项目并将其添加到列表视图中。问题是:我不想允许用户在其列表视图尚未加载时将图库滚动到下一个项目。我知道这不是用户想要的,但我在这里被迫使用的组件(SOAP 组件)只给我留下了这个选项。
请注意,UI 只会被部分阻止,也就是说,只要 Internet 请求持续,只有图库组件会被阻止。列表视图永远不会被阻止。
那么,如何阻止画廊的移动?
先感谢您! =)
I have a gallery and a listview right below it.
As the user goes through the gallery, new items are downloaded from the Internet and added to the listview. The thing is: I don't want to allow the user to scroll the gallery to the next item while its listview has not yet loaded. I know that that is not what the user want but the component that I'm forced to use here (a SOAP one) only left me with that option.
Pay attention that the UI will only be partially blocked, that is, only the gallery component will be blocked for as long as the Internet request last. The listview will never be blocked.
So, how do I block the movement of a gallery?
Thank you in advance! =)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查这篇文章:如何禁用图库视图滚动
如果我已经明白正确的你想要什么了!
check this post: how to disable gallery view scrolling
It may help you if I have understand correct what you want!
您可以尝试在图库视图上调用 setEnabled() : http:// /developer.android.com/reference/android/view/View.html#setEnabled(boolean)。
当您不希望它可移动时将其设置为禁用,当网络连接完成时您可以重新启用它。 。
You could try calling setEnabled() on the gallery view : http://developer.android.com/reference/android/view/View.html#setEnabled(boolean).
When you don't want it moveable set it to disabled, when the network connection finishes you can re-enable it.