Consistent Design with Custom Lint Checks
summary
Android teams extend Android Lint (over 300 built-in checks exist) with small, targeted detectors that enforce design rules: hard-coded hex colors in layouts get flagged and pointed to company color resources, elevation values must use company dimens, text sizes map to approved textAppearance styles, and a check will detect Android Toast usage and recommend an internal toast. Demos show a resource XML detector that scans layout files, overrides getApplicableAttributes and visitAttribute, checks values starting with “#”, reports warnings, and runs on CI and in Android Studio.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:06What is lint
- 2:30Custom lint for design
- 8:32Demo overview
- 9:36Creating XML lint check
- 14:33Creating code lint check
- 17:25Advanced lint checks
- 18:49Resources and links
- 19:32Q&A
related talks
15mClean Code Base: Harnessing the Power of Android Lint and Custom Rules
20mClean Code Base: Harnessing the Power of Android Lint and Custom Rules
46mLint for Life: Your Customizable Guard On the Go
21mMastering Code Quality: A Deep Dive into Custom Linting for Android Developers
19mThe power of custom lint checks
44mLint. What, Why, How?
21mGetting the most out of Android Lint
43mLinty Fresh
