btnCall.setClickable(false);
我将此代码用于设置,但我想获取它。
谁知道答案请推荐给我?
最佳答案
下面是如何获取 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
...
}
关于java - 如何在android上获取imageButton的可点击状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27856028/