Files
android_development/tools/layoutopt/libs/uix/src/resources/rules/TooManyViews.rule
Romain Guy 3958d08fd4 New layout optimization tool. Run layoutopt on the command line.
Change-Id: I8e4697e19ca8a203dc8a41b464f7cb46d52184b0
2009-10-05 03:48:33 -07:00

11 lines
270 B
Plaintext

// Rule: TooManyViews
//
// Description: Checks whether the layout has too many views.
//
// Conditions:
// - The document contains more than 80 views
if (xml.isRoot && (size = xml.'**'.size()) > 80) {
analysis << "This layout has too many views: ${size} views!"
}