"focusable"和"clickable"之间的区别 [英] difference between `focusable` and `clickable`
本文介绍了"focusable"和"clickable"之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Android中clickable
和focusable
有什么区别?
What is the difference between clickable
and focusable
in android?
推荐答案
Clickable
意味着可以通过指针设备单击它,也可以通过触摸设备点击它. Focusable
表示它可以从键盘等输入设备获得焦点.像键盘这样的输入设备无法根据输入本身来决定将输入事件发送到哪个视图,因此它们会将它们发送到具有 focus 的视图.
Clickable
means that it can be clicked by a pointer device or be tapped by a touch device. Focusable
means that it can gain the focus from an input device like a keyboard. Input devices like keyboards cannot decide which view to send its input events to based on the inputs itself, so they send them to the view that has focus.
这篇关于"focusable"和"clickable"之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文