Nativescript: zIndex do not render correctly when declared in XML

Created on 13 May 2016  路  3Comments  路  Source: NativeScript/NativeScript

When applied via *.css file z-index is working.
However when declared in *.xml file zIndex is renered by element position in the xml tree and not by its value.
Code to reproduce this issue :

<Page xmlns="http://schemas.nativescript.org/tns.xsd" >
  <!-- this won't work! -->
    <AbsoluteLayout>
      <GridLayout zIndex="99" height="100" width="100" backgroundColor="red"></GridLayout>
      <GridLayout zIndex="1" height="200" width="200" backgroundColor="green"></GridLayout>
    </AbsoluteLayout>
</Page>
<Page xmlns="http://schemas.nativescript.org/tns.xsd" >
  <!-- this works! -->
    <AbsoluteLayout>
      <GridLayout zIndex="1" height="200" width="200" backgroundColor="green"></GridLayout>
      <GridLayout zIndex="99" height="100" width="100" backgroundColor="red"></GridLayout>
    </AbsoluteLayout>
</Page>
// this works! 
.lower-grid {
    z-index: 1;
}
.upper-grid {
    z-index: 99;
}
bug android

Most helpful comment

This issue is NOT fixed!!!

All 3 comments

This issue is NOT fixed!!!

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hshristov picture hshristov  路  3Comments

rLoka picture rLoka  路  3Comments

NordlingDev picture NordlingDev  路  3Comments

fmmsilva picture fmmsilva  路  3Comments

mourice picture mourice  路  3Comments