BaseThemedActivity.java 文件源码

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

项目:polar-dashboard 作者:
@SuppressLint("PrivateResource")
@Override
protected void onStart() {
  super.onStart();
  final Toolbar toolbar = getToolbar();
  if (toolbar != null) {
    final int titleColor = DialogUtils.resolveColor(this, R.attr.toolbar_title_color);
    final int iconColor = DialogUtils.resolveColor(this, R.attr.toolbar_icons_color);
    toolbar.setTitleTextColor(titleColor);
    Utils.setOverflowButtonColor(this, iconColor);

    if (TintUtils.isColorLight(titleColor)) {
      toolbar.setPopupTheme(R.style.ThemeOverlay_AppCompat_Light);
    } else {
      toolbar.setPopupTheme(R.style.ThemeOverlay_AppCompat);
    }
  }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号