OSDN Git Service
(root)
/
android-x86
/
development.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add new rules to layoutopt: UseCompoundDrawables and UselessLayout.
[android-x86/development.git]
/
tools
/
layoutopt
/
libs
/
uix
/
src
/
resources
/
rules
/
TooManyViews.rule
1
// Rule: TooManyViews
2
//
3
// Description: Checks whether the layout has too many views.
4
//
5
// Conditions:
6
// - The document contains more than 80 views
7
8
if (xml.isRoot && (size = xml.'**'.size()) > 80) {
9
analysis << "This layout has too many views: ${size} views, it should have <= 80!"
10
}