gangwa Gazi gangwa Gazi - 7 months ago 9
Java Question

Changing the Toolbar From App

Changing the toolbar theme look and feel from application below is the my default theme as I have tried many themes but it doesn't change the toolbar theme.

This is my default theme

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar>

Answer

You can define the custom theme like below and style it , based on your logic you can call setTheme(R.style.customTheme)

 <style name="customTheme" parent="Theme.AppCompat.Light.DarkActionBar">
   //customize the theme here 
    <item name="colorPrimary">@color/colorPrimary</item>
</style>

cheers!