Can we change colorPrimary & colorPrimaryDark programmatically according to the condition?
<p>I'm developing an Android application in which I want to change the color scheme according the network status. For example if network connection is available the app theme will be green and if network connection is not available then it will be red.. Please ignore the action bar elevation. For example: <a href="https://i.stack.imgur.com/FgRi5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FgRi5.png" alt="enter image description here"></a><a href="https://i.stack.imgur.com/J90UQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J90UQ.png" alt="enter image description here"></a></p>