开发者

Losing focus at buttons in android application

I made one simple android application and I notice next problem: I have several controls with attached click (or i say touch) event (buttons, imageviews). Some of them are loaded from android xml file, and some I make "in fly".

Now when I scroll screen, I must 2 time click on button to make effect (click event). It seems to me that this have some co开发者_JAVA技巧nnection with losing focus. Am I right and how to solve it? I want just one click to execute some operation.

This happen only on real device (HTC Wildfire). In emulator there is no this problem.

Thanks!


Do you, by any chance, have

android:focusableInTouchMode="true"

for the Button? Because this will cause the button to need one touch to gain focus and another one to fire the click.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜