在里面的按钮,直到第二次点击内的任何键无反应的滚动型问题 [英] Problem in a ScrollView with Buttons inside, no response until second click on any button inside

查看:121
本文介绍了在里面的按钮,直到第二次点击内的任何键无反应的滚动型问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经几天试图解决这件事,但我can'f看着办吧。问题是,简单的活动,用简单的布局,滚动型 - >的LinearLayout - >和大量的布局(滚动的内容内)内的按钮。一切都工作得很好,但有一件棘手的事情。当我点击一个按钮,让我们说,在滚动内容的顶部和inmediatelly我向下滚动到内容的底部,我点击另一个按钮在那里,没有任何反应,直到我点击了第二次和所有前来正常了。这可以随时复制,它是code独立的(我试过超过20个场景)。我已经没有多少经验的Andr​​oid,不过也貌似滚动监听站的onclick监听器或类似的东西。任何帮助,这将是多大的preciated。谢谢你在前进。

I've been a couple of days trying to solve this thing but I can'f figure it out. The problem is, simple activity, with simple layout, ScrollView -> LinearLayout -> and a lot of buttons inside the layout (within the scroll content). Everything works just fine but one tricky thing. When I click a button let's say at the top of the scroll content and inmediatelly I scroll down to the bottom of the content and I click other button there, nothing happens until I click a second time and all come to normal again. This can be reproduced anytime and it's code independent (i've tried more than 20 scenarios). I've not much experience in android yet but looks like the scroll listener stops the onclick listener or something like that. Any help with this would be much apreciated. Thank you in advance.

PD。如果我做编程,而不是手动滚动一个scrollTo()与我的手指都工作得很好,然后点击响应的第一次触球。它只是压倒我。

PD. If i programatically do a scrollTo() instead of manual scroll with my fingers everything works just fine and click responds at first touch. It's simply overwhelming me.

推荐答案

一切行为正常。

当你开始滚动,在滚动型会声称触摸事件,直至停止触摸屏幕一会儿。在Android 2.2系统,你就会知道,当滚动被认为是完整的,因为右边的滚动条将消失。

When you start scrolling, the ScrollView will claim touch events until you stop touching the screen for a bit. In Android 2.2, you will know when scrolling is deemed complete, because the scrollbar on the right will fade away.

这篇关于在里面的按钮,直到第二次点击内的任何键无反应的滚动型问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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