private void setButton(Button button, Message message, int index) {
List<Action> actions = message.getActions();
if (index >= actions.size()) {
button.setVisibility(View.GONE);
return;
}
Action action = (Action) actions.get(index);
button.setOnClickListener(null);
button.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
button.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, 0, 0);
button.setVisibility(View.VISIBLE);
Drawable icon = getActionIcon(message.getAppId(), action.icon);
icon.setColorFilter(new LightingColorFilter(ViewCompat.MEASURED_STATE_MASK, 6914181));
button.setCompoundDrawablesRelativeWithIntrinsicBounds(icon, null, null, null);
button.setText(action.title);
}
OverlayNotificationBarView.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:NoticeDog
作者:
评论列表
文章目录