Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我找不到获取“焦点从编辑文本中退出”事件的方法(在“焦点进入编辑文本”下方)。我找到了事件 OnFocusChange,但它被调用两次,进入和退出编辑,我希望该事件调用的函数被调用一次。我怎样才能做到这一点?
OnFocusChange方法有两个参数,第二个参数boolean hasFocus不是你需要的吗?如果是true,则意味着进入焦点,您可以在那里编写代码。
OnFocusChange
boolean hasFocus
true
如果我误解了,请告诉我