ScribbleToolbar.java 文件源码

java
阅读 38 收藏 0 点赞 0 评论 0

项目:PeSanKita-android 作者:
private void setBrushSelected(boolean enabled) {
  if (enabled) {

    this.textView.setBackground(null);
    this.textView.setColorFilter(new PorterDuffColorFilter(foregroundUnselectedTint, PorterDuff.Mode.MULTIPLY));

    this.brushView.setBackground(background);
    this.brushView.setColorFilter(new PorterDuffColorFilter(foregroundSelectedTint, PorterDuff.Mode.MULTIPLY));

    this.stickerView.setBackground(null);
    this.stickerView.setColorFilter(new PorterDuffColorFilter(foregroundUnselectedTint, PorterDuff.Mode.MULTIPLY));

    this.separatorView.setVisibility(View.VISIBLE);
    this.undoView.setVisibility(View.VISIBLE);
    this.deleteView.setVisibility(View.GONE);

    this.selected = Selected.BRUSH;
  } else {
    this.brushView.setBackground(null);
    this.brushView.setColorFilter(new PorterDuffColorFilter(foregroundUnselectedTint, PorterDuff.Mode.MULTIPLY));
    this.separatorView.setVisibility(View.GONE);
    this.undoView.setVisibility(View.GONE);

    this.selected = Selected.NONE;
  }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号