Last active
July 29, 2019 16:04
-
-
Save saurabharora90/4094d4146647cccf6512fa03750a4e30 to your computer and use it in GitHub Desktop.
Dark Theme Lint Checks
This file contains hidden or 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
object DirectColorUseIssue { | |
private const val ID = "DirectColorUse" | |
private const val DESCRIPTION = "Color used directly" | |
const val EXPLANATION = | |
'''Avoid direct use of colors in XML files. | |
This will cause issues with different theme (dark-theme?) support''' | |
private val CATEGORY = Category.CORRECTNESS | |
private const val PRIORITY = 6 | |
private val SEVERITY = Severity.WARNING | |
val ISSUE = Issue.create( | |
ID, | |
DESCRIPTION, | |
EXPLANATION, | |
CATEGORY, | |
PRIORITY, | |
SEVERITY, | |
Implementation( | |
DirectColorUseDetector::class.java, | |
Scope.RESOURCE_FILE_SCOPE | |
) | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment