本文介绍了Android的 - 听禁用按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎么能对事件作出响应的基础上点击禁用按钮
。
我有我有一个要求present 对话框
,禁用按钮
被点击时,但听者我已指定不火,甚至当我 setClickable(假)
How can I respond to an event based on clicking a disabled Button
.I have a requirement that I have to present Dialog
, when a disabled Button
is clicked but the listener I have assigned does not fire even when I setClickable(false)
是一个Android的小白,对不起。
Am an android noob, sorry.
推荐答案
禁用的按钮不能听任何事件,但你可以通过扩展定制你自己的按钮按钮
类使禁用的您自己的定义。
A disabled button cannot listen to any event, but you can customize your own button by extending Button
class to make your own definition of disabling
这篇关于Android的 - 听禁用按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!