So inside of side_nav_bar.xml
is this:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
android:id="@+id/colorNav">
<solid android:color="@color/colorPrimary"/>
</shape>
For use when using navigation drawer layout. I was wondering if there is a way to dynamically change this color inside of a fragment. For example, I have a settings fragment where the user can pick three different themes. I would like this side_nav_bar.xml shape color to match the theme. I can't figure out how to reference it programmatically in the code.
Example image below. I want that pink to change based on theme choice.