// Rule: IncorrectWidthInScrollView | |
// | |
// Description: Checks whether a scrollview's child has the wrong dimension. | |
// | |
// Conditions: | |
// - The node has a HorizontalScrollView parent | |
// - The node has a width set to fill_parent | |
if (node.'..'.is("HorizontalScrollView") && node.isWidthFillParent()) { | |
analysis << "This ${node.name()} tag should use android:layout_width=\"wrap_content\"" | |
} |