aboutsummaryrefslogtreecommitdiffstats
path: root/layoutopt/libs/uix/src/resources/rules/IncorrectWidthInHorizontalScrollView.rule
blob: b96e03440afac68c3e5b7aebd20e18804f5caa61 (plain)
1
2
3
4
5
6
7
8
9
10
11
// 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 match_parent

if (node.'..'.is("HorizontalScrollView") && node.isWidthFillParent()) {
    analysis << "This ${node.name()} tag should use android:layout_width=\"wrap_content\""
}