1 // Rule: IncorrectWidthInScrollView 2 // 3 // Description: Checks whether a scrollview's child has the wrong dimension. 4 // 5 // Conditions: 6 // - The node has a HorizontalScrollView parent 7 // - The node has a width set to match_parent 8 9 if (node.'..'.is("HorizontalScrollView") && node.isWidthFillParent()) { 10 analysis << "This ${node.name()} tag should use android:layout_width=\"wrap_content\"" 11 } 12