This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal fun createErrorThemesAndStylesIssue(detectorClass: KClass<out Detector>, scope: EnumSet<Scope>): Issue { | |
return createThemesAndStylesIssue(detectorClass, Severity.ERROR, scope) | |
} | |
internal fun createWarningThemesAndStylesIssue(detectorClass: KClass<out Detector>, scope: EnumSet<Scope>): Issue { | |
return createThemesAndStylesIssue(detectorClass, Severity.WARNING, scope) | |
} | |
private fun createThemesAndStylesIssue( | |
detectorClass: KClass<out Detector>, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal class StyleAttrUsesThemeDetector : ResourceXmlDetector() { | |
companion object { | |
val ISSUE = createErrorThemesAndStylesIssue(StyleAttrUsesThemeDetector::class, Scope.RESOURCE_FILE_SCOPE) | |
} | |
override fun appliesTo(folderType: ResourceFolderType) = folderType == ResourceFolderType.LAYOUT | |
override fun getApplicableAttributes(): Collection<String> = XmlScannerConstants.ALL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style name="ThemeOverlay.Monzo.MonzoButton.Pill" parent=""> | |
<!-- any value larger than `button.height / 2` --> | |
<item name="monzoButtonCornerRadius">1000dp</item> | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style name="Widget.Monzo.CompoundButton.CheckBox" parent="Widget.MaterialComponents.CompoundButton.CheckBox"> | |
<item name="android:textColor">?attr/mdsColorPrimaryContent</item> | |
<item name="materialThemeOverlay">@style/ThemeOverlay.Monzo.CompoundButton</item> | |
</style> | |
<style name="Widget.Monzo.CompoundButton.RadioButton" parent="Widget.MaterialComponents.CompoundButton.RadioButton"> | |
<item name="android:textColor">?attr/mdsColorPrimaryContent</item> | |
<item name="materialThemeOverlay">@style/ThemeOverlay.Monzo.CompoundButton</item> | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style name="ThemeOverlay.Monzo.CompoundButton" parent=""> | |
<item name="colorSecondary">?attr/mdsColorBlueTint</item> | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<androidx.appcompat.widget.Toolbar | |
android:id="@+id/loanCalculatorToolbar" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:theme="@style/ThemeOverlay.Monzo.Toolbar.LoansNavy" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style name="ThemeOverlay.Monzo.Toolbar.Loans" parent=""> | |
<item name="colorPrimary">@color/navy</item> | |
<item name="colorOnPrimary">@color/white</item> | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<style name="Widget.Monzo.CompoundButton.CheckBox.OnLight" /> | |
<style name="Widget.Monzo.CompoundButton.CheckBox.OnDark" /> | |
</resources> |