Why android build system is working in a strange way? -
so have xml file has following structure:
<relativelayout> <scrollview above="@id/bottom">...</scrollview> <linearlayout id="@+id/bottom">...</linearlayout> </relativelayout>
i referenced linear layout in scroll view above. @ first project compiles no errors , gave desired results. when clean project gave errors linear layout reference. error:(16, 31) no resource found matches given name (at 'layout_above' value '@id/bottom').
i know, should put linear layout above scroll view why errors didnt show @ first,
why happening ?
change like
<relativelayout> <linearlayout id="@+id/bottom">...</linearlayout> <scrollview above="@id/bottom">...</scrollview> </relativelayout>
or
<relativelayout> <scrollview above="@+id/bottom">...</scrollview> <!-- notice + --> <linearlayout id="@+id/bottom">...</linearlayout> </relativelayout>
in relativelayout
, order doesn't matter views in relation each other. in actual xml, linearlayout defined below scrollview & hence not able find when above="@id/bottom"
. either swap position or add "+" before above="@id/bottom"
like: above="@+id/bottom"
Comments
Post a Comment