Android的preventing双击一个微调 [英] Android Preventing Double Click On A Spinner
问题描述
我默认情况下,微调视图不必要的问题。
I have an unwanted problem by default in spinner view.
在Android 2.2的时候我双击它打开任何两次微调,在pressing后退按钮第二微调关闭,但一日一保持打开状态。
On Android 2.2 when I double click any spinner it opens twice, Upon pressing the back button the 2nd spinner closes but 1st one remains open.
我需要一个修复此问题。
I need a fix for this issue.
我只想微调显示一次不管用户多少次点击它。
I only want the spinner to show once regardless of how many times the user clicks it.
此问题不会在Android 4.0以上版本存在。
This problem doesn't exist in Android 4.0+.
有没有办法来解决这个bug?
Is there a way to fix this bug?
推荐答案
您可以使用的的setEnabled(假)项目上首次prevent进一步互动时用户点击,使的的setEnabled(真)当您需要。
You can use setEnabled(false) when user click on item first time to prevent further interaction, and make setEnabled(true) when you need.
这篇关于Android的preventing双击一个微调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!