【问题标题】:Android Action Bar Style Generator : Change text color of action bar not available?Android 操作栏样式生成器:更改操作栏的文本颜色不可用?
【发布时间】:2014-08-19 07:48:36
【问题描述】:

【问题讨论】:

    标签: android android-actionbar android-tabs android-styles


    【解决方案1】:

    你可以用这个:

    int actionBarTitleId = Resources.getSystem().getIdentifier("action_bar_title", "id", "android");
    if (actionBarTitleId > 0) {
        TextView title = (TextView) findViewById(actionBarTitleId);
        if (title != null) {
            title.setTextColor(Color.RED);
        }
    }
    

    Actionbar (actionBarTitleId) 上获取textView 的ID,然后做你想做的事。改变大小、颜色和....

    如果您想使用样式并了解更多信息,请参阅This Thread

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-18
      • 2013-09-06
      • 1970-01-01
      • 2015-07-11
      • 1970-01-01
      • 2023-03-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多