本文整理了Java中android.widget.ImageButton.isEnabled()
方法的一些代码示例,展示了ImageButton.isEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ImageButton.isEnabled()
方法的具体详情如下:
包路径:android.widget.ImageButton
类名称:ImageButton
方法名:isEnabled
暂无
代码示例来源:origin: mkulesh/microMathematics
protected void setButtonEnabled(ImageButton b, boolean isEnabled)
{
b.setEnabled(isEnabled);
ViewUtils.setImageButtonColorAttr(getContext(), b,
b.isEnabled() ? R.attr.colorDialogContent : R.attr.colorDialogDisabledElement);
}
代码示例来源:origin: cbeyls/fosdem-companion-android
@Override
public void onChanged(BookmarkStatus bookmarkStatus) {
if (bookmarkStatus == null) {
imageButton.setEnabled(false);
imageButton.setImageResource(R.drawable.ic_bookmark_outline_white_24dp);
} else {
// Only animate updates, when the button was already enabled
final boolean animate = bookmarkStatus.isUpdate() && imageButton.isEnabled();
imageButton.setEnabled(true);
if (bookmarkStatus.isBookmarked()) {
imageButton.setContentDescription(imageButton.getContext().getString(R.string.remove_bookmark));
imageButton.setImageResource(animate ? R.drawable.avd_bookmark_add_24dp : R.drawable.ic_bookmark_white_24dp);
} else {
imageButton.setContentDescription(imageButton.getContext().getString(R.string.add_bookmark));
imageButton.setImageResource(animate ? R.drawable.avd_bookmark_remove_24dp : R.drawable.ic_bookmark_outline_white_24dp);
}
final Drawable drawable = imageButton.getDrawable();
if (drawable instanceof Animatable) {
((Animatable) drawable).start();
}
}
}
});
代码示例来源:origin: mkulesh/microMathematics
b.setOnLongClickListener(this);
setButtonEnabled(b, pointShapesBox.isChecked());
if (b.isEnabled())
内容来源于网络,如有侵权,请联系作者删除!