【发布时间】:2015-01-09 07:50:13
【问题描述】:
btnCall.setClickable(false);
我使用此代码进行设置,但我想得到它。
谁知道答案请建议我?
【问题讨论】:
-
学习Accept Answers 如果答案没有帮助,那么就问题发表评论!如果有用,请接受我的回答..
标签: java android eclipse imagebutton clickable
btnCall.setClickable(false);
我使用此代码进行设置,但我想得到它。
谁知道答案请建议我?
【问题讨论】:
标签: java android eclipse imagebutton clickable
这里是如何获取ImageButton的可点击状态:
ImageButton myButton = (ImageButton) findViewById(R.id.button1);
myButton.setClickable(false);
// if clickable is false
if (myButton.isClickable() == false) {
Log.i("MyButton", "Clickable is false");
// do your things here
...
}
// if clickable is true
if (myButton.isClickable() == true) {
Log.i("MyButton", "Clickable is true");
// do your things here
...
}
【讨论】:
这是针对安卓的,因为你在标题中提到了!
如果您想知道ImageButton 是否可点击..
boolean status = btnCall.isClickable(); // will return true if its clickable, false otherwise
【讨论】: