I want to change my application\'s theme in code , so i google it ...
Unfortunately, i can\'t find any method to **
You can not do this via code.
You can set a default theme with this attribute.
In the activity where you want to change the color, simply create another theme that inherits the default theme, but this new theme you put another color for coloAccent
Default Theme:
<item name="colorPrimary">@color/default_color_app</item>
<item name="colorPrimaryDark">@color/default_color_app_dark</item>
<item name="colorAccent">@color/default_color_app_dark</item>
Another Activity:
<style name="BaseTheme.AnotherActivity" parent="BaseTheme">
<item name="colorAccent">@color/another_color</item>
</style>