aboutsummaryrefslogtreecommitdiffstats
path: root/layoutopt/libs/uix/src/resources/rules/IncorrectHeightInScrollView.rule
blob: d29ebd5f0b94b00953e4fb00bf35569572e7c1f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
// Rule: IncorrectHeightInScrollView
//
// Description: Checks whether a scrollview's child has the wrong dimension.
//
// Conditions:
// - The node has a ScrollView parent
// - The node has a height set to fill_parent

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