markelc
markelc

Reputation: 354

Nativescript Applying androidElevation to a stacklayout

Nativescript docs say androidElevation is a valid property for the stacklayout, but is not displayed when added in my ng project. The same elevation applied to a label works fine. Is there some additional property that needs to be added?

<StackLayout margin="10" androidElevation="12">
  <Label text="sample1"></Label>
  <Label text="sample2"></Label>
</StackLayout>

Upvotes: 1

Views: 147

Answers (1)

Manoj
Manoj

Reputation: 21908

androidElevation works only when you set a background color on the view.

<StackLayout margin="10" androidElevation="12" style="background-color: red;">
  <Label text="sample1"></Label>
  <Label text="sample2"></Label>
</StackLayout>

Upvotes: 1

Related Questions