Skip to content

Commit

Permalink
Added Theme.Components.ActionBar style to allow consuming aps to use … (
Browse files Browse the repository at this point in the history
  • Loading branch information
lojbrooks authored Nov 6, 2020
1 parent d36cd32 commit 7934a84
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ Allowed headings:
-->

## [Unreleased]
- Adding `fastlane` release process

* Added `Theme.Components.ActionBar` style to allow consuming apps to use action bar style
* Added `fastlane` release process

## [3.4.6] - 2020-09-10

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The latest release can be found [here](https://github.com/hmrc/android-component

## Theming

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

```xml
<style name="Theme.MyApp" parent="@style/Theme.Components">
Expand Down
8 changes: 8 additions & 0 deletions components/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
<item name="materialCardViewStyle">@style/Widget.Components.CardView</item>
</style>

<style name="Theme.Components.ActionBar" parent="@style/Theme.MaterialComponents.DayNight.DarkActionBar">
<item name="colorError">@color/hmrc_red</item>
<item name="textAppearanceButton">@style/Text.Button</item>
<item name="materialTextButtonStyle">@style/MaterialTextButtonNoInset</item>
<item name="materialIconButtonStyle">@style/MaterialTextIconButtonNoInset</item>
<item name="materialCardViewStyle">@style/Widget.Components.CardView</item>
</style>

<style name="MaterialTextButtonNoInset" parent="@style/Widget.MaterialComponents.Button.TextButton">
<item name="android:insetTop">0dp</item>
<item name="android:insetBottom">0dp</item>
Expand Down

0 comments on commit 7934a84

Please sign in to comment.