我无法以编程方式为v11及更高版本更改机器人动作栏标题颜色.我可以在xml中完成它,但需要在代码中动态更改它.我该怎么办呢?提前致谢.
我的代码是:
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
app:theme="@style/Toolbar_Theme"/>
Run Code Online (Sandbox Code Playgroud)
我想在java代码中更改app:theme.我能找到toolbar.setTheme用于改变工具栏样式的方法吗?