I am really struggling in theming my android application, i can't understand that how the theme and styles are structured in android, and when to use theme or style for the views.
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.HickersWatch" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
this is the default theme provided, now what are these things doing like
and rest them, where the code is written for Theme.MaterialComponents.DayNight.DarkActionBar as we are inheriting here. I think i roughly summarise my issue, if this makes sense to anyone of the viewer of this question so please share some **resource** so that i can understand these things (android official doc did not helped me this time), or their **own** solution then please share.