Skip to content

Theming

Christopher O'Brien edited this page Jul 1, 2021 · 1 revision

Theming

Changing your app theme to inherit from Theme.Components or Theme.Components.ActionBar is the recommended approach:

<style name="Theme.MyApp" parent="@style/Theme.Components">
...
</style>

If you cannot change your theme to inherit from Theme.Components, inherit from a Material Components theme and set the following attributes:

<style name="Theme.MyApp" parent="@style/Theme.MaterialComponents.DayNight">
  <item name="colorError">@color/hmrc_red</item>
  <item name="materialTextButtonStyle">@style/MaterialTextButtonNoInset</item>
  <item name="materialIconButtonStyle">@style/MaterialTextIconButtonNoInset</item>
  <item name="materialCardViewStyle">@style/Widget.Components.CardView</item>
</style>
Clone this wiki locally